Use Continuum’s hosted inference in Codex CLI

The Codex CLI has first-class support for third-party model providers: you describe one in ~/.codex/config.toml, name it as the active provider, and every turn goes there instead of to OpenAI. Continuum’s hosted inference is an OpenAI-compatible API included with a paid Continuum plan. The whole setup is one config block and one exported variable, with a single field that has to be right.

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

Codex reads model providers from ~/.codex/config.toml. Add a [model_providers.continuum] table with base_url set to https://continuumcode.ai/v1, env_key set to CONTINUUM_API_KEY, and wire_api set to "responses"; set model_provider = "continuum" and model to a served ID at the top of the file. Export CONTINUUM_API_KEY with a cont_sk_ key created in the Continuum web app under Settings, then Account, then Inference API, then run codex. The one field people get wrong is wire_api: Codex removed the "chat" value in 0.122 and now speaks the Responses API, which the Continuum gateway serves at /v1/responses. Responses are capped at 8,192 output tokens. 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
  • One TOML table does the job: [model_providers.continuum] with base_url, env_key, and wire_api.
  • wire_api must be "responses". Codex dropped the "chat" value in 0.122, and an omitted or wrong value is the top failure mode.
  • The base URL carries the /v1: https://continuumcode.ai/v1. Codex appends /responses itself.
  • env_key names a variable, it does not hold a key. The value has to be exported in the shell that actually runs codex.
  • Any served model ID works, including Claude and Gemini names. Codex is the client; it does not care whose model answers.
  • Output is capped at 8,192 tokens per response. Agent turns iterate, so long single generations are the only ones that notice.

What the provider block actually changes

Codex treats "which API do I talk to" as configuration rather than as a compiled-in fact. A provider is a named table in ~/.codex/config.toml that says where the endpoint is, which environment variable holds the credential, and which wire protocol to speak. Setting model_provider at the top of the file selects one. Nothing else about the CLI changes: the sandbox, the approval policy, AGENTS.md, and every slash command behave exactly as they did.

What moves and what does not, checked 13 August 2026.

SurfaceWhere it runs after the changeWho bills it
Every Codex turnContinuum’s inference APIYour Continuum plan
Sandbox and approvalsLocally, unchangedNobody; they are local policy
Your ChatGPT sign-inUntouched, and unused while this provider is activeYour ChatGPT plan, for nothing

Switching back is a one-line edit: delete or comment out model_provider and Codex returns to its built-in default. Keeping the [model_providers.continuum] table on disk costs nothing while it is unselected, so there is no reason to remove it.

What you need first

Setting the Codex CLI 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 provider block below is inert without one.

  • The Codex CLI, version 0.122 or later. Older builds still accept wire_api = "chat", and the instructions below assume the modern one. codex --version tells you.
  • 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 you can export a variable in. That is the whole install footprint.

Point Codex 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 displayed exactly once. There is no way to read it back, so a lost key is replaced rather than recovered.

Get hosted inference

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

02

Add the provider to ~/.codex/config.toml

Create the file if it does not exist. The two top-level keys select the provider and the model; the table describes the endpoint. Order matters in TOML only in that top-level keys must come before the first table header, which is why model and model_provider sit above [model_providers.continuum] here.

~/.codex/config.toml
model = "gpt-5.6-sol"
model_provider = "continuum"

[model_providers.continuum]
name = "Continuum"
base_url = "https://continuumcode.ai/v1"
env_key = "CONTINUUM_API_KEY"
wire_api = "responses"
03

Export the key and run Codex

env_key names the variable Codex will read; it does not store the secret. Export it in the shell you are about to run codex in, or put it in that shell’s profile if you want it to persist.

export CONTINUUM_API_KEY="cont_sk_..."
codex
04

Confirm the first turn actually landed

Ask it something trivial. A successful reply proves the key, the URL, the wire protocol, and the model ID all at once, which is worth doing before you point it at real work. If it fails, the smoke test in the troubleshooting section below separates a gateway problem from a Codex problem in one command.

The one field that has to be right: wire_api

Two OpenAI-shaped wire protocols exist, and Codex used to support both. wire_api = "chat" spoke Chat Completions; wire_api = "responses" speaks the newer Responses API. Codex removed the "chat" value in 0.122. A modern Codex is a Responses client and nothing else, which is precisely why the Continuum gateway serves POST /v1/responses alongside POST /v1/chat/completions.

ValueWhat happens
wire_api = "responses"Correct. Codex posts to /v1/responses and the gateway answers.
wire_api = "chat"Rejected by Codex 0.122 and later; the value no longer exists.
omittedDepends on the Codex build’s default, which is not something to leave to chance in a third-party provider block. State it.

