
OpenAI Agents API: What It Is, What It Costs, and Who It's For
OpenAI opened the Agents API in public beta on September 10, 2026, putting the Codex harness behind one API call. Here is how it actually works, where the four walls are - models, residency, retention, billing - and who should look at a neutral runtime instead.
On September 10, 2026, OpenAI opened the Agents API in public beta: the harness that runs Codex, available as a managed service. Give it a task, a model, and tools, and you get a durable cloud agent that can run code, call MCP servers, and pick up where it left off. It is a real piece of infrastructure. It also comes with four walls that are easy to miss in the launch coverage - every one of them below links to OpenAI's own documentation.
The official launch video (3 minutes)
OpenAI's own introduction covers the capability surface. What it does not cover - where your data lives, which models you can use, and how the bill works - is the rest of this article.
What the Agents API actually is
Per the official architecture doc, the Agents API has three pieces. The harness is the agent's brain: it runs the model-and-tool loop, maintains the session, compacts context, and recovers from interruptions - hosted by OpenAI. The environment is the agent's hands: an OpenAI-hosted sandbox, or your own machine. The session is a durable working instance: give it a task, steer it mid-turn, come back tomorrow.
Capability-wise, agents can execute code in a sandbox, edit files, search the web, call your function tools, connect to MCP servers, and delegate subtasks to subagents. None of this is a new framework - it is the same engine the Codex agent inside ChatGPT uses every day.
One architectural fact worth stopping on: even when you self-host the environment (the `codex exec-server` executor runs on your machine, outbound-only), the harness still runs on OpenAI's cloud. The architecture page says it plainly: “OpenAI runs the agent harness.” Your machines do the hands-on work; the thinking, memory, and session state stay at OpenAI. That sentence is the key to every limitation below.
A session from start to finish
Create the session
Your application submits the agent configuration (model, instructions, tools) and environment needs; OpenAI provisions the environment.
Give it a task
User input starts a turn of work. The agent breaks the task down, calls tools, and runs code in the sandbox.
Follow or steer
Watch progress over the event stream or webhooks; the agent reports when it finishes, stalls, or needs a decision, and you can steer mid-turn.
Continue or close
The same session accepts new tasks with context maintained by the harness. Delete the session when done and the sandbox is reclaimed.
The four walls, with receipts
OpenAI models only
The session's model parameter accepts OpenAI model IDs and nothing else. There is no third-party model entry point - no Claude, no DeepSeek, no open weights. Source: Agents API overview.
Outside the data-residency program
OpenAI's data-residency controls let eligible customers pin data to a region (US, EU, and more), but /v1/agents is not in the supported list. Session state sits at OpenAI until you delete it. Source: data controls documentation.
No zero-retention option
OpenAI offers qualifying customers a Zero Data Retention option - and the Agents API endpoint is not eligible for it. It is one of the few endpoints that are not; abuse-monitoring logs are kept 30 days by default. Source: the endpoint table in the data controls doc.
Sandboxes billed per container-minute
OpenAI-hosted sandboxes bill at container rates, on top of model tokens. The longer and busier your agents run, the less predictable this line gets. Source: hosted sandbox documentation.
What it costs, and where the money goes
There is no flat agent price. The bill stacks three meters from the official pricing page: model tokens (usually the biggest line), hosted tool calls (web search at $10 per thousand calls, file search at $2.50), and container time (hosted sandboxes at $0.03 to $1.92 per session depending on size).
What actually blows up the bill is not the unit price - it is the loop. One agent task is not one model call; it is a loop, and every tool result gets fed back into the next call's context. One developer on Hacker News did the math: by turn ten, every call pays for a 100k-token input (the thread). Price an agent by the complete run - retries included - never by the single call.
The four runtimes inside OpenAI's lineup
OpenAI now offers four ways to run an agent, at identical rates, differing in who owns the loop and the state: the Agents API (OpenAI runs the loop - the subject of this article), the Agents SDK (open-source, the loop runs in your app), the Responses API (assemble everything yourself), and ChatKit (an embeddable chat front-end). Choosing among them is choosing how much infrastructure you want to own.
Two surfaces are on their way out: per the official deprecations page, Agent Builder (OpenAI's own drag-and-drop agent canvas) and Evals were deprecated on June 3, 2026 and shut down on November 30, 2026, with users pointed at the code-first Agents SDK.
Who it is for - and who needs a neutral runtime
The Agents API is a good fit if you are already all-in on OpenAI models, your data can live at OpenAI, and per-container billing is acceptable. If that describes you, the launch is straightforwardly good news.
If it does not - you need EU residency, a zero-retention posture, non-OpenAI models in the mix, or predictable per-seat economics - the question becomes where the harness itself lives. That is the problem Wodex Runtime is built for: the same open-source harness, running on Wodex cloud or inside your own boundary, any model routed through the gateway, sessions and audit logs in your tenant, priced per agent seat rather than per container-minute. It is marked coming soon; email [email protected] for early access.
Further reading
FAQ
- Is the Agents API the same thing as the Agents SDK?
- No. The SDK is an open-source framework where your application runs the agent loop. The Agents API is a managed service: OpenAI runs the loop and the session on its own Codex harness. Same models, same rates - different ownership of the infrastructure.
- Can I use models from other providers?
- No. Sessions only accept OpenAI model IDs. If mixed-model routing matters, you need a gateway or a neutral runtime outside OpenAI's service.
- Does self-hosting the executor keep my data at home?
- Only partly. The executor runs on your machines, but the harness - sessions, orchestration, state - runs on OpenAI's cloud regardless, and /v1/agents is outside the data-residency and zero-retention programs.
- How much does an agent cost to run?
- There is no flat fee: model tokens, hosted tool calls, and container time stack. The real driver is loop length and context growth, so cost one full task, not one call.
- What is the difference from ChatGPT's built-in agent?
- ChatGPT's agent runs on the same harness inside the ChatGPT product, with a subscription. The Agents API exposes that harness to your own application, billed by API usage.
Deploy ChatGPT with company control from day one
Wodex is the managed workstation for ChatGPT now, and the control layer for more team agents later.