Async Messages
Observe Async Chat Stream Events
Observe an asynchronous chat stream via Server-Sent Events.
This endpoint provides a Server-Sent Events stream that delivers chat completion events in real-time. The events follow the same format as synchronous chat streaming responses.
Stream Lifecycle:
- Stream initiated via POST /v1/messages/async
- Events begin flowing when processing starts
- Stream automatically closes when message completes
- Stream can be cancelled via POST /v1/messages/async/{message_id}/cancel
Notes:
- Stream remains active until message completion or cancellation
- Events are delivered in chronological order
- Connection will automatically close when stream ends
- Use appropriate SSE client libraries for robust event handling
get/v1/messages/async/{message_id}/stream
Path parameters
message_idstring required
Message ID of the asynchronous chat stream to observe.
Example:custom_msg_12345
Message ID of the asynchronous chat stream to observe.
Response
Server-sent events stream with chat completion data
{"stackTrail":"paths:/v1/messages/async/{message_id}/stream:get:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}