Use Continuum’s hosted inference in Claude Code

Claude Code speaks the Anthropic Messages API and is pointed somewhere else with environment variables; it has no base-URL flag. Continuum’s hosted inference serves that same API natively, so no proxy or translation layer sits in between. The setup is four exports and a launch, with two traps that produce failures which look nothing like their cause.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

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.

What you need to know
  • The base URL is the bare origin: https://continuumcode.ai, with no /v1. Claude Code appends /v1/messages itself.
  • 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, not ANTHROPIC_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.
  • /status inside 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.

SurfaceWhere it runs after the changeWho bills it
Your turnsContinuum’s inference APIYour Continuum plan
Background turns (titles, summaries)Continuum’s inference API, on the small-fast modelYour Continuum plan
Skills, hooks, MCP servers, permissionsLocally, unchangedNobody; they are local configuration
Your Anthropic sign-inUntouched, and unused in this shellYour 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

01

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.

Get hosted inference

Keys mint on Plus and above, so on the Free tier Create key stays disabled until you subscribe.

02

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
03

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.

04

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 shapeBase URL to configureWhat the client requests
Anthropic (Claude Code, the Anthropic SDKs)https://continuumcode.aiPOST /v1/messages
OpenAI (Codex, Cursor, opencode, the OpenAI SDKs)https://continuumcode.ai/v1POST /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 IDUse it for
claude-opus-5The flagship; the sensible ANTHROPIC_MODEL
claude-fable-5Claude 5 family
claude-sonnet-5The sensible ANTHROPIC_SMALL_FAST_MODEL, and a fine main model
The authoritative list is the endpoint, not this page.
curl -s https://continuumcode.ai/v1/models \
  -H "Authorization: Bearer cont_sk_..."

When it does not work

The smoke test. If this works, the gateway is not your problem.
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"}]
  }'
SymptomCauseFix
404 on every requestA /v1 on the base URLSet it to the bare origin https://continuumcode.ai
First message works, then an error about a model you did not pickANTHROPIC_SMALL_FAST_MODEL is unpinnedSet it to claude-sonnet-5 and restart the session
401 or an authentication failureKey in ANTHROPIC_API_KEY instead of ANTHROPIC_AUTH_TOKENUse ANTHROPIC_AUTH_TOKEN; clear the other
/status shows Anthropic’s endpointThe shell was open before you exportedExport again in this shell, or open a new one, then rerun claude
Unknown or invalid modelThe ID is not on your plan’s allowlistCheck it against GET /v1/models with your key
A long answer stops mid-sentenceThe 8,192-token output capAsk for the work in parts; agent turns iterate and rarely hit it
It works in the terminal but not in your editorThe editor inherited an older environmentQuit 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.

  1. Claude Code environment variables ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL, and the small-fast-model variable
  2. Anthropic Messages API the POST /v1/messages route Anthropic clients build for themselves
  3. Continuum pricing plan names, prices, and which tiers include personal API keys
  4. 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
Try it

Keep the CLI.
Change the bill.

One Continuum plan drives the Claude Code you already run. Subscribe, create a key, export four variables. The workbench is there if you want it, and optional.

Plus is $25/mo · cancel anytime · four exports, nothing installed