Claude Code
Claude Code speaks the Anthropic Messages protocol. Use the site root as the gateway URL (no /v1):
npm install -g @anthropic-ai/claude-code
export ANTHROPIC_BASE_URL="https://47.237.177.122"
export ANTHROPIC_AUTH_TOKEN="sk-YOUR_KEY"
claudeANTHROPIC_BASE_URLis the site root; Claude Code appends/v1/messagesitself.ANTHROPIC_AUTH_TOKENis sent asAuthorization: Bearer.- Pick a Claude model returned by
/v1/models, or one marked Live settlement on the home page.
Codex CLI
Codex speaks the OpenAI Responses protocol. Use a dedicated profile so your existing OpenAI configuration stays untouched:
- Install the client:
npm install -g @openai/codex
codex --version- Create
~/.codex/opentokenrouter.config.toml:
model_provider = "opentokenrouter"
[model_providers.opentokenrouter]
name = "OpenTokenRouter"
base_url = "https://47.237.177.122/v1"
env_key = "OPENTOKENROUTER_API_KEY"
wire_api = "responses"- Start with the dedicated profile:
export OPENTOKENROUTER_API_KEY="sk-YOUR_KEY"
codex --profile opentokenrouter --model "MODEL_ID"OpenAI SDK (generic)
Python:
from openai import OpenAI
client = OpenAI(base_url="https://47.237.177.122/v1", api_key="sk-YOUR_KEY")Node.js / TypeScript:
import OpenAI from 'openai'
const client = new OpenAI({
baseURL: "https://47.237.177.122/v1",
apiKey: "sk-YOUR_KEY",
})Desktop client
OpenTokenRouter Desktop wraps gateway URL, key, and model selection into a guided flow. Get the installer from the Download page and follow the first-launch checklist there (macOS Gatekeeper / Windows SmartScreen). For the full environment, one-click setup, and pricing workflow, see the Desktop Client Guide.