Claude Code
Claude Code and the Anthropic SDK via Zseton.
Zseton implements the Anthropic Messages API, so Claude Code works without a local proxy, with three environment variables.
1. Key and balance
Create a key on the Keys page and top up your balance (Quick start).
2. Environment variables
export ANTHROPIC_BASE_URL="https://api.zsetonai.hu/anthropic" export ANTHROPIC_AUTH_TOKEN="zs_live_..." export ANTHROPIC_API_KEY=""
Then run the claude command. If you don't specify a model, Claude Code uses its default models, and Zseton routes the requests to the cheapest provider.
3. Choosing a model (optional)
Claude Code uses two model slots. If you pin one, pin both, otherwise frequent background tasks may go to a model you didn't choose.
| Variable | Role |
|---|---|
ANTHROPIC_MODEL | Main model, the agent loop |
ANTHROPIC_SMALL_FAST_MODEL | Small, fast model: titles, summaries |
export ANTHROPIC_MODEL="claude-opus-4.6" export ANTHROPIC_SMALL_FAST_MODEL="claude-haiku-4.5"
Non-Claude models
Any catalog model can be set. A cost-effective pair: a strong main model, a cheap small model.
4. Verify
- Run /status: the auth token should be ANTHROPIC_AUTH_TOKEN and the base URL the Zseton Anthropic endpoint.
- Ask for a one-word answer.
- Ask it to read package.json and tell you the name field. This tests tool use.
- You'll see the request cost on the Usage page.
Minimum savings
Set a minimum discount on the key on the Keys page, or send the X-Min-Discount header. That way you get an error instead of a more expensive run.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
401 authentication_error | Missing or invalid key. ANTHROPIC_AUTH_TOKEN must be the zs_live_ key, ANTHROPIC_API_KEY empty. |
Claude Code uses the claude.ai account | ANTHROPIC_API_KEY is not empty, or there's a cached login. Set it empty, or run /logout. |
503 overloaded_error | The model currently has no available capacity. Pick another model on the Models page. |
400 "balance exhausted" | Top up. On the Anthropic surface, low credit is a 400, not a 402. |
High cost per request | The Claude Code system prompt is large. Use a cheaper main model and a cheap small model. |
Anthropic SDK
Same with the Anthropic Agent SDK and @anthropic-ai/sdk: baseURL is the Zseton Anthropic endpoint, apiKey your zs_live_ key.