Codex CLI· Facts verified 2026-09-07

Can Codex CLI Use Other Models Like Claude or DeepSeek?

Quick answer

Yes. Codex CLI natively supports custom providers: add a [model_providers] entry in ~/.codex/config.toml with an OpenAI-compatible base URL and an API key, and Codex will drive DeepSeek, GLM, Kimi, a gateway like OpenRouter, or a flat-rate routed endpoint like Standard Compute. Claude models specifically only work through a provider that exposes them over an OpenAI-compatible API, because Anthropic's own API speaks a different dialect. The catch people miss: your ChatGPT plan quota never subsidizes custom providers — those runs bill to whatever key you configure.

The config

  1. Open ~/.codex/config.toml and add a [model_providers.<name>] entry with the provider's OpenAI-compatible base_url and the env var holding your API key.
  2. Set the model for that provider (some endpoints expose one routed model id; catalogs like OpenRouter expose hundreds).
  3. Check the wire_api setting if you get 404s — providers differ on supporting the newer /v1/responses API vs classic /v1/chat/completions.
  4. Use profiles to flip per invocation: keep your ChatGPT-plan sign-in as the default and invoke the custom provider for volume work.

What people actually switch to when they outgrow the limits

DestinationEconomicsHonest trade-off
DeepSeek direct APICheapest steady per-token priceOne model family; per-token, so loops still cost
OpenRouterList prices + ~5.5% credit fee, huge catalogYou pick models; metered — the surprise-bill shape survives
Flat-rate routed sub (Standard Compute)Fixed $19–249/mo compute budgetBudget is real: heavy all-day use eats the small tiers
Upgrade to Pro ($100–200)5x–20x the Plus windowsStill windowed; still one vendor's models

The trade-offs nobody mentions

The honest catch

You can point Codex CLI anywhere, but you cannot bring your ChatGPT plan with you — third-party model runs bill to the configured key, and Codex's OpenAI-tuned harness means non-GPT models occasionally need babysitting. The honest framing: custom providers fix the economics of volume work, not the quality ceiling of the top OpenAI models.

Where Standard Compute fits

About a quarter of Standard Compute's active customers run Codex CLI against our endpoint: base_url https://api.stdcmpt.com/v1 (both /v1/responses and /v1/chat/completions supported), one flat plan from $19/mo, smart routing sending hard requests to frontier-class models and routine turns to efficient ones, no 5-hour windows. The pattern that works: keep the ChatGPT plan for interactive top-model work, run the volume through the flat budget. Step-by-step: /integrations/codex-cli.

Get your API key →Compare our plans honestly →

FAQ

Can Codex CLI use Claude models?

Not against Anthropic's API directly — Codex speaks the OpenAI dialect. It works through providers that expose Claude-family models over an OpenAI-compatible endpoint; Standard Compute serves its Claude family this way, and its router can also select Claude-class models for hard requests automatically.

Does my ChatGPT Plus or Pro quota apply to custom providers?

No. Plan quotas only cover OpenAI models via plan sign-in. A custom provider is a separate account with its own billing — which is the point: volume work stops eating your 5-hour windows.

Why does my custom provider return 404 from Codex?

Usually the API flavor: Codex defaults to the newer /v1/responses API, which many OpenAI-compatible providers don't implement — set wire_api to chat completions for those. (Standard Compute supports both, so either setting works there.)

Related money questions

Codex Usage Limits: Plus vs Pro, ExplainedLimits explainedOne API for All LLM Providers: Does It Exist?ConsolidationBest LLM Router in 2026Routing guide