The Hermes and OpenClaw agents, as well as your own scripts built on the official SDKs, connect to Claudexia with one address and one key.
sk_cdx_. No account yet? Sign up.Open ~/.hermes/config.yaml:
model:
provider: custom
default: gpt-6-astra
context_length: 1000000
base_url: https://api.claudexia.tech/v1
api_mode: chat_completions
api_key: sk_cdx_YOUR_KEYFor Claude set api_mode: anthropic_messages and a Claude model in default. The context_length field is required: without it Hermes assumes a 128K model.
Open ~/.openclaw/openclaw.json:
{
"models": {
"mode": "merge",
"providers": {
"claudexia": {
"baseUrl": "https://api.claudexia.tech/v1",
"apiKey": "sk_cdx_YOUR_KEY",
"api": "openai-completions",
"models": [
{ "id": "gpt-6-astra", "name": "GPT-6 Astra", "contextWindow": 1000000, "maxTokens": 128000 },
{ "id": "claude-sonnet-5", "name": "Claude Sonnet 5", "contextWindow": 1000000, "maxTokens": 32000 }
]
}
}
},
"agents": { "defaults": { "model": { "primary": "claudexia/gpt-6-astra" } } }
}Then run openclaw gateway restart and openclaw doctor.
base_url = https://api.claudexia.tech/v1, key as usual.base_url = https://api.claudexia.tech, key as usual.Request examples are in the API reference and on the Python, TypeScript and cURL pages.
claude-sonnet-5 in the Premium channel. On Cheap use claude-opus-5-5.claude-opus-5-5 or gpt-6-astra.deepseek-v4.1-flash or gpt-6-luna. Both cost several times less than Sonnet 5.Prices and the full list are in the model catalog. GPT, DeepSeek, Gemini and other non-Claude models work only with Premium channel keys: see Channels.
Click an error to see what to do.
The tool sent a wrong key or no key at all. Copy the whole key from API keys: it starts with sk_cdx_ and has no spaces or line breaks. If the key was deleted or revoked, create a new one. Restart the tool after you change the key.
Your balance ran out. In the OpenAI format the error has the code insufficient_quota; in the Anthropic format it is HTTP status 402. Top up under Billing by card or with crypto, from $1. No settings need to change, just send the request again. When the balance is almost empty, requests run one at a time and you may get a 429 with the code low_balance. The code account_frozen means the account is suspended: contact support.
The tool calls the wrong address. For this tool the address is https://api.claudexia.tech/v1, ending in /v1 with no slash after it. If the tool adds /v1 on its own, you end up with /v1/v1 and a 404: remove /v1 from the field. The address table for other tools is on Addresses and formats.
Tools read their settings at startup. Quit the tool completely and open it again, and open a new terminal window. An environment variable set in one terminal window is not visible in another. Apps started from the Dock, the Start menu or a shortcut do not read ~/.zshrc or ~/.bashrc: for them, put the key in the tool settings.
The model name must match the ID in the catalog exactly: claude-sonnet-5, not "Claude Sonnet 5". Only Claude Code understands the [1m] suffix; leave it out everywhere else.
The model is not in your key channel. The Cheap channel serves Claude models only; Premium serves the whole catalog. Switch the model or the key channel: see Premium and Cheap channels.
The command below sends one short request straight to Claudexia, without the tool. It tells you whether the problem is your key and balance or the tool settings. Replace sk_cdx_YOUR_KEY with your key. The request costs a fraction of a cent.
curl https://api.claudexia.tech/v1/chat/completions \
-H "Authorization: Bearer sk_cdx_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "claude-sonnet-5", "max_tokens": 16, "messages": [{"role": "user", "content": "Reply with OK"}]}'Invoke-RestMethod https://api.claudexia.tech/v1/chat/completions -Method Post `
-Headers @{ Authorization = 'Bearer sk_cdx_YOUR_KEY' } -ContentType 'application/json' `
-Body '{"model": "claude-sonnet-5", "max_tokens": 16, "messages": [{"role": "user", "content": "Reply with OK"}]}'You get a reply with a choices field: the key and balance are fine, so look at the tool settings. You get an error: the code and message point to the cause. They are covered above and in the error reference.