Documentation
Swap the Base URL and API key. Nothing else in your code changes.
1. Get an API key
Sign up, then create a key on the API Keys page of the dashboard. The full key is shown only once, so store it safely.
2. Pick a protocol and Base URL
OpenAI protocol
https://relay-api.chosum.top/v1For the OpenAI SDK, LangChain, Cline, OpenCode and more. Every model is available
Anthropic protocol
https://relay-api.chosum.top/anthropicFor the Anthropic SDK and Claude Code. Claude models
3. Make a request
from openai import OpenAI
client = OpenAI(base_url="https://relay-api.chosum.top/v1", api_key="sk-nova-...")
resp = client.chat.completions.create(
model="claude-sonnet-5-5",
messages=[{"role": "user", "content": "你好"}],
)
print(resp.choices[0].message.content)Tool setup
export ANTHROPIC_BASE_URL="https://relay-api.chosum.top/anthropic"
export ANTHROPIC_AUTH_TOKEN="sk-nova-..."
claudeError codes
| 401 | Missing or invalid API key |
| 402 | Insufficient balance, please top up |
| 404 | Model not found or disabled |
| 502 | Upstream temporarily unavailable, retry later |