For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact usJoin the Discord
ManualAPI GuideAPI Reference
  • Overview
    • API Reference
    • Client libraries
  • API Reference
      • POSTInitiate Async Chat Stream
      • GETObserve Async Chat Stream Events
      • GETGet Async Chat Stream Status
      • POSTCancel Async Chat Stream
      • DELDelete Async Chat Stream
LogoLogo
Contact usJoin the Discord
API ReferenceAsync Messages

Observe Async Chat Stream Events

GET
https://host.com/v1/messages/async/:message_id/stream
GET
/v1/messages/async/:message_id/stream
$curl https://host.com/v1/messages/async/message_id/stream
1{
2 "key": "value"
3}
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: 1. Stream initiated via POST /v1/messages/async 2. Events begin flowing when processing starts 3. Stream automatically closes when message completes 4. 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
Was this page helpful?
Previous

Get Async Chat Stream Status

Next
Built with

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:

  1. Stream initiated via POST /v1/messages/async
  2. Events begin flowing when processing starts
  3. Stream automatically closes when message completes
  4. 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

Path parameters

message_idstringRequired
Message ID of the asynchronous chat stream to observe.

Response

This endpoint returns any.

Errors

401
Unauthorized
404
Not Found
422
Unprocessable Entity