One API
One API guide
The Ocean One API is a single HTTPS front door to the Ocean platform. One base URL, one router, and every capability the platform exposes reachable from it:
https://api.plungeai.comEverything in this guide is a real route on that host. The router is a thin Hono worker
(orchestration/api-gateway/api-gateway.ts) that fronts the registry, the CNL engine, the
MCP gateway, the MCP executor, and the inference gateway over internal service bindings —
you never address those services directly.
Start here — one call, 30 seconds
Get an ozk_ key at Dashboard → One API → Keys (https://dashboard.plungeai.com), then:
curl -s -X POST https://api.plungeai.com/v1/agents/one-agent/execute \
-H "Authorization: Bearer $PLUNGE_API_KEY" -H 'Content-Type: application/json' \
-d '{"prompt":"In one sentence: what is a content delivery network?","sync":true,"max_tokens":60}'Add "stream": true and you get OpenAI-shaped chunks; send the same fields as YAML with
format: markdown and you get Markdown back. Thirty-five more pasteable calls — streaming and
not, JSON and YAML, tools, workflows, MCP, create-and-run — are in the Quickstart.
Three levels
The One API has three levels. All three stay: none is deprecated in favour of another, and they share the
one ozk_ key, the request ids and the error envelope.
| Level | What it is | Use it when | Details |
|---|---|---|---|
| 1. The compatible wire | OpenAI-shaped POST /v1/chat/completions, /v1/embeddings, /v1/completions, GET /v1/models, and the OpenRouter drop-in base /api/v1. Models only | you already have an OpenAI or OpenRouter client: swap the base URL | Models plane, OpenRouter compatibility |
| 2. Standard REST | resources with JSON bodies; YAML is accepted and returned on the same routes. Workflows (create, version, run), executions, schedules, triggers, bot policy and budgets, workspace, inbox, bindings, groups, memory, skills, templates, connections, tools, agents, discovery, traces | you manage things or call one by id: create a bot, cap its spend, answer a paused run, list schedules | the plane chapters, and Bots for the bot surface |
| 3. The Agent Call door | POST /v1/execute: the body is the program. A bare task, a workflow:, or a saved agent agent: <id>[@n]; always through the engine; dry_run, stream, and headers that say what ran | the body is the program: one call, no resource to create first | The one door |
Start with level 2; use level 3 when the body is the program. Level 2 gives every resource its own
route, status codes and ids, so it is the one to build on. Level 3 is one route that takes whatever you
send and runs it; it is also how an agent calls another agent by id. The same machine-readable contract
covers all three: GET /v1/openapi.json tags the operations Compat (level 1), Workflows, Executions,
Schedules, Triggers, Bots, Memory, Skills, Templates, Connections (level 2) and Agent Call
(level 3). The older level 2 planes (discovery, tools, agents, MCP, traces) and the meta routes carry no tag.
A level 2 call, read-only and live-verified:
curl -s "https://api.plungeai.com/v1/workflows?limit=1" \
-H "Authorization: Bearer $PLUNGE_API_KEY"The seven planes
The router groups the routes of levels 1 and 2 into planes. Every plane takes the same ozk_ platform key;
six are the execution planes, and the models plane is OpenAI-compatible. The resources that manage
bots (saved workflows, executions, schedules, triggers, permissions, memory, skills, templates, connections)
are level 2 as well and are in Bots.
| Plane | What it does | Key routes | Key |
|---|---|---|---|
| Models | OpenAI-compatible chat, embeddings, model catalog — a transparent proxy to the inference gateway with ordered fallback, sort, @preset/<slug>, guardrails, and an opt-in response cache | POST /v1/chat/completions · POST /v1/messages (Anthropic wire, 3.16) · POST /v1/embeddings · GET /v1/models · the same routes under /api/v1 (OpenRouter drop-in, 5.0) | ozk_ |
| Tools | List tool agents, read a tool's invocation contract, execute one operation behind a trust fence | GET /v1/tools · GET /v1/tools/{id} · POST /v1/tools/{id}/execute | ozk_ |
| Agents | Execute a registry agent from a prompt — sync, async pointer, or OpenAI-shaped SSE | GET /v1/agents · POST /v1/agents/{id}/execute · GET /v1/agents/results/{workflowId}/{taskId} | ozk_ |
| Workflows | Run a multi-agent CNL workflow, inline or saved, with optional SSE | POST /v1/workflows/execute · POST /v1/workflows/execute-stream · POST /v1/workflows/{id}/execute | ozk_ |
| MCP | The platform as an MCP server (inbound Streamable HTTP), plus outbound MCP runs against catalog servers — full guide: MCP developer guide | POST /v1/mcp · GET /v1/mcp/tools · POST /v1/mcp/runs | ozk_ |
| Discovery | Search and recommend across the capability registry (agents, skills, connectors, models, MCP servers, …) | GET /v1/discovery/search · POST /v1/discovery/recommend · GET /v1/discovery/cards/{type}/{id} | ozk_ |
| Traces | Read the persisted execution trace (spans + gateway request log) for one trace id | GET /v1/traces/{id} | ozk_ |
The full machine-readable route list and schemas are served at GET /v1/openapi.json
(source: orchestration/api-gateway/openapi.ts). There is also a signed, internal-only
capability plane that customer keys cannot open —
it is not one of the seven and is not documented here.
Positioning
Think of the One API as an OpenRouter-compatible models plane plus everything a model router cannot do. The models plane speaks the OpenAI wire format, so an existing OpenAI or OpenRouter integration points at it with a base-URL swap (see OpenRouter compatibility). The execution planes are the part a router has no answer for: real tools with contracts and a trust fence, registry agents, multi-agent workflows, discovery, MCP, and a persisted trace for every run.
One key
| Prefix | Opens | How you get it |
|---|---|---|
ozk_ | Every plane: models, tools, agents, workflows, MCP, discovery, traces, and the connector proxy | Your Ocean account key, at Dashboard → One API → Keys (https://dashboard.plungeai.com), or fetched by ocean-cli login / oceancode login --provider ocean after a browser sign-in; bound to your account and tier, and billed to the account's one wallet |
Everything is on https://api.plungeai.com (MCP also on https://mcp.plungeai.com). The
legacy sk-ocean- (models) and sk-conn- (connector proxy) keys are still accepted on their
own plane while integrations move over, no longer created in the Dashboard. A legacy key sent
to an execution plane is a 401 — see Authentication & keys. Full
key mechanics are in that chapter; this guide writes the key as the shell variable
$PLUNGE_API_KEY (ozk_).
How a request flows
An execution-plane call is not a thin proxy to a model. The path is router → CNL engine → agent:
- The router authenticates the
ozk_key, mints a server-sidex-request-id, and either adopts your UUIDx-trace-idor generates the trace id (api-gateway.ts). - It dispatches over an internal service binding to the CNL engine, which loads the agent
card from the registry, refuses anything not
status:activebefore dispatch, recalls memory, and runs the agent. - The agent's result is stored in SharedMemory and returned; the whole run is persisted as trace spans.
The engine hop exists on purpose: it gives every call the same history, outcome vocabulary
(ok | needs_input | needs_connection | needs_api_key | needs_approval | unavailable | error), and trust fence, whether the caller is a workflow, Ocean Studio, or you over HTTP.
The rationale is recorded in orchestration/api-gateway/log/API-SURFACE-DECISION-AND-PLAN.md
(everything routes through the engine so there is one execution path, not two).
What "live-verified" means in this guide
Every example that carries a hidden # verify / # expect: marker was run against the
deployed API and its output checked. The docs build strips the marker; a verifier
(orchestration/api-gateway/docs/guide-3.0/verify-examples.mjs) re-runs those examples with
one ozk_ key. A markered chat example sends one small request (max_tokens ≤ 16); examples
that spend more, need a connected account or change state carry no marker and say so.
60-second tour
Set your key once, then hit three planes. These three are live-verified:
curl -s https://api.plungeai.com/healthcurl -s "https://api.plungeai.com/v1/discovery/search?q=web+search&kind=agents&limit=3" \
-H "Authorization: Bearer $PLUNGE_API_KEY"curl -s "https://api.plungeai.com/v1/agents?limit=3" \
-H "Authorization: Bearer $PLUNGE_API_KEY"For a first tool call, agent call, workflow, and model completion, go straight to the Quickstart.
What's new in 3.1
- Three levels — the compatible wire, standard REST in JSON or YAML, and the Agent Call door
POST /v1/execute; start with level 2 (Three levels). - The bot surface over REST — a bot is a saved
kind: botworkflow that runs on theone-agentruntime. Save and version it, set its permissions and budgets, answer and approve its runs, schedule and trigger it, read its workspace, inbox, bindings and groups, and use memory, skills and templates (Bots). The same operations are MCP actions (MCP developer guide) andocean-cliverbs.
What's new in 3.0
- Full field-level models reference — every
/v1/chat/completionsfield with its support status (Models plane). - OpenRouter compatibility matrix — endpoint and field parity, same / differs / missing / Ocean-only (OpenRouter compatibility).
- Connectors chapter — OAuth vs API-key connectors, connected accounts, the connector proxy (Connectors).
- Agent tiers — tool agents,
one-agent(the runtime: call mode and loop mode),concierge-agent,claude-managed-agent(Agents plane). - Capability injection — skills, experts, persona, backgrounds, plugins, and MCP on harness missions (Skills, plugins & capability injection).
- SDK matrix — OpenAI SDKs,
@plungeai/one-api, LiteLLM, Vercel AI SDK, LangChain, and MCP clients (SDKs & clients). - Website copy — this guide is also published at
https://plungeai.com/docs.
Where to get help
- Docs:
https://www.plungeai.com/docs/one-api(this guide) ·GET /llms.txtandGET /llms-full.txtfor LLM tooling ·GET /v1/openapi.jsonfor the contract. - Keys and support: Requests (opens in a new tab).
- Every response carries an
x-request-id— include it when you report a problem (Traces & observability).