OpenAI Codex CLI

Looking for Codex CLI docs?

Quick-jump to the official docs. Also wondering how to connect Codex CLI through a cheaper, more reliable API? Keep scrolling.

Quick Navigation

Jump straight to the most-searched Codex CLI docs

Why connect Codex CLI through CodeGateway?

Codex CLI connects to OpenAI by default. But if you want to save money, avoid geo-restrictions, and use one key for everything — CodeGateway is the better backend.

1
Cheaper
Pay-as-you-go at official price × service markup. No hidden fees. The more you spend, the lower your markup — as low as 1.2×. No monthly fee, no minimum top-up.
2
No Geo-Restrictions
Works from mainland China, Hong Kong, Taiwan, and anywhere else — no proxy or VPN needed. Cloudflare global CDN means lower latency than direct connection in many regions.
3
One Key, All Models
The same API key works with Codex CLI, Claude Code, Cursor, ChatGPT, and any OpenAI/Anthropic-compatible tool. Switch models by changing one config line.

Set a custom API endpoint in your Codex CLI config (takes 60 seconds):

export CODEX_API_BASE_URL="https://api.codegateway.dev/v1"
export CODEX_API_KEY="sk-cg-*********here"

Codex CLI Articles

Our blog covers Codex CLI setup, configuration, MCP integration, and advanced tips

GitHub PR Governance with Claude Code: Five Automation Patterns That Actually Work
Claude CodeCodex CLI
GitHub PR Governance with Claude Code: Five Automation Patterns That Actually Work
PR governance breaks down because reviewers are overloaded, context gets lost between commits, and security checks land too late. Claude Code Action plugs into GitHub Actions and runs an AI reviewer on every PR. This guide walks through five battle-tested patterns: automatic review, path-specific review for critical code, security-focused review, on-demand deep review, and merge gating, with full workflow YAML you can paste in today.
May 20, 2026Read more
How Traditional Internet Companies Transition to AI-Native Development: A 4-Phase Roadmap
AI CodingClaude Code
How Traditional Internet Companies Transition to AI-Native Development: A 4-Phase Roadmap
Embed AI into every node of the development workflow instead of using it as an occasional accelerator. BCG data: process-redesigned AI organizations cut delivery cycles by 40-60%, tool-stacking shops only see 20-30%. This guide walks through 4 phases: offload repetitive work to Codex, human-AI code review, PRD-to-code automation, and AI-embedded CI/CD quality checks, with a real Codex walkthrough.
May 20, 2026Read more
OpenAI Codex CLI Complete Reference 2026: Docs, MCP, Subagents, Cloud
Codex CLICodeGateway
OpenAI Codex CLI Complete Reference 2026: Docs, MCP, Subagents, Cloud
The complete OpenAI Codex CLI 2026 docs companion — GPT-5.5 picker, MCP servers, AGENTS.md hierarchy, subagents, auto-review hooks, Codex Cloud tasks, screenshot input. Plus the CodeGateway proxy route for restricted regions.
May 16, 2026Read more
Codex CLI vs Claude Code 对比封面
Codex CLIClaude Code
OpenAI Codex CLI vs Anthropic Claude Code: Pick by What You're Doing
Codex CLI or Claude Code? A decision tree across 7 scenarios — price, context, protocol, ecosystem — plus a dual-key setup so you use both without lock-in.
May 8, 2026Read more

Ready to connect Codex CLI through CodeGateway?

Sign up free, top up from $5, one key unlocks all models.

Trusted by thousands of developers using Claude Code, Cursor, and Codex CLI