Skip to main content
Use this endpoint to cancel a streaming response that is currently in progress. When a user navigates away, submits a new message, or explicitly stops generation, you can call this endpoint with the stream’s ID to halt output immediately. This prevents the server from continuing to generate tokens for a response that is no longer needed.

Request

POST https://app.botsify.com/api/v1/converse/stop-stream Authorization: Bearer token — include your token in the Authorization: Bearer <token> header.

Body Parameters

string
required
The unique identifier of the stream to interrupt. This ID is returned in the initial response when you start a streaming conversation via the Converse Stream or Chat Stream endpoints.
string
required
The unique key that identifies your bot. Must match the bot_key used when the stream was started.

Example

Response

A successful request returns 200 OK confirming that the stream has been stopped.
If the stream has already completed or the stream_id is not found, the API returns a 404 Not Found response: