AsyncAPI specification modeling the Server-Sent Events (SSE) stream produced by Anthropic's Claude Messages API when `"stream": true` is set on a POST to `/v1/messages`. Transport: HTTP/1.1 with `Content-Type: text/event-stream` (Server-Sent Events). The client opens a long-lived HTTP POST and the server pushes a sequence of named SSE events. Each event has an SSE event name (e.g. `event: message_stop`) and a `data:` line containing a JSON object whose `type` field matches the event name. Event flow per stream: 1. `message_start` — opens the stream with a Message object (empty content). 2. For each content block: `content_block_start`, one or more `content_block_delta` events, then `content_block_stop`. 3. One or more `message_delta` events with top-level Message updates (cumulative token usage in `usage`). 4. A final `message_stop` event. `ping` events may appear at any point. `error` events may appear during periods of high load or other failure conditions. `content_block_delta` carries a `delta` whose `type` is one of: - `text_delta` — incremental text for text content blocks - `input_json_delta` — partial JSON string for `tool_use` / `server_tool_use` - `thinking_delta` — incremental thinking content for extended-thinking blocks - `signature_delta` — final signature for a thinking block (sent just before `content_block_stop`) This specification is derived verbatim from the public Anthropic documentation at https://docs.anthropic.com/en/api/messages-streaming (currently served from https://platform.claude.com/docs/en/api/messages-streaming).
View SpecView on GitHubArtificial IntelligenceLarge Language ModelsLLMGenerative AIChatAgentsClaudeAsyncAPIEventsWebhooks
Channels
/messages
subscribesubscribeMessagesStream
Receive Anthropic Claude Messages streaming events over HTTP+SSE
Server-Sent Events stream returned by `POST https://api.anthropic.com/v1/messages` when the request body includes `"stream": true`. Each SSE frame's event name maps to one of the messages defined below; the JSON payload after `data:` carries the matching schema.
Messages
✉
MessageStart
message_start
Opens a streamed response with a Message object whose content array is empty.
✉
ContentBlockStart
content_block_start
Marks the start of a content block at a given index in the final Message.content array.
✉
ContentBlockDelta
content_block_delta
Carries a partial update for the content block at the specified index.
✉
ContentBlockStop
content_block_stop
Marks the end of the content block at the given index.
✉
MessageDelta
message_delta
Top-level updates to the final Message (stop reason, sequence) plus cumulative usage.
✉
MessageStop
message_stop
Final event on the stream; the connection is closed afterward.
✉
Ping
ping
Keep-alive event; may appear any number of times during the stream.
✉
Error
error
Error event emitted in the stream (e.g. overloaded_error during high load).
Servers
https
productionapi.anthropic.com/v1
Anthropic public REST + SSE base URL. Streaming responses are delivered over HTTP/1.1 with `Content-Type: text/event-stream` (HTTP+SSE transport). Standard request headers apply: `x-api-key`, `anthropic-version`, `content-type: application/json`.
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.