The current OpenAI Codex (2025) does not provide traditional REST API endpoints in the same way that the original 2021 Codex model did. The modern Codex operates as an integrated service within ChatGPT and through the Codex CLI tool, rather than offering direct programmatic API access that developers can call from their applications. This represents a significant shift from the original Codex API that was deprecated in March 2023, which allowed developers to make HTTP requests to specific endpoints for code generation tasks. The current architecture focuses on providing a more sophisticated, agent-based experience rather than simple API calls for code completion.
Instead of traditional API endpoints, the current Codex is accessed through two primary interfaces: the ChatGPT web interface and the open-source Codex CLI tool. The CLI tool communicates with OpenAI’s backend services using the standard OpenAI API infrastructure, but it abstracts away the specific endpoint details and provides a higher-level interface for task management, code execution, and project handling. The CLI tool handles the complexity of managing sandbox environments, file operations, and task execution workflows, presenting users with simple commands rather than requiring them to construct API requests manually. This approach provides more functionality than the original API while being easier to use for complex software engineering tasks.
For developers who need programmatic integration with AI coding capabilities, OpenAI recommends using their standard API with models like GPT-4 or the newer o-series models, which have strong coding abilities even though they’re not specifically the Codex agent. These models can be accessed through the standard OpenAI API with familiar endpoints for chat completions and can handle many coding tasks, though they operate differently than the autonomous Codex agent. Enterprise users may have access to additional integration options through Microsoft’s Azure OpenAI Service, which provides enterprise-grade API access to various OpenAI models with additional security and compliance features. The shift away from direct API access for Codex reflects OpenAI’s focus on providing more sophisticated, task-oriented experiences rather than simple code generation services.