Skip to content

Claude Code (CLI + Desktop)

Claude Code speaks the Anthropic Messages protocol. Point it at a lane root (no /v1) and it routes every call through OpenGateway.

  1. Open Settings → Connection → Gateway.

  2. Fill in:

    Connection: Gateway
    Gateway base URL: https://api.opengateway.one/oss
    Gateway API key: YOUR_KEY
    Gateway auth scheme: bearer
    Model list: leave empty
  3. Click Test connection. For Claude frontier models, use https://api.opengateway.one/frontier instead.

Set the base URL and auth via environment variables (or ~/.claude/settings.json under env):

Terminal window
export ANTHROPIC_BASE_URL="https://api.opengateway.one/oss"
export ANTHROPIC_AUTH_TOKEN="YOUR_KEY" # → Authorization: Bearer
# or: export ANTHROPIC_API_KEY="YOUR_KEY" # → x-api-key

Claude Code only calls the gateway’s GET /v1/models when you opt in:

Terminal window
export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1

The picker filters to ids beginning claude/anthropic, which is why OpenGateway’s curated aliases are named claude-turbo-hub-*. Discovery is optional — manual ids always work through /v1/messages.

Extended thinking is on by default. Newer models use CLAUDE_CODE_EFFORT_LEVEL (low/medium/high); older models use MAX_THINKING_TOKENS. OpenGateway maps these onto whatever the upstream model expects — see Effort levels.

| Lane | Example model | | --- | --- | | /oss | claude-turbo-hub-qwen3-coder, claude-turbo-hub-gpt-oss-120b | | /frontier | turbo-agent-model-claude-opus-4-7, sonnet-4.6 |