CheapAI
All models
OpenAI

Cheap Codex API — run OpenAI Codex CLI for less from $0.30/1M

Codex CLI without a ChatGPT subscription — up to 88% below OpenAI's official price. The /v1/responses protocol it speaks is implemented here rather than emulated, so context compaction and long agent runs behave exactly as they do on OpenAI — you pay per token instead of a flat monthly fee, and an idle week costs nothing. Setup is one provider block in config.toml.

from / 1M
$0.30
models live
7
vs OpenAI
−88%

Codex API pricing

USD per 1M tokens, next to OpenAI's official rate. Updated automatically from our live price list.

All models →
Model Input Output OpenAI Savings
GPT 6 Astra $1.48 $7.40 $10 −85%
GPT 5.5 $0.74 $4.43 $5.00 −85%
GPT 5.6 Sol $0.74 $4.36 $5.00 −85%
GPT 6 Sol $0.56 $2.88 $2.00 −72%
GPT 6.1 Sol $0.56 $2.88 $2.00 −72%
GPT 5.6 Terra $0.30 $1.77 $2.50 −88%
Codex Auto Review $0.37 $2.21 — —

Why take Codex from here

Pay per token, not per month

A ChatGPT subscription bills the same whether you ran one session or a hundred. Here a quiet week costs nothing and a heavy one costs what it actually used — the table above is the whole price list.

Native /v1/responses

Codex needs the responses protocol, and ours is the real thing, not a shim over chat/completions. Context compaction keeps working, which is what makes long sessions survivable.

No model swapping

response.model always equals what you asked for. We don't quietly route a request for the flagship to a cheaper tier — check the field yourself on any call.

How to connect Codex

Codex CLI

User-level ~/.codex/config.toml only — a project-local one is ignored. The provider id must not be "openai": that name is reserved inside Codex.

model = "gpt-5.6-sol"
model_provider = "cheapai"

[model_providers.cheapai]
name = "CheapAI"
base_url = "https://cheapai.io/v1"
env_key = "CHEAPAI_API_KEY"
wire_api = "responses"

Key for Codex

Codex reads the key from the environment variable named in env_key, and also wants ~/.codex/auth.json present.

export CHEAPAI_API_KEY="sk-..."

# ~/.codex/auth.json
{"auth_mode":"apikey","OPENAI_API_KEY":"sk-..."}

Any OpenAI SDK

Works in Cursor, Cline, Kilo Code, LangChain and anything else that lets you set a base URL.

from openai import OpenAI

client = OpenAI(
    api_key="sk-...",              # from cheapai.io/keys
    base_url="https://cheapai.io/v1",
)

Also available without a CDN: https://api.cheapai.io/v1 — use it for long requests where the model stays silent over ~2 minutes, or where the CDN is unreachable.

Full guides for every tool: documentation →

FAQ

How much does the Codex API cost here?

From $0.30 per 1M input tokens. 7 Codex models are live right now and the table above is pulled from the same price list the billing uses, so it is never stale.

Is this the real Codex, or a cheaper model behind the name?

The real thing. response.model always matches the model you requested, so you can verify it on any call without taking our word for it.

Do I still need a ChatGPT subscription?

No. Codex talks to whatever provider its config points at, so a key from here replaces the subscription entirely. You pay for tokens used instead of a fixed monthly amount.

Do I need a VPN?

No. The domain and the API are reachable worldwide, and you can top up in ₽, USDT or by card.

Is there a subscription?

Not required. The default is pay-as-you-go from a balance that doesn't expire; monthly plans exist separately and give up to 40% off, but you never have to take one.

Get a Codex API key in a minute

From $0.30/1M · pay in ₽, USDT or by card · no VPN

Get API key