Zseton
Sign up

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

Shell
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.

Why is ANTHROPIC_API_KEY empty? Claude Code may prefer the cached key or the claude.ai login. The empty value makes it use your Zseton key.

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.

VariableRole
ANTHROPIC_MODELMain model, the agent loop
ANTHROPIC_SMALL_FAST_MODELSmall, fast model: titles, summaries
Shell
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

  1. Run /status: the auth token should be ANTHROPIC_AUTH_TOKEN and the base URL the Zseton Anthropic endpoint.
  2. Ask for a one-word answer.
  3. Ask it to read package.json and tell you the name field. This tests tool use.
  4. 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

SymptomCause and fix
401 authentication_errorMissing or invalid key. ANTHROPIC_AUTH_TOKEN must be the zs_live_ key, ANTHROPIC_API_KEY empty.
Claude Code uses the claude.ai accountANTHROPIC_API_KEY is not empty, or there's a cached login. Set it empty, or run /logout.
503 overloaded_errorThe 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 requestThe 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.

Next
Cursor →
Claude Code – Zseton docs