Guide

Claude Code API setup with Nexum Router

Point Claude Code at Nexum Router's Anthropic-compatible API and keep your exact CLI workflow, on a flat $5.50/week plan. Setup takes about two minutes.

Last updated: 2026-10-17

What this setup does

Claude Code talks to any API that speaks the Anthropic Messages format. Nexum Router serves that format at /router/claude, so the CLI works unchanged: same commands, same sessions, same workflow. The answers come from the open models listed below, not from Anthropic's Claude models, for one flat $5.50/week with no hourly windows and no weekly caps.

Step 1: Create an account and an API key

Create an account at /router/auth, subscribe for $5.50/week, and create an API key in the dashboard at /router. Nexum Router keys start with dgr_live_.

Step 2: Point Claude Code at the router

Set ANTHROPIC_BASE_URL to the router's Anthropic-compatible endpoint, /router/claude, and ANTHROPIC_AUTH_TOKEN to your dgr_live_ key, then start claude as usual.
export ANTHROPIC_BASE_URL="https://dialagram.me/router/claude"
export ANTHROPIC_AUTH_TOKEN="dgr_live_your-key"
claude

Step 3: Make the setting permanent

Put the same two variables in the env block of ~/.claude/settings.json so every new terminal and every project uses the router without exporting anything.
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://dialagram.me/router/claude",
    "ANTHROPIC_AUTH_TOKEN": "dgr_live_your-key"
  }
}

Step 4: Choose the model Claude Code runs on

Claude Code sends its own model names, which the router does not serve, so the model saved under Claude Code Model in the dashboard answers instead; with none saved, the router picks its default model. To pin a model from the CLI, set ANTHROPIC_MODEL to one of the model IDs below.
  • Nexum Router — nexum-router
  • DeepSeek V4.1 Flash — deepseek-v4.1-flash
  • Xiaomi Mimo 2.6 — xiaomi-mimo-2.6
  • Xiaomi Mimo 2.5 — xiaomi-mimo-2.5
  • Meta Muse Spark 1.2 — meta-muse-spark-1.2
  • Meta Muse Spark 1.3 — meta-muse-spark-1.3

Check that it works

Run claude and ask it anything. The request shows up in the dashboard's usage view shortly, and the public status page at /status shows the router's current health.

Troubleshooting

  • 401 or invalid API key: the token must be your dgr_live_ key, set as ANTHROPIC_AUTH_TOKEN (ANTHROPIC_API_KEY works too).
  • "Model ... is not available on the Claude-compatible route": ANTHROPIC_MODEL names a model this endpoint does not serve. Pick an ID from the list above, or unset it.
  • "Set a Claude route model in the Nexum Router dashboard": no model could be served for your account. Save a Claude Code Model in the dashboard's model catalog; if that model is temporarily unavailable, the error then says so and another model or a retry fixes it.
  • Context too long: the router answers an over-window request with a context-length error so the client can compact; each model's window is listed at /router/v1/models.

Use the same key in other tools

The key also works with every OpenAI-compatible client: use https://dialagram.me/router/v1 as the base URL. Pricing, limits and the full model list are in the FAQ at /faq.

Does this give me Claude models?

No. Claude Code is the client. Nexum Router does not serve Anthropic's Claude models; the models above answer every request.