Skip to main content

Any model, one base URL

Claude Code is a harness: it sends Anthropic Messages requests to whatever ANTHROPIC_BASE_URL points at. Sideren’s /v1/messages endpoint serves the catalog’s models in that format — GLM, DeepSeek, Kimi, Qwen, GPT and the rest — with tools, streaming and thinking carried through. Point Claude Code at Sideren and pick a catalog id as its model. A model serves Claude Code’s tool traffic on a route only after that route passes Sideren’s own qualification tests (long tool loops, thinking, streaming); until then it isn’t offered for tool use.

One command

The setup helper writes Sideren’s settings into ~/.claude/settings.json (the base URL, your key and the model slots), backs up what was there, and is safe to re-run. See setup helper for everything it can do. Sideren keys intentionally begin with sdn_. Do not paste one into Anthropic’s own API-key or consumer Claude desktop sign-in field, which expects an Anthropic credential and does not configure a custom API base URL. The setup below is for Claude Code on Windows, macOS, or Linux.

By hand

Set four variables — in ~/.claude/settings.json under env, or exported in your shell:
  • ANTHROPIC_BASE_URL — the gateway origin only. Do not append /v1; Claude Code adds /v1/messages itself.
  • ANTHROPIC_AUTH_TOKEN — your sdn_ key.
  • ANTHROPIC_MODEL — the main model. @sdn/glm-5.3 is a strong agentic coding driver; any catalog id works, including @sdn/deepseek-v4-pro, @sdn/kimi-k2.7-code and the GPT models your plan includes.
  • ANTHROPIC_DEFAULT_HAIKU_MODEL — the model the haiku alias points to, which Claude Code also uses for quick auxiliary calls (titles, summaries); @sdn/glm-5.3-flash keeps them near-free.
If the model you name can’t be served, the gateway may answer with a comparable model and keep the session moving — the response still echoes the id you sent. Pin a delivery: "exact" catalog id when the exact model matters. See Model routing.

Verify

Start claude and run a trivial prompt. To confirm the wiring end-to-end without Claude Code in the loop:

Troubleshooting

  • Still using your Anthropic account? ANTHROPIC_AUTH_TOKEN takes precedence over a saved login, so you don’t need to sign out. Run /status to see which credential is active, and run /logout once if Claude Code warns about two credential sources at startup.
  • 404s on every call? The base URL probably includes /v1 — use the bare origin.
  • 401 unauthorized? Put the key in ANTHROPIC_AUTH_TOKEN, which Claude Code sends as Authorization: Bearer. A key in ANTHROPIC_API_KEY is ignored until you approve it once (/config → Use custom API key).
  • Windows app rejects a Sideren key before making a request? Make sure you are configuring Claude Code from PowerShell or ~/.claude/settings.json, not the consumer Claude desktop app’s Anthropic sign-in/API-key field. The one-command setup above avoids that prompt.
  • Context meter looks off? Claude Code budgets with count_tokens, which returns an estimate — billing always uses exact usage from real responses.
  • Sessions: conversation identity is derived from the requests Claude Code already sends — its turns stay on a warm cache with no extra header to configure (Prompt caching).
Model choice is per-variable, so you can run the premium model as the main driver and keep the fast tier on auxiliary calls. Check that your plan includes both (Plans & limits): the @sdn/glm-5.3 models above need Starter or higher, and Free has its own ten models.