Getting started
Coding agents (Claude Code, Codex)
Any agent that speaks the Anthropic or OpenAI wire format can run on a project key — point it at the Gateway base URL and use a model from GET /v1/models.
Claude Code
Set the base URL (no /v1 — Claude Code appends /v1/messages itself) and send the key as the auth token. Clear ANTHROPIC_API_KEY so it doesn't take precedence.
export ANTHROPIC_BASE_URL="https://api.atptoken.ai"
export ANTHROPIC_AUTH_TOKEN="atp-..."
export ANTHROPIC_API_KEY=""
export ANTHROPIC_MODEL="claude-sonnet-4-6" # any model from GET /v1/models
claudeOr set the same values under the env block of ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.atptoken.ai",
"ANTHROPIC_AUTH_TOKEN": "atp-...",
"ANTHROPIC_API_KEY": ""
},
"model": "claude-sonnet-4-6"
}Codex CLI
Add the Gateway as a custom OpenAI-compatible provider in ~/.codex/config.toml (base URL includes /v1), then export the key named by env_key.
# ~/.codex/config.toml
model = "gpt-5.4" # any model from GET /v1/models
model_provider = "atp"
[model_providers.atp]
name = "ATP"
base_url = "https://api.atptoken.ai/v1"
env_key = "ATP_API_KEY"
wire_api = "chat"export ATP_API_KEY="atp-..."
codexBoth tools authenticate with Authorization: Bearer atp-…. The model must be enabled for the key's project, or the Gateway returns 403.