Client config generator

Pick a client, paste your base URL and API key, and get a config snippet you can paste plus a command that verifies it.

The key is only interpolated in your browser — it is never sent anywhere or stored. Leave it blank to generate the snippet with a placeholder and substitute your real key later.

Claude Code

Writes the env block of ~/.claude/settings.json and speaks the Anthropic Messages protocol.

Where it goes: ~/.claude/settings.json

Config snippet
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.codegateway.dev",
    "ANTHROPIC_AUTH_TOKEN": "sk-cg-YOUR_KEY"
  }
}
Verify command (free)
curl -sS "https://api.codegateway.dev/v1/models" -H "Authorization: Bearer sk-cg-YOUR_KEY" | head
Client self-check
claude --version    # confirms the CLI is installed
claude              # start the REPL in any project directory

Codex CLI

Writes the provider block of ~/.codex/config.toml and speaks the Responses API.

Where it goes: ~/.codex/config.toml

Config snippet
model_provider = "codegateway"

[model_providers.codegateway]
name = "codegateway"
base_url = "https://api.codegateway.dev/v1"
env_key = "OPENAI_API_KEY"
wire_api = "responses"
requires_openai_auth = false
Verify command (free)
curl -sS "https://api.codegateway.dev/v1/models" -H "Authorization: Bearer sk-cg-YOUR_KEY" | head
Client self-check
export OPENAI_API_KEY="sk-cg-YOUR_KEY"
codex exec "reply with the single word: ok"

Claude Desktop

Claude Desktop configures third-party inference inside the app, so it has no provider config file (claude_desktop_config.json is only for MCP servers).

Where it goes: Claude Desktop → Help → Troubleshooting

Config snippet
1. Help → Troubleshooting → Enable Developer Mode
2. Developer → Configure Third-Party Inference…
3. Gateway base URL: https://api.codegateway.dev
4. API key: sk-cg-YOUR_KEY
5. Save, then send one message to confirm the request reaches the gateway
Verify command (free)
curl -sS "https://api.codegateway.dev/v1/models" -H "Authorization: Bearer sk-cg-YOUR_KEY" | head
Client self-check
Send one message in Claude Desktop, then confirm the call appears in Dashboard → Usage.

Generic OpenAI-compatible

Any SDK or CLI that reads OPENAI_BASE_URL / OPENAI_API_KEY.

Where it goes: Shell profile / process environment

Config snippet
export OPENAI_BASE_URL="https://api.codegateway.dev/v1"
export OPENAI_API_KEY="sk-cg-YOUR_KEY"
Verify command (free)
curl -sS "https://api.codegateway.dev/v1/models" -H "Authorization: Bearer sk-cg-YOUR_KEY" | head
Client self-check
curl -sS "https://api.codegateway.dev/v1/chat/completions" \
  -H "Authorization: Bearer sk-cg-YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"gpt-4o-mini","max_tokens":1,"messages":[{"role":"user","content":"ping"}]}'
Config Generator: Claude Code, Codex, Desktop | CodeGateway