For AI agents: a documentation index is available at https://docs.plungeai.com/llms.txt. Append .md to any page URL, or send Accept: text/markdown, to get markdown. Setup instructions for agents are at https://docs.plungeai.com/agents.md. One ozk_ key opens every plane, models included.

Documentation Index: fetch the complete documentation index at /llms.txt. Use this file to discover all available pages before exploring further.
POST/v1/messages

Examples verified against code, not live (TI-78). Send the key as x-api-key (what the Anthropic SDKs send) or Authorization: Bearer; anthropic-version is accepted with any value. Errors wear Anthropic's envelope {type:'error', error:{type, message}, request_id}, on /v1/messages and /api/v1/messages alike.

Streaming (stream:true): message_start, then per content block content_block_start, content_block_delta (text_delta or input_json_delta) and content_block_stop, then message_delta (stop reason and usage) and message_stop. ping is the keepalive; a failure after the 200 ends the stream with an error event.

The anthropic-beta header is not forwarded upstream, so beta-gated features do not switch on. Responses carry text and tool_use blocks only.

Authorizations

Authorizationstringheaderrequired
Bearer token: Authorization: Bearer …. ozk_ key in the x-api-key header, as the Anthropic SDKs send it — POST /v1/messages only (Authorization: Bearer also works there and wins when both are sent). anthropic-version is accepted with any value.
Authorizationstringheaderrequired
Bearer token: Authorization: Bearer ozk_…. ozk_ platform API key (Authorization: Bearer ozk_…)
Authorizationstringheaderrequired
Bearer token: Authorization: Bearer sk-ocean-…. Legacy sk-ocean- inference key: still accepted on the money plane until the sk-ocean- sunset; new integrations use the ozk_ key

Body

application/json

Anthropic Messages request (POST /v1/messages), any model slug. On an anthropic/* model the body is forwarded as sent, with only model (the upstream id) and max_tokens (the capped value) set by the gateway, so cache_control, thinking, documents and server tools reach Anthropic unchanged. On any other model it is translated to the chat-completions shape; blocks with no neutral form (thinking, server tools) are not sent. Gateway directives (models, fallbacks, sort, max_cost and OpenRouter's provider, route, transforms, plugins, usage, session_id) are consumed, never forwarded.

modelstring
A model slug ("provider/model") or "@preset/<slug>". Required unless models[] is set.

Example: "anthropic/claude-haiku-4-5"

messagesobject[]required
Turns, role user or assistant. content is a string or an array of blocks: text, image (source base64 or url), tool_use, tool_result, thinking, document, … tool_result blocks become tool messages on a translated model.

Example: [{"role":"user","content":"Say hi in three words"}]

systemstring | AnthropicContentBlock[]
A string or an array of text blocks; a system message on a translated model.

Option 1

max_tokensinteger

Example: 64

stop_sequencesstring[]
stop on a translated model
streamboolean

Default: false

temperaturenumber
top_pnumber
top_kinteger
toolsobject[]
Client tools (name, description, input_schema → function.parameters on a translated model). A server tool (a type other than custom, no input_schema) only an anthropic/* model can run.
tool_choiceobject
On a translated model: auto → auto, any → required, none → none, tool → that function; disable_parallel_tool_use → parallel_tool_calls:false.
metadataobject
thinkingobject
Forwarded to anthropic/*. On a translated model, type enabled with budget_tokens becomes reasoning_effort by its share of max_tokens: ≤35% low, ≤65% medium, else high.
service_tierstring
standard_only is dropped and auto is forwarded (both the default tier); a value other than auto or default answers 400 unsupported_service_tier (the rate card prices the default tier only).
modelsstring[]
Ocean: ordered fallback candidates, as on /v1/chat/completions.
fallbacksstring[]
OpenRouter's Anthropic-skin fallback list: tried after model, at most 3 (more → 400). Ignored when models[] is set.

Maximum array length: 3

sortenum<string>

Available options: price, latency, throughput

max_costnumber
Ocean: the request’s own cost cap in USD.

Response

An Anthropic message (model = the slug that actually served it). x-request-id and the x-ocean-* headers are kept. stream:true returns text/event-stream: message_start, then per block content_block_start / content_block_delta (text_delta, input_json_delta) / content_block_stop, then message_delta (stop_reason and usage) and message_stop; ping is the keepalive, and a failure after the 200 ends the stream with an error event.

  • application/json
  • text/event-stream

Response headers

x-request-idstringfrom code
Server-minted request id; also request_id in an error body.
idstringrequired

Example: "msg_0f3c…"

typeenum<string>required

Available options: message

roleenum<string>required

Available options: assistant

modelstringrequired
contentobject[]required
stop_reasonenum<string>required
An anthropic/* upstream's own stop reason; otherwise from finish_reason (length → max_tokens, tool_calls → tool_use, content_filter → refusal, else end_turn).

Available options: end_turn, max_tokens, stop_sequence, tool_use, pause_turn, refusal

stop_sequenceany | nullrequired
usageobjectrequired

Planned: TI-33

Search is not available yet. Until it ships, use the page index or browse the sidebar.

Planned: TI-34

The docs assistant is not available yet. You can hand these docs to your own assistant instead.