Skip to main content

OpenAI Codex

OpenAI's code generation model — the AI behind GitHub Copilot and code API applications

Code / DevToolsPaid

OpenAI Codex was the AI model behind GitHub Copilot and the original code generation API. Based on GPT-3, Codex was trained on billions of lines of public code and could generate, complete, translate, and explain code in 12+ programming languages. While Codex is deprecated (superseded by GPT-4o), its code generation capabilities are now integrated into GPT-4 and the OpenAI API.

Key specs
1,300,000 Developers reached via GitHub Copilot source
as of 2026-03-27

What we know

LicenseMITsource, checked 2026-11-26
Open sourceYessource, checked 2026-11-26
PricingPaidfrom our original listing, not yet re-checked
GitHub stars77,524source, checked 2026-11-26

Why it matters

  • Codex was the foundational model that proved AI code generation at scale — powering GitHub Copilot's original launch and reaching 1M+ developers.
  • Its architecture and training approach (code-specialized LLM) established the template for subsequent code AI tools from Anthropic, Google, and Meta.
  • Today's OpenAI API is where Codex's capabilities live on, with much stronger coding models.
  • Understanding Codex's history explains the current landscape of AI coding tools, most of which descend from or compete with its approach.

Key capabilities (current OpenAI API for code)

  • Code generation: Generate complete functions, classes, and modules from natural language descriptions.
  • Code completion: Auto-complete partially written code with context-aware suggestions.
  • Debugging: Identify and fix bugs — describe the error and get a corrected implementation.
  • Code explanation: Plain-English explanations of complex algorithms or unfamiliar code.
  • Refactoring: Improve code quality, extract functions, simplify logic.
  • Test generation: Write unit tests for existing functions with edge cases.
  • Cross-language translation: Convert code between Python, JavaScript, Go, TypeScript, etc.
  • SQL generation: Natural language to SQL queries for any database dialect.

Technical notes

  • Status: Codex models deprecated March 2023; replaced by OpenAI's GPT models
  • Current models: the GPT-6 family (for example gpt-6.1-sol or gpt-6-luna) through the OpenAI API
  • API: OpenAI API; pip install openai / npm install openai
  • Languages: Python, JavaScript, TypeScript, Go, Rust, Java, C/C++, Ruby, PHP, SQL, and more
  • Pricing: per token, from $0.10 (GPT-6 Luna) to $10 (GPT-6 Astra) per million input tokens
  • GitHub Copilot: now runs on a choice of current models; see GitHub Copilot

Ideal for

  • Developers building code AI applications, IDEs, or developer tools on top of the OpenAI API.
  • Organizations using GitHub Copilot who want to understand the underlying technology.
  • Teams evaluating AI models for code generation use cases in their products.

Not ideal for

  • Developers who just want AI coding assistance — use GitHub Copilot or Cursor directly rather than the raw API.
  • Local, private code generation — the API sends code to OpenAI's servers; use Ollama + CodeLlama for air-gapped environments.
  • Real-time, low-latency applications — GPT has ~1-3s latency; Groq-hosted models are faster.

See also

  • GitHub Copilot — The most widely-used coding AI, originally powered by Codex.
  • Cursor — AI IDE built on top of LLM APIs including OpenAI's models.
  • Aider — Terminal coding AI that uses OpenAI and other APIs for git-integrated development.

FAQ

What is OpenAI Codex?

OpenAI Codex was a large language model specialized for code generation, released in 2021. It powered the original GitHub Copilot and was available via API for building coding tools. Codex was trained on public GitHub code and could generate code in Python, JavaScript, Go, Ruby, TypeScript, and 7+ other languages from natural language descriptions or code comments.

Is Codex still available?

OpenAI deprecated the standalone Codex models (code-davinci-001, code-cushman-001) in March 2023. Code generation is now part of OpenAI's GPT models, which are far better at coding than the original Codex. If you were using the Codex API, migrate to a current GPT model such as `gpt-6.1-sol` through the OpenAI API.

What replaced Codex?

OpenAI's GPT models replaced Codex for code generation. They significantly outperform Codex on coding benchmarks (HumanEval), understand context better across longer files, and support code explanation, debugging, and architecture questions alongside generation. GitHub Copilot migrated from Codex to GPT-4-based models in 2023.

What can the OpenAI API do for code today?

The current OpenAI API (the GPT-6 family) handles all code tasks Codex did, plus much more: code generation, debugging, refactoring, explanation, code review, test writing, regex generation, SQL writing, shell scripting, and cross-language translation. Use the `/v1/chat/completions` endpoint with GPT for state-of-the-art code assistance.

Alternatives

Is your tool an alternative to OpenAI Codex? Sponsor this spot for 30 days, marked Sponsored.

Integrations

None listed.

Built on

For the team behind OpenAI Codex

Growth plan: from $399 a month

SEO, AI search (how ChatGPT, Perplexity and Google describe OpenAI Codex), UX, CRO and support from one account manager, with a monthly report. Includes a Featured launch on db.fyi. Starts with a free audit.

Founding offer: $299 a month for your first 3 months, plus a free case study.

Get a free audit

Listed 2026-02-28 · updated 2026-11-12