type: "claude", the default) executes on one of two agent runtimes. Both are fully managed by the Agent API: they run inside the same sandbox, expose the same task lifecycle and event stream, and are interchangeable from your perspective. You normally pick a model, and the runtime follows.
The two runtimes
| Runtime | SDK | Wire protocol | Used for |
|---|---|---|---|
| Claude Agent (default) | @anthropic-ai/claude-agent-sdk | Anthropic Messages (/v1/messages) | Anthropic/Claude ids and every other provider (NVIDIA, MiniMax, xAI, Z.ai, …) |
| Codex Agent | @openai/codex-sdk | OpenAI Responses (/v1/responses) | OpenAI / Codex ids |
model (or an explicit agent override).
Selection rule
When you omitagent, the runtime is inferred from the model id. A model runs on the Codex runtime when its id:
- contains
codex, or - contains
openai/, or - contains
/gpt-or starts withgpt-, or - starts with
o1,o3, oro4
| Example model id | Runtime |
|---|---|
blackboxai/openai/gpt-5.3-codex | Codex |
blackboxai/openai/gpt-5.5 (and gpt-5.4, gpt-5.4-pro, gpt-5.4-nano) | Codex |
blackboxai/openai/o3-mini | Codex |
blackboxai/anthropic/claude-opus-4.7 / claude-sonnet-4.5 | Claude |
blackboxai/nvidia/nemotron-3-nano-30b-a3b | Claude |
blackboxai/minimax/minimax-m2.7 | Claude |
| everything else | Claude |
Explicit override — the agent field
Pass agent on the request body to force a runtime regardless of the model id:
"claude" or "codex". When set, overrides the runtime inferred from model. Omit to auto-select (default: claude). An invalid value returns 400 listing the supported agents.agent: "codex"— run a non-OpenAI model on the Codex (Responses) runtime.agent: "claude"— run an OpenAI-shaped id on the Claude (Messages) runtime.
agent field is accepted by POST /api/v1/tasks and POST /api/v1/benchmarks/runs.
Continuation —
POST /api/v1/tasks/:id/continue follows an inheritance rule: omit both model and agent to inherit the original run’s model and runtime; if you change model (or the runtime), you must pass agent explicitly. This lets a follow-up keep a codex+opus override intact, while making any runtime change explicit.Event stream contract
Both runtimes emit the same event types overGET /api/v1/tasks/:id/logs/stream and GET /api/v1/agent/stream. Your stream-consuming code does not need to know which runtime produced the events.
Event type | Meaning |
|---|---|
start | Run started. |
session-init | Sandbox/session initialized; carries session metadata. |
text-start / text-delta / text-end | Assistant text — streamed token deltas bracketed by start/end. |
tool-call-start | The agent invoked a tool (e.g. Bash, Read, Write, or a Codex command_execution). |
tool-input-available | Full tool input/arguments are available. |
tool-output-available | Tool finished; output/result is available. |
delegate-to-sandbox | The orchestrator delegated work to the sandbox agent. |
result | Terminal run result (success/failure + summary). |
error | An error occurred during the run. |
finish | Stream finished. |
Codex specifics
- Wire protocol — the Codex runtime talks to the router’s OpenAI Responses API (
/v1/responses). Codex models are configuredmode: responsesend-to-end. - Reasoning — pass
reasoning.effort(minimal|low|medium|high) the same way you would on the Responses API; it is honored by the Codex runtime. - Tool use — Codex executes shell/file work via
command_execution; these surface through the sametool-call-start/tool-output-availableevents as Claude’s tools.
Managed sandbox & SDKs
Both runtimes run inside the same managed Vercel sandbox. The SDKs are provisioned for you — you never install anything:| Runtime | Package | Pinned version |
|---|---|---|
| Claude | @anthropic-ai/claude-agent-sdk (bundles claude-code) | 0.2.87 (claude-code 2.1.87) |
| Codex | @openai/codex-sdk | 0.138.0 |
Examples
taskId, runId, chatId, …) and every downstream endpoint — status, logs, files, continue, cancel — are identical across runtimes.
Create a Task
Start a task; pass
model and optional agent.Models
Full model list with per-model runtime mapping.
Stream Task Logs
The shared SSE event stream for both runtimes.
Benchmarks
Run benchmarks on either runtime via the same
agent field.