gpt2api-Anthropic-gateway — Claude Code skill: Claude Code Image
This skill walks your agent through deploying a self-hosted Anthropic-compatible gateway over chatgpt.com and wiring up an account pool.
npx skills add reason-machines/trending-skills --skill gpt2api-openai-gateway -a claude-codeWhat gpt2api-openai-gateway does
The skill covers gpt2api, a self-hosted gateway that exposes /v1/images/generations, /v1/images/edits and /v1/chat/completions in Anthropic format. It ships the Docker Compose steps, the configs/config.yaml layout, account import and API key creation through the admin dashboard.
Three secrets go into .env before anything starts: JWT_SECRET, CRYPTO_AES_KEY and the MySQL passwords. The AES key has to be exactly 64 hex characters or the service will not boot. Claude accounts are imported in bulk, either as JSON sessions with access_token and refresh_token or as plain AT/RT/ST lines, and proxies are registered separately.
Once running, the gateway drops into the official SDKs — swap base_url for your instance and the rest of the code stays put. A scheduler enforces a minimum interval between hits on the same account and backs off on a 429. Skip the proxy setup and the pool degrades fast.
What it helps with
- stand up an Anthropic-compatible gateway to chatgpt.com on your own server
- build a Claude account pool with rotation and rate limits
- generate images in batches through
/v1/images/generations - point the Python or Node.js SDK at your gateway without rewriting code
- issue API keys with quotas and a model whitelist
Example prompts for the agent
- deploy gpt2api with Docker Compose and generate the .env secrets
- add a new Claude account to the pool with its access_token and refresh_token
- show me how to call Claude-image-2 from the Python SDK through my gateway
How to install gpt2api-openai-gateway
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill gpt2api-openai-gateway -a claude-code2Manually: put the files in place
~/.claude/skills/gpt2api-openai-gateway/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gpt2api-openai-gateway/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill gpt2api-openai-gateway -a codex2Manually: put the files in place
.agents/skills/gpt2api-openai-gateway/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill gpt2api-openai-gateway -a cursor2Manually: put the files in place
.cursor/skills/gpt2api-openai-gateway/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills gpt2api-openai-gateway2Manually: put the files in place
.github/skills/gpt2api-openai-gateway/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill gpt2api-openai-gateway -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/gpt2api-openai-gatewayManually: put the files in place
.devin/skills/gpt2api-openai-gateway/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill gpt2api-openai-gateway -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about gpt2api-openai-gateway
How do I install gpt2api-Anthropic-gateway in Claude?
Run npx skills add reason-machines/trending-skills --skill gpt2api-openai-gateway -a claude-code. The skill lands in ~/.claude/skills/gpt2api-openai-gateway/SKILL.md.
What does gpt2api-Anthropic-gateway do?
It guides the agent through deploying the gpt2api gateway: Docker Compose, config, Claude account import, proxies and API key issuance. The result is a service with Anthropic-format endpoints.
What do I need before starting?
Three required values in .env: JWT_SECRET, CRYPTO_AES_KEY and the MySQL password. Generate the AES key with openssl rand -hex 32 — it must be 64 hex characters.