Best API & Subscription for OpenAI Codex CLI

To run Codex CLI cost-efficiently, run standardcompute launch codex: Standard Compute's router sends each step to the cheapest model that can do it (Claude Fable 5.1 or GPT-6 Astra only when it counts), and it serves the OpenAI Responses API (/v1/responses) at https://api.stdcmpt.com/v1, which current Codex CLI releases require for custom providers, on a plan from $19 a month with a $20 compute budget. Compare that with your ChatGPT plan's native Codex allowance, and check the API protocol your installed version supports. Its fixed monthly price includes a finite compute budget; parallel tasks consume that allowance faster.

Guide updated 2026-10-15. Check each provider's current terms below.
Get your API key$0.25 trial for eligible new accounts, no card. Plans from $19/mo.
Light or occasional use
Compare your existing native plan with the cost of a small task on a supported custom provider. An OpenAI-compatible label alone does not establish support for every protocol and feature Codex needs.
Daily use, cost-optimized
Standard Compute sends each Codex step to the cheapest model that can do it, and for every model we vet providers for price, uptime and speed, with automatic fallback. Opt-in Europe or US Compliance rules apply per key, team or company, and we don't train on your prompts or store them. It is one fixed monthly bill, so check that its documented integration and monthly compute budget fit your tasks: start with one task before parallel runs and plan for requests stopping at the budget.

API and subscription options for Codex CLI

OptionPriceWhat you get
Standard Compute (us)From $19/moSmart routing sends each request to the cheapest model that can do it, or pin any model by its exact ID. Standard Compute starts at $19/month with a $20 monthly compute budget. Requests stop when that budget is exhausted until renewal or a plan change; there are no automatic overage charges. Requests are not slowed as the budget is used. It is a fixed bill with a finite allowance.
OpenRouterPay-as-you-goChoose models and providers through one API. Usage-based pricing can suit light or bursty work; estimate long agent sessions and review current fees and limits. Source: openrouter.ai
OpenCode Go$10 or $40/moNative OpenCode subscription: Go $10 a month, Go Plus $40. Each model has a monthly usage limit in dollars, with 5-hour and weekly windows set as shares of it. Single-member workspaces only. Source: opencode.ai

Prices and allowances can change. OpenCode Go prices were checked against its linked public pages on October 13, 2026, DevPass prices on September 5, 2026; other entries link to current plans without quoting an unverified price. Spot an error? Tell us.

Or configure Codex CLI by hand

~/.codex/config.toml
model = "standardcompute"
model_provider = "standardcompute"

[model_providers.standardcompute]
name = "Standard Compute"
base_url = "https://api.stdcmpt.com/v1"
env_key = "STANDARD_COMPUTE_API_KEY"
wire_api = "responses"

Then run export STANDARD_COMPUTE_API_KEY=your key, and start codex. The key lives in that environment variable, never in the file.

Setup for one model in Codex CLI: DeepSeek · Kimi K3 · GLM 5.3 · Gemini

Codex CLI questions

Where does the base URL live for Codex CLI with a subscription key: config.toml, an env var or a CLI flag?
In ~/.codex/config.toml, and the key in an environment variable. Add a [model_providers.standardcompute] table with base_url = "https://api.stdcmpt.com/v1", env_key = "STANDARD_COMPUTE_API_KEY" and wire_api = "responses", set model = "standardcompute" and model_provider = "standardcompute" at the top of the file, export STANDARD_COMPUTE_API_KEY and run codex. Current Codex releases only talk to custom providers over the Responses API, which Standard Compute serves at /v1/responses. To skip the file, standardcompute launch codex connects one session after a browser sign-in and leaves your own config untouched. A 404 almost always means base_url is missing /v1 or wire_api is not "responses".

Try one task before choosing a plan

  1. Check the API format and model configuration supported by your installed Codex CLI version.
  2. Run a small task on a clean branch and review the result, elapsed time and compute used.
  3. Estimate your actual monthly workload before selecting a larger allowance.
Get your API keyCodex CLI setup guide →Compare compute budgets →

Record your own results with the workload CSV and report template. These are blank templates, not published benchmark results.

Disclosure: this guide is maintained by Standard Compute, one of the options above. Choose based on task quality, supported features and total cost for your workload. Light usage may cost less on a usage-based API; sustained workloads need enough allowance on any subscription.

All flat-rate plans compared →The cheapest-tokens math →Plan compute for your team →