{
"id": "model-transport:anthropic-messages",
"_kind": "ModelTransportProtocol",
"_file": "compute/model-transport-protocols/anthropic-messages.yaml",
"_cluster": "compute",
"attributes": {
"displayName": "Anthropic Messages",
"vendor": "Anthropic",
"specUrl": "https://docs.anthropic.com/en/api/messages",
"streamingFraming": "sse",
"toolUseSchema": "Tool calls appear as `tool_use` content blocks with `id`, `name`, and\n`input`; results are returned as `tool_result` blocks referencing the\nsame `id`.\n",
"thinkingChannel": "content-block",
"cacheControl": "explicit",
"firstSpecVersion": "2023-07-12",
"currentSpecVersion": "2025-04-01",
"status": "standard",
"requestBodyShape": "POST /v1/messages\nJSON body (top-level fields):\n - `model` (required, string)\n - `messages` (required, array of `{role: \"user\"|\"assistant\", content: string|ContentBlock[]}`)\n - `system` (optional, string or array of content blocks)\n - `max_tokens` (required, int)\n - `tools` (optional, array of tool definitions `{name, description, input_schema}`)\n - `tool_choice` (optional, `{type: \"auto\"|\"any\"|\"tool\", name?}`)\n - `temperature`, `top_p`, `top_k`, `stop_sequences` (optional)\n - `stream` (optional, bool)\n - `thinking` (optional, `{type: \"enabled\", budget_tokens}` for extended thinking)\n - `metadata` (optional, `{user_id?}`)\n",
"responseBodyShape": "Non-streaming response (HTTP 200 application/json):\n {\n \"id\": \"msg_...\",\n \"type\": \"message\",\n \"role\": \"assistant\",\n \"model\": \"...\",\n \"content\": [ ContentBlock, ... ],\n \"stop_reason\": \"end_turn\"|\"max_tokens\"|\"stop_sequence\"|\"tool_use\",\n \"stop_sequence\": null|string,\n \"usage\": {\n \"input_tokens\": int,\n \"output_tokens\": int,\n \"cache_creation_input_tokens\"?: int,\n \"cache_read_input_tokens\"?: int\n }\n }\n",
"streamingEventTypes": [
"message_start",
"content_block_start",
"content_block_delta",
"content_block_stop",
"message_delta",
"message_stop",
"ping",
"error"
],
"toolCallWireFormat": "A `tool_use` content block in `message.content`:\n { \"type\": \"tool_use\", \"id\": \"toolu_...\", \"name\": \"<tool_name>\", \"input\": { ... } }\n`id` is the call correlation handle echoed back on the matching tool result.\n",
"toolResultWireFormat": "A `tool_result` content block in a subsequent user-role message:\n { \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_...\",\n \"content\": string | ContentBlock[],\n \"is_error\"?: bool }\n",
"errorEnvelope": "Non-2xx response, `application/json`:\n { \"type\": \"error\",\n \"error\": { \"type\": \"invalid_request_error\"|\"authentication_error\"|\"permission_error\"|\"not_found_error\"|\"rate_limit_error\"|\"api_error\"|\"overloaded_error\"|\"request_too_large\", \"message\": string } }\nHTTP status: 400/401/403/404/413/429/500/529 according to `error.type`.\n",
"cacheControlWireFormat": "Per-content-block annotation:\n { \"type\": \"text\", \"text\": \"...\", \"cache_control\": { \"type\": \"ephemeral\", \"ttl\"?: \"5m\"|\"1h\" } }\nUp to four cache breakpoints per request. Applies to system, messages, and tools.\n",
"rateLimitSignaling": "Response headers on every request:\n - `anthropic-ratelimit-requests-limit`, `anthropic-ratelimit-requests-remaining`,\n `anthropic-ratelimit-requests-reset`\n - `anthropic-ratelimit-tokens-limit`, `anthropic-ratelimit-tokens-remaining`,\n `anthropic-ratelimit-tokens-reset`\n - `anthropic-ratelimit-input-tokens-*`, `anthropic-ratelimit-output-tokens-*`\nOn HTTP 429: `retry-after` header (seconds).\n",
"reasoningWireFormat": "A `thinking` content block:\n { \"type\": \"thinking\", \"thinking\": \"<text>\", \"signature\": \"<opaque>\" }\nRedacted variant when content is filtered server-side:\n { \"type\": \"redacted_thinking\", \"data\": \"<opaque>\" }\nBoth must be echoed back verbatim (preserving signatures) on multi-turn\ntool-use loops or extended-thinking continuations.\n",
"authHeaderFormat": "`x-api-key: <ANTHROPIC_API_KEY>`\n(Bedrock / Vertex use their respective IAM/OAuth flows instead.)\n",
"versioningHeader": "Mandatory: `anthropic-version: 2023-06-01`\nOptional opt-ins: `anthropic-beta: <feature>[,<feature>...]`\n"
},
"outgoingEdges": [
{
"from": "model-transport:anthropic-messages",
"to": "layer:3-transport",
"kind": "realizes",
"attributes": {}
},
{
"from": "model-transport:anthropic-messages",
"to": "provider:anthropic",
"kind": "served_by"
},
{
"from": "model-transport:anthropic-messages",
"to": "provider:aws-bedrock",
"kind": "served_by"
},
{
"from": "model-transport:anthropic-messages",
"to": "model:claude-opus-4-7@current",
"kind": "spoken_by"
},
{
"from": "model-transport:anthropic-messages",
"to": "transport-proxy:agent-mux-proxy",
"kind": "bridged_by"
}
],
"incomingEdges": [
{
"from": "agent-core-impl:a5c.core@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks",
"attributes": {}
},
{
"from": "agent-core-impl:claude-agent-sdk.core@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks",
"attributes": {}
},
{
"from": "agent-core-impl:claude-code.core@1.x",
"to": "model-transport:anthropic-messages",
"kind": "speaks",
"attributes": {}
},
{
"from": "agent-core-impl:claude-code-remote-control.core@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks",
"attributes": {}
},
{
"from": "agent-core-impl:cursor.core@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks",
"attributes": {}
},
{
"from": "agent-core-impl:hermes.core@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks",
"attributes": {}
},
{
"from": "agent-core-impl:langgraph.core@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks",
"attributes": {}
},
{
"from": "agent-core-impl:omp.core@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks",
"attributes": {}
},
{
"from": "agent-core-impl:openclaw.core@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks",
"attributes": {}
},
{
"from": "agent-core-impl:opencode.core@1.x",
"to": "model-transport:anthropic-messages",
"kind": "speaks",
"attributes": {}
},
{
"from": "agent-core-impl:pi.core@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks",
"attributes": {}
},
{
"from": "model:claude-haiku-4-5@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks"
},
{
"from": "model:claude-opus-3@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks"
},
{
"from": "model:claude-opus-4-5@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks"
},
{
"from": "model:claude-opus-4-6@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks"
},
{
"from": "model:claude-opus-4-7@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks"
},
{
"from": "model:claude-sonnet-3-5@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks"
},
{
"from": "model:claude-sonnet-4-5@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks"
},
{
"from": "model:claude-sonnet-4-6@current",
"to": "model-transport:anthropic-messages",
"kind": "speaks"
},
{
"from": "transport-proxy:agent-mux-proxy",
"to": "model-transport:anthropic-messages",
"kind": "bridges",
"attributes": {
"direction": "src"
}
}
]
}