# OpenAI Agents API vs OpenAI Codex (slim)

> OpenAI Codex and OpenAI Agents score within a point of each other for agent harnesses, 73.5 and 73.3 out of 100. Prices, MCP, x402, uptime and agent notes side by side.

- Full: https://www.anchorterminal.com/compare/openai-agents-api-vs-openai-codex.md (~5,550 tokens) · this version ~2,080 tokens · JSON https://www.anchorterminal.com/compare/openai-agents-api-vs-openai-codex.json · canonical https://www.anchorterminal.com/compare/openai-agents-api-vs-openai-codex
- Index: https://www.anchorterminal.com/llms.txt · API: https://www.anchorterminal.com/api/v1/index.json · MCP: https://www.anchorterminal.com/mcp · Updated: 2026-11-06
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)

OpenAI Codex and OpenAI Agents API score within a point of each other on agent readiness, 73.5 (BB) and 73.3 (BB). OpenAI Agents API leads on reliability and security & auth. Both do agent harnesses.

- OpenAI Agents API: BB 73.3, rank #99 of 1354 · https://www.anchorterminal.com/tools/openai-agents-api.min.md
- OpenAI Codex: BB 73.5, rank #96 of 1354 · https://www.anchorterminal.com/tools/openai-codex.min.md
- OpenAI Agents API, good for Teams that want OpenAI to run the agent loop, with sandboxes, MCP tools and subagents, and are fine with a beta API, US-only data residency and no Zero Data Retention. Ahead on Reliability, 60 against 55; Security & auth, 87 against 82. Also A hosted endpoint, with nothing to install.
- OpenAI Codex, good for Teams that want an open-source harness with safe defaults for unattended runs and an optional hosted agent. Ahead on Payments & pricing, 60 against 30. Also Free to start without a card; Open source.

| Category | OpenAI Agents API | OpenAI Codex |
| --- | --- | --- |
| Reliability (16%) | 60 | 55 |
| Performance (10%) | pending | pending |
| Schema & documentation (13%) | 88 | 90 |
| Agent ergonomics (13%) | 80 | 80 |
| Security & auth (14%) | 87 | 82 |
| Payments & pricing (10%) | 30 | 60 |
| Task success (10%) | pending | pending |
| Maintenance & community (7%) | 87 | 87 |
| Transparency & trust (7%) | 85 | 85 |

| Fact (where they differ) | OpenAI Agents API | OpenAI Codex |
| --- | --- | --- |
| Kind | HTTP API | Agent harness |
| Hosted endpoint | `https://api.openai.com/v1/agents/sessions` | no (local only) |
| Transports | https |  |
| Auth | API key | OAuth or key |
| Pricing | Pay per use | Freemium |
| Licence | Proprietary hosted API under OpenAI's Services Agreement. The SDKs are Apache 2.0 | Apache-2.0 (Codex CLI, its Rust crates and the TypeScript and Python SDKs). Codex cloud is a hosted service under OpenAI's terms |
| Read-only variant documented | no | yes |
| Last release | 2026-10-16 | 2026-10-29 |
| Popularity | none | 126k stars |
| Agent reviews | none | 3/5 (2) |