The second-order version of the same mistake is the base URL. Because Codex appends the route itself, base_url must carry the /v1 and stop there: https://continuumcode.ai/v1, no trailing slash and no path after it. Anthropic-shaped clients have the opposite rule and take the bare origin, which is worth knowing if you are also setting up Claude Code against the same gateway.

The models you can name

These IDs were read from the live gateway on 17 August 2026. Put one on the model line. Codex has no opinion about the vendor behind an ID, so a Claude or Gemini model in a Codex session is unremarkable to the CLI.

Paid lane, drawn from your plan’s inference allowance.

Model IDWhat it is
claude-opus-5The flagship, and the gateway’s default
claude-fable-5Claude 5 family
claude-sonnet-5Claude 5 family
gpt-5.6-solGPT-5.6 family, the closest thing to a native Codex model
gpt-5.6-terraGPT-5.6 family
gpt-5.6-lunaGPT-5.6 family
grok-4.6xAI
gemini-3.5-flashGoogle
deepseek-v4-flashDeepSeek
glm-5.3Z.ai, via OpenCode Go
muse-spark-1.2Muse

The free lane

These models do not draw down your plan’s weekly inference allowance. Naming one in config.toml still needs a paid key, because that is what minting a key requires. They are chat-grade rather than agent-grade: fine for questions and small edits, and not what you want driving a long Codex run that is going to touch your repository.

On a paid key, these :free models do not draw your weekly budget.

Model IDProvider
google/gemma-4-26b-a4b-it:freeGoogle
nvidia/nemotron-3-ultra-550b-a55b:freeNVIDIA
nvidia/nemotron-3-super-120b-a12b:freeNVIDIA
cohere/north-mini-code:freeCohere
poolside/laguna-m.1:freePoolside
tencent/hy3:freeTencent
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

SymptomCauseFix
Protocol or parse error on the first turnwire_api missing or wrongSet it to "responses" exactly
401 or an authentication failureThe variable is not set in this shellRun echo $CONTINUUM_API_KEY in the same terminal you run codex in
401 with the variable clearly setKey mistyped, truncated on paste, or revokedMint a new key; the original is unrecoverable
404 on every requestA trailing slash or a path appended to base_urlSet it to exactly https://continuumcode.ai/v1
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 still talks to OpenAImodel_provider is not set, or is misspelledIt must match the table name after model_providers. exactly
One command that tells you whether the problem is Codex or the gateway.
curl -s https://continuumcode.ai/v1/responses \
  -H "Authorization: Bearer cont_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.6-sol","input":"say hi"}'

One environment note worth stating because it costs people an afternoon: an editor or IDE that launches codex for you does not necessarily inherit the shell profile you exported the key in. A launcher started before you edited that profile is running with the old environment, and quitting and reopening it is the fix.

Questions people ask

Nowhere in config.toml. The env_key field names an environment variable, and Codex reads the secret from it at startup, so you export CONTINUUM_API_KEY in the shell that runs codex. Keeping the key out of the config file is the reason Codex works this way. The key itself comes from the web app under Settings, then Account, then Inference API, created under Your keys.

Codex removed the "chat" value in 0.122, so a current Codex speaks only the Responses API. The Continuum gateway serves POST /v1/responses for exactly this reason. Omitting the field leaves the choice to the build default, which is not worth risking in a third-party provider block.

Yes. OpenAI-shaped clients append their own route, so base_url is https://continuumcode.ai/v1 with no trailing slash. Anthropic-shaped clients such as Claude Code take the bare origin instead, which is the opposite rule and a common source of confusion when you configure both.

Yes. Codex is a client and does not care whose model answers; any ID the gateway serves works on the model line, including the claude-* family. It is the same request shape either way.

No. While model_provider points at Continuum, Codex never calls OpenAI, so your ChatGPT sign-in is untouched and unused. Deleting the model_provider line returns Codex to its built-in default.

Change the model line in ~/.codex/config.toml to another served ID. The provider table does not change. Run curl -s https://continuumcode.ai/v1/models with your key to see what is currently served.

Responses are capped at 8,192 output tokens. A single generation asked to emit an entire large file can truncate; agent turns iterate across several responses, so in practice they are unaffected.

Yes, unchanged. Sandboxing and approval policy are local Codex behaviour and have nothing to do with which endpoint answers the model call.

Remove or comment out the model_provider line. The [model_providers.continuum] table can stay on disk; an unselected provider does nothing.

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. OpenAI Codex: configuration the model_providers table, base_url, env_key, and wire_api
  2. openai/codex on GitHub the 0.122 release that removed wire_api = "chat"
  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 Codex.
Change the models.

One Continuum plan drives the Codex CLI you already run. Subscribe, create a key, paste seven lines into config.toml. The workbench is there if you want it, and optional.

Plus is $25/mo · cancel anytime · one config block, nothing installed