Export ANTHROPIC_BASE_URL as the bare origin https://continuumcode.ai (no /v1: Anthropic clients append /v1/messages themselves) and ANTHROPIC_AUTH_TOKEN as a cont_sk_ key created in the Continuum web app under Settings, then Account, then Inference API. Set ANTHROPIC_MODEL to a served Claude ID such as claude-opus-5, and pin ANTHROPIC_SMALL_FAST_MODEL to claude-sonnet-5, because Claude Code sends its background turns to a separate small model whose built-in default is a Haiku ID Continuum does not serve. Then run claude and check /status. The variables are per-shell, so unsetting them returns you to your Anthropic login. Output is capped at 8,192 tokens per response. Personal Continuum API keys are a paid-plan feature: Plus is $25/mo, Max 100 is $100/mo, Max 200 is $200/mo, and Ultra is $500/mo as of August 2026.
- The base URL is the bare origin:
https://continuumcode.ai, with no/v1. Claude Code appends/v1/messagesitself. - Pin
ANTHROPIC_SMALL_FAST_MODEL. Background turns use a separate small model, and its built-in default is a Haiku ID Continuum does not serve. - The key goes in
ANTHROPIC_AUTH_TOKEN, notANTHROPIC_API_KEY. - Variables are read at startup and are per-shell. Nothing is written to your Claude Code config, and unsetting them restores your Anthropic login.
/statusinside the session shows the base URL in use, which is the fastest way to confirm the change took.- Output is capped at 8,192 tokens per response; agent turns iterate, so they rarely meet the ceiling.
What the variables actually change
Claude Code is an Anthropic Messages API client. ANTHROPIC_BASE_URL decides which host that client opens a connection to, and ANTHROPIC_AUTH_TOKEN decides what it presents as the credential. Every request the CLI makes goes to that host, including the ones you never asked for: title generation, conversation summaries, and the other background turns the CLI issues on its own.
What moves and what does not, checked 13 August 2026.
| Surface | Where it runs after the change | Who bills it |
|---|---|---|
| Your turns | Continuum’s inference API | Your Continuum plan |
| Background turns (titles, summaries) | Continuum’s inference API, on the small-fast model | Your Continuum plan |
| Skills, hooks, MCP servers, permissions | Locally, unchanged | Nobody; they are local configuration |
| Your Anthropic sign-in | Untouched, and unused in this shell | Your Anthropic plan, for nothing |
Everything else about the CLI is untouched. Your CLAUDE.md, skills, hooks, MCP servers, permission rules, and session history all live on disk and have nothing to do with which endpoint answers a model call.
What you need first
Setting Claude Code up this way requires Continuum Plus or higher. Inference keys do not mint on the Free tier, so the Create key button stays disabled until you subscribe, and the exports below have nothing to carry without one.
- Claude Code installed. Any recent version; there is no minimum for this.
- A Continuum account on a paid plan. Personal API keys are a paid-plan feature. As of August 2026 that is Plus at $25/mo, Max 100 at $100/mo, Max 200 at $200/mo, or Ultra at $500/mo; each step up raises the weekly hosted allowance. See pricing for the detail.
- A shell. That is the entire install footprint.
Point Claude Code at Continuum
Create a Continuum API key
In the Continuum web app at continuumcode.ai/app, open Settings, then Account, then Inference API. Create your key under Your keys. The same panel is on the Usage tab. Copy it immediately: it begins with cont_sk_ and the full value is shown exactly once. A lost key is replaced, not recovered.
Keys mint on Plus and above, so on the Free tier Create key stays disabled until you subscribe.
Export the four variables and run claude
Paste this into the shell you want to work in. The comments are worth keeping if you put the block in a profile, because the two non-obvious lines are the two that break setups.
# Bare origin, no /v1 - Claude Code appends /v1/messages itself.
export ANTHROPIC_BASE_URL="https://continuumcode.ai"
export ANTHROPIC_AUTH_TOKEN="cont_sk_..."
export ANTHROPIC_MODEL="claude-opus-5"
# Background turns use a separate small model whose built-in
# default is a Haiku id Continuum does not serve. Pin it.
export ANTHROPIC_SMALL_FAST_MODEL="claude-sonnet-5"
claude
Confirm it took, with /status
Inside the session, run /status. It prints the base URL the CLI is using. If it shows https://continuumcode.ai, the variables reached the process; if it shows Anthropic’s own endpoint, they did not, and the cause is almost always a shell that was already open before you exported them.
Make it permanent, or deliberately do not
Environment variables are read once at startup and last only as long as the shell. If you want the setup to persist, put the block in a shell profile or, better, in a direnv file scoped to the directories where you want it. Leaving it out of your global profile is a defensible choice: it keeps the default claude on your Anthropic subscription and makes routing to Continuum an explicit act.
The two traps
The base URL is the bare origin
Anthropic clients build their own route. Claude Code takes the configured base and appends /v1/messages to it, so the base must stop at the host: https://continuumcode.ai. Handing it https://continuumcode.ai/v1 produces a request to /v1/v1/messages, which 404s. This is the exact opposite of the OpenAI-shaped rule, where the base carries the /v1, and it is why a person who has already set up Codex or Cursor against the same gateway is the most likely person to get it wrong.
| Client shape | Base URL to configure | What the client requests |
|---|---|---|
| Anthropic (Claude Code, the Anthropic SDKs) | https://continuumcode.ai | POST /v1/messages |
| OpenAI (Codex, Cursor, opencode, the OpenAI SDKs) | https://continuumcode.ai/v1 | POST /v1/chat/completions, POST /v1/responses |
The small fast model has to be pinned
Claude Code does not send every request to the model you chose. Titles, summaries, and similar background work go to a separate, cheaper model, selected by ANTHROPIC_SMALL_FAST_MODEL. Its built-in default is a Haiku identifier that Continuum does not serve, so an otherwise perfect setup works for your first message and then fails the moment the CLI issues its first background call — which happens on its own schedule, not yours.
The models to name
Read from the live gateway on 17 August 2026. Claude models are the natural fit here, since the client is an Anthropic-format one and these are the IDs it expects to see.
The Claude family on the paid lane.
| Model ID | Use it for |
|---|---|
claude-opus-5 | The flagship; the sensible ANTHROPIC_MODEL |
claude-fable-5 | Claude 5 family |
claude-sonnet-5 | The sensible ANTHROPIC_SMALL_FAST_MODEL, and a fine main model |
curl -s https://continuumcode.ai/v1/models \
-H "Authorization: Bearer cont_sk_..."
When it does not work
curl https://continuumcode.ai/v1/messages \
-H "x-api-key: cont_sk_..." \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-5",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello from Continuum"}]
}'
| Symptom | Cause | Fix |
|---|---|---|
| 404 on every request | A /v1 on the base URL | Set it to the bare origin https://continuumcode.ai |
| First message works, then an error about a model you did not pick | ANTHROPIC_SMALL_FAST_MODEL is unpinned | Set it to claude-sonnet-5 and restart the session |
| 401 or an authentication failure | Key in ANTHROPIC_API_KEY instead of ANTHROPIC_AUTH_TOKEN | Use ANTHROPIC_AUTH_TOKEN; clear the other |
/status shows Anthropic’s endpoint | The shell was open before you exported | Export again in this shell, or open a new one, then rerun claude |
| Unknown or invalid model | The ID is not on your plan’s allowlist | Check it against GET /v1/models with your key |
| A long answer stops mid-sentence | The 8,192-token output cap | Ask for the work in parts; agent turns iterate and rarely hit it |
| It works in the terminal but not in your editor | The editor inherited an older environment | Quit the editor fully and reopen it after the profile change |
That last row deserves its own sentence, because it is the one that looks supernatural. An IDE or launcher that started before you edited your shell profile is still running with the environment it inherited then, and it will keep launching Claude Code with your Anthropic login no matter how many times you check the profile. Fully quitting and reopening the editor fixes it.
Questions people ask
Because Claude Code appends /v1/messages itself. A base of https://continuumcode.ai/v1 produces a request to /v1/v1/messages, which 404s. OpenAI-shaped clients such as Codex and Cursor have the opposite rule and do take the /v1.
ANTHROPIC_AUTH_TOKEN. The gateway accepts a cont_sk_ key as a bearer credential, and putting it in ANTHROPIC_API_KEY instead is a common cause of an authentication failure that otherwise looks like a bad key.
Claude Code sends background turns such as titles and summaries to a separate small model. Its built-in default is a Haiku identifier Continuum does not serve, so an otherwise correct setup fails on the first background call. Pin it to claude-sonnet-5.
Only in the shell where the variables are set. Nothing is written to your Claude Code configuration, and a shell without them runs on your normal Anthropic login exactly as before.
Run /status inside Claude Code. It shows the base URL in effect. That is faster and more reliable than re-reading your profile, because it reports what the running process actually got.
Yes. They are local configuration and are unaffected by which endpoint answers the model call. So are permission rules, CLAUDE.md, and session history.
Yes, the gateway translates, so a non-Claude ID in ANTHROPIC_MODEL will answer. Claude models are still the natural fit for an Anthropic-format client and the configuration with the fewest surprises.
Responses are capped at 8,192 output tokens. Long single generations can truncate at that ceiling; agent turns iterate across several responses, so in practice they are unaffected.
Put the exports in a shell profile, or scope them to specific project directories with direnv. Leaving them out of your global profile is a reasonable choice, since it keeps a plain claude on your Anthropic plan and makes routing to Continuum deliberate.
Sources
Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.
- Claude Code environment variables ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL, and the small-fast-model variable
- Anthropic Messages API the POST /v1/messages route Anthropic clients build for themselves
- Continuum pricing plan names, prices, and which tiers include personal API keys
- Continuum hosted inference the model lanes and the gateway surfaces, read 13 August 2026; the live /v1/models endpoint itself needs a cont_sk_ bearer