Native OpenAI Responses API · Codex CLI & Desktop Ready · No Rate Walls
Codex CLI & API,pay per token.
Full native support for OpenAI Responses (/v1/responses), reasoning effort controls, and automatic prefix caching — connect Codex CLI or Desktop in seconds without a $200/month subscription.
Pick a "Codex Only" group for the lowest rate inside Codex CLI/Desktop, or choose an "External / Official" group when reusing the same key in Cursor, OpenClaw, Cherry Studio or backend services.
Hitting Plus rate limits in Codex CLI, yet hesitant to lock into $200/month for Pro? Here is how pay-as-you-go stacks up:
ZhenAPI Codex Pay-As-You-Go (Best Value)
From ¥1 · Never-expiring RMB pool · Multi-key support — Pay a few RMB on light bug-fix days and scale freely during heavy refactors
Light-to-moderate daily coding with cached inputs typically costs ¥2–¥8/day
Share one RMB balance across Codex, Claude Code, Gemini and DeepSeek
Run parallel Codex tasks without hitting single-seat subscription throttles
0%-surcharge corporate wire transfers (≥¥1,000) with Digital VAT invoices
ChatGPT Plus (Entry Plan)
$20 / mo · ~¥145 / month recurring — Good for web chat, but rolling quotas tighten quickly on large repositories
Multi-file repository tasks can exhaust CLI quota windows mid-sprint
Requires overseas card billing and risks account region flags
Locked to OpenAI models — requires separate subscriptions for Claude
ChatGPT Pro (Power Plan)
$200 / mo · ~¥1,450 / month recurring — Equivalent to hundreds of millions of discounted Codex tokens every month
Most individual developers and small teams spend far less than ¥1,450/mo per-token
Single-user seat cannot be split into per-engineer API keys with hard caps
Pooling team spend on ZhenAPI stretches the same budget across multiple developers
Two settings that guarantee a clean Codex CLI setup
Modern Codex CLI speaks the OpenAI Responses API rather than legacy Chat Completions. ZhenAPI supports streaming tool calls, reasoning summaries and prefix caching natively:
Include /v1 in base_url: Set base_url = "https://api.zhenapi.ai/v1" (unlike Claude Code, Codex requires /v1)
Set wire_api = "responses": Declare wire_api = "responses" under [model_providers.zhenapi] in ~/.codex/config.toml
Generate an sk-... key bound to a Codex / OpenAI group on the API Keys page, then run a one-click installer or Toolkit to write ~/.codex/config.toml (existing files are backed up to .bak):
macOS / Linux / WSL Script
Backs up ~/.codex/config.toml, writes the ZhenAPI Responses provider, and optionally installs Codex CLI:
Wait for the API key prompt, then right-click in PowerShell to paste your full sk-... key and press Enter:
irm https://zhenapi.ai/install/codex.ps1 | iex
Manual ~/.codex/config.toml
Place top-level model_provider and model BEFORE any [table] header and set experimental_bearer_token to your ZhenAPI key (works for both Codex CLI and Desktop):
Why does codex still prompt me to sign in with an OpenAI account after editing config.toml?
In TOML, top-level keys (model_provider = "zhenapi") must appear above every [section] header; placing them below a header nests them inside that table. Also ensure requires_openai_auth = false and experimental_bearer_token are set under [model_providers.zhenapi]. Running the one-click script or ZhenAPI Toolkit writes a clean UTF-8 config automatically.
Why am I getting 404 Not Found in Codex?
Verify that base_url ends with /v1 (https://api.zhenapi.ai/v1) and that the configured model name exists in your key’s assigned channel group on /en/pricing.
Should I choose "Codex (Codex Only)" or "Codex Pro (External)"?
Choose "Codex (Codex Only)" for the deepest discount inside official Codex CLI and Desktop. Choose "Codex Pro (External)" or "GPT Official" when reusing the key in Cursor, OpenClaw, Cherry Studio, or custom backend code.
No. Failed requests are never charged. Successful calls bill strictly by actual input, cached-input, and output tokens multiplied by your group rate, auditable in real time under Usage.
Do you support corporate bank transfers and Chinese VAT invoices for team Codex usage?
Yes. Corporate bank transfers of ¥1,000+ waive the 5% invoicing surcharge for 1:1 Chinese Digital VAT General Invoices, and commitments of ¥3,000+ support formal framework contracts. See /en/enterprise.