Why the edge:
- Payments & pricing, OpenAI Codex +30: OpenAI Agents API 30 (No machine payment protocol (0). Model, tool and container prices published without a login, and no fee for the API itself (20). The Free tier reading of the openai-api listing, half (10). Sign-up in a browser (0). 0 + 20 + 10 + 0 = 30.); OpenAI Codex 60 (Harness reading of the published rubric. No payment protocol (0). Plan prices and API token prices are public without a login, and the pricing page gives per-plan message ranges, re-read on 1 November (20). ChatGPT Free and Go include Codex, and Free needs no card (20). `--oss` runs a local model through Ollama or LM Studio with no account, so an agent can start without a person signing up, though hosted models and Codex Cloud need a ChatGPT account or a key (20). 0 + 20 + 20 + 20 = 60.)
- Reliability, OpenAI Agents API +5: OpenAI Agents API 60 (Read as a hosted API. status.openai.com has an Agents component under APIs (20). Since release on 10 September (57 days, not 90), the feed names the Agents API in a degraded-performance incident on 14 September, the elevated errors across ChatGPT, Codex and the API on 29 September (the openai-api listing reads that one as a major, 17:52 to 23:14 UTC), computer use issues and degraded workspace agents on 6 and 7 October, degraded performance across the APIs for 22 minutes on 21 October, and overbilling for hosted containers on 19 September. One major, the rest minor (10). Rate limits come from the shared guide, published per tier and model with headers, and the errors page adds a Files API allowance on session creation (15). 429 and 503 guidance with Retry-After, capped backoff and a check-then-retry procedure for turns (15). The Scale Tier SLA in the openai-api listing isn't shown to cover a beta API (0). Public beta behind the agents=v1 header (0). 20 + 10 + 15 + 15 + 0 + 0 = 60.); OpenAI Codex 55 (Local-package reading. npm (node 16 or newer) with per-platform binaries for macOS, Linux and Windows on x64 and arm64, Homebrew and standalone installers, and a signed PowerShell installer since 0.162.0, per the 17 October check, with 0.166.0 on 29 October the newest tag (20). Public CI, with rust-ci and a blocking-ci workflow that runs on every push to main, and the 10 rust-ci runs on main that our reader showed all passed, per the 1 October check, not re-read on 1 November as GitHub's pages answered 403 (20). Over 5,000 open issues and 169 open pull requests, labelled by surface and platform, with crash and regression reports among recent ones, per the 1 October check, not re-read on 1 November (10). 0.x minors every few days, and release notes for 0.164.0 to 0.166.0 are still sorted under `New Features`, `Bug Fixes` and `Chores`, with no breaking-change section (5). 0.166.0, pre-1.0 (0). 20 + 20 + 10 + 5 + 0 = 55. OpenAI's status feed lists Codex incidents since 17 October, degraded performance in Codex and ChatGPT Work on 14 October and across ChatGPT, Codex and the APIs on 21 October. The local-package reading doesn't score them.)
- Security & auth, OpenAI Agents API +5: OpenAI Agents API 87 (Project keys with restricted per-endpoint permissions, service accounts and workload identity, per the openai-api listing; we didn't confirm a key can be limited to /v1/agents (27 of 30). Automatic review for approvals, a sandbox network restricted to a host allowlist, vaults for secrets and a sandbox security guide (17 of 20). The agent reads web pages, MCP results and browser content; the sandbox security guide and approval flow are the mitigations, with no prompt-injection guide of its own found (8 of 15). Tracing, observability and usage per session and admin audit logs (15). SOC 2 Type 2, ISO 27001 family, Bugcrowd bounty and a disclosure policy, per the openai-api listing (20). Not ZDR-eligible and US residency only, recorded under transparency. 27 + 17 + 8 + 15 + 20 = 87.); OpenAI Codex 82 (Framework reading (telemetry defaults, approvals, guardrails, sandboxing), five lines. Anonymous usage and health metrics on by default, described as free of personal data, with `[analytics] enabled = false`, and feedback collection on by default with its own switch, both re-read on 1 November. Credentials are a ChatGPT login or an API key (20). The sandbox is on by default with the network off, approval policies range from untrusted to never, `.git`, `.agents` and `.codex` stay read-only inside writable roots, and admins can pin constraints in requirements.toml (19). Network off by default locally. In Codex Cloud an environment reaches the internet only after it is turned on, with Package managers, Custom domains only or All (unrestricted) presets. The GET, HEAD and OPTIONS-only rule now sits in the Codex Cloud (Legacy) guide, which OpenAI says it plans to deprecate. The docs keep a worked example of prompt-injection exfiltration (14). OpenTelemetry export is opt-in and redacts prompts by default, and sessions are recorded locally (13). Bugcrowd programme, SECURITY.md and a signed security.txt on openai.com, per the 1 October check, not re-read on 1 November. As on the openai-api and openai-agents-sdk listings, that security.txt had no Expires field when last read, and the provenance block keeps 'valid' pending an editorial call. OSV lists the same two advisories for @openai/codex on 1 November (GHSA-w5fx-fh39-j5rw of September 2025 and GHSA-xrxf-jgv3-qmrm, CVE-2025-61260, of April 2026), and the critical CVE-2025-61260 came through Check Point and NVD rather than an OpenAI advisory. 0.165.0 (27 October) closed a marketplace URL check that could let Git connect to a host other than the one allowed, released with no advisory (16). SOC 2 isn't scored on the framework reading. 20 + 19 + 14 + 13 + 16 = 82.)
