Resume Chat Stream
Reconnects to an in-progress chat response — the resume counterpart to POST /api/chat, which never resumes. Returns the live Server-Sent Events stream when a response is still being generated, or 204 No Content when there is nothing to resume. The chat must belong to the authenticated account.
Related endpoints
POST /api/chat— the interactive turn whose stream this resumes.POST /api/chat/runs— start a headless run, then pass the returnedchatIdhere to watch its output live.GET /api/chat/runs/{runId}— check whether that run finished (status, not content).
Authorizations
Your Recoup API key. Learn more.
Path Parameters
UUID of the chat to resume.
Query Parameters
Act on a chat belonging to another account. Only honoured for a key that is authorised for that account — an organization key may pass a member account's id; a personal key passing anyone else's is rejected with 403 Access denied to specified account_id. Omit it to act as the authenticated account.
Zero-based index of the first stream chunk to return, so a client that was already receiving this response resumes where it left off instead of replaying the whole turn.
Pass the number of chunks already received. Omit it to receive the response from the beginning — the right choice for a fresh reader such as a page load, or a client watching a headless POST /api/chat/runs run for the first time.
A long turn's stream can end before the run does; reconnecting with startIndex is how a client keeps rendering without duplicating or skipping chunks.
x >= 0Response
Server-Sent Events stream of UI message parts for the in-progress response, compatible with the Vercel AI SDK. The x-workflow-run-id response header carries the run ID for this response, and x-workflow-stream-tail-index carries the index of the last chunk known when this read was opened — a base for computing absolute positions, not a record of where the response ended.
Server-Sent Events stream containing UI message parts
