Skip to main content
Use this endpoint when you want to display the agent’s reply to the user as it is generated, token by token, rather than waiting for the full response. This creates a more responsive and engaging experience — similar to how modern AI chat interfaces work. The endpoint accepts the same inputs as the standard Converse endpoint but returns a continuous stream instead of a single payload.
The response is delivered as a Server-Sent Events (SSE) stream. You should read the response body incrementally and process each data: event as it arrives. The stream ends with a terminal event (typically data: [DONE]). Make sure your HTTP client or frontend library supports streaming responses — for example, use EventSource in the browser or a streaming-capable HTTP client on the server side.

Request

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

Body Parameters

string
required
The unique key that identifies your bot. You can find this in your Botsify dashboard under bot settings.
string
required
A unique identifier for the user’s session. Used to maintain conversation context across multiple turns.
string
A serialized string representing the current conversation context for this turn.
object[]
An array of message objects (each with role and content) representing the conversation history to provide as context.
string
Additional text to append to the prompt before it is sent to the agent — useful for injecting dynamic user attributes or retrieved data.

Example

Response

The server responds with Content-Type: text/event-stream. Each line is a SSE event delivering a token chunk. The stream terminates with data: [DONE].