Skip to navigation

Stop conversation turn

Alpha

Stop the latest turn of a conversation, and wait until it ends. The turn then has the interrupted status, or its own status if it ended before the stop. If the turn does not end in time, the endpoint returns 202 and in_progress. This endpoint is in alpha and may change.

Path parameters

conversation_idstringRequired
The Conversation ID

Headers

xi-api-keystringOptional

Request

This endpoint expects an optional object.
turn_idstringOptionalformat: "^[1-9][0-9]*$"<=20 characters
The turn to stop. If you omit it, the endpoint stops the latest turn of the conversation. Send it so that a late stop cannot stop a newer turn.

Response

Successful Response
turn_idstring
statusenum
outputlist of objectsOptional
errorobjectOptional
required_actionslist of objectsOptional

The actions the agent waits on. Answer each client_tool_call with a client_tool_result item in input to continue.

stream_cursorstringOptional

Resume token for this turn’s event stream. Present while the turn is in progress; pass it as Last-Event-ID to stream the turn’s events.

Errors

422
Conversations Stop Turn Request Unprocessable Entity Error