Skip to main content

OpenAI Codex API key setup

OpenAI's Codex coding agent — CLI (local), IDE (VS Code), Web (cloud async), Sites. GPT-5.5 with AGENTS.md, slash commands, approval modes, role plugins. ChatGPT plans add IDE and Web surfaces; rate limits scale by tier.

Get your key

  1. Open the OpenAI Codex site: openai.com/codex/
  2. Create an account and generate an API key.
  3. Paste it into the Dracon BYOK provider keys — stored encrypted (AES-256-GCM), used browser-direct, works in every Dracon tool.

Free tier

Yes. Codex CLI is free with a ChatGPT account (sign-in required). The Codex usage page or limit banner in the active CLI session is the canonical way to see remaining allowance and reset windows.

Rate limits: Codex usage: 1x tier (~20 messages/5hr, ChatGPT Plus) — base models. 5x tier (~100 messages/5hr, ChatGPT Pro) — all models. 20x tier (~200 messages/5hr, Business/Enterprise) — highest tier. Pro is higher-allowance, not unlimited. Windows reset on a 5-hour rolling basis. API-key usage is on a separate billing lane.

Connection details

Env var
OPENAI_API_KEY
Model lineup
codex-1, codex-mini, gpt-5-codex, gpt-5, gpt-4.1

Gotchas

Browser-direct chat is not available for this provider: CLI tool, not an API. Dracon provider keys still cover it for tools that run elsewhere (for example a LiteLLM chain from the Dracon Router builder).

Our verdicts on this kind of provider

Independent comparisons we keep current as pricing and free tiers shift. A guide is setup; a verdict is whether it's worth setting up.

Add your OpenAI Codex key Add this provider to a fallback list Compare free tiers