Skip to navigation

Stream conversation message

Alpha

Send input to a conversation, and stream the events of the request as server-sent events. The last event is stream_ended, which has the outcome of the turn. This endpoint is in alpha and may change.

Path parameters

conversation_idstringRequired
The Conversation ID

Headers

xi-api-keystringOptional

Request

This endpoint expects an object.
inputlist of objectsRequired

Either one user_message, which starts a new turn, or client_tool_result items, which answer the required_actions of the waiting turn and continue it. Calls that they leave out stay pending. Client tools wait with no timeout. While calls are pending, a user_message is rejected. A user_message can come with contextual_update items, at most one per context_id. client_tool_result items that answer every pending call can come with end updates.

Response

Server-sent events. Each event has the stream cursor as its id, the event type as its event, and a stream envelope as its data.

conversation_idstring
turn_idstring
created_at_unix_msinteger
eventobject

Errors

422
Conversations Send Message Stream Request Unprocessable Entity Error