Create a streaming run
Execute a conversation with the assistant and stream the response in real-time as newline-delimited JSON (NDJSON) — not Server-Sent Events; see the 200 response description. File attachments are automatically cleaned up after processing.
Request
- Base URLhttps://api.runbear.io
- Auth
- HTTP bearer
- or HTTP bearer
Path parameters
Unique identifier of the thread
Request body
Example request
{
"assistant_id": "0fade940-133f-49e6-bf4b-8f662186479b"
}Response
A newline-delimited JSON (NDJSON) stream: one complete JSON object per line, each terminated by \n. Despite the text/event-stream media type this is not Server-Sent Events — there is no data: prefix and no blank-line record separator, so an off-the-shelf SSE parser will not read it. Split the body on \n and JSON.parse each non-empty line, buffering any trailing partial line across reads: a line can straddle a transport chunk boundary. A *_delta event carries the whole value so far rather than an increment, so replace what you are holding instead of appending to it; note that thread.message.delta snapshots can transiently include tool-status text and are not guaranteed to grow monotonically. The stream normally ends with {"event":"done"} — a connection aborted or stalled mid-turn ends without one.
Changes
No recorded changes to this operation across all 1 revision of this API.