> ## Documentation Index
> Fetch the complete documentation index at: https://docs.recoupable.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Resume Chat Stream

> Reconnects to an in-progress chat response — the resume counterpart to [`POST /api/chat`](/api-reference/chat/workflow), 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`](/api-reference/chat/workflow) — the interactive turn whose stream this resumes.
- [`POST /api/chat/runs`](/api-reference/chat/runs) — start a **headless** run, then pass the returned `chatId` here to **watch its output live**.
- [`GET /api/chat/runs/{runId}`](/api-reference/chat/runs-status) — check **whether** that run finished (status, not content).



## OpenAPI

````yaml GET /api/chat/{chatId}/stream
openapi: 3.1.0
info:
  title: Recoup API - Research
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/chat/{chatId}/stream:
    get:
      summary: Resume a chat response stream
      description: >-
        Reconnects to an in-progress chat response — the resume counterpart to
        [`POST /api/chat`](/api-reference/chat/workflow), 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`](/api-reference/chat/workflow) — the interactive
        turn whose stream this resumes.

        - [`POST /api/chat/runs`](/api-reference/chat/runs) — start a
        **headless** run, then pass the returned `chatId` here to **watch its
        output live**.

        - [`GET /api/chat/runs/{runId}`](/api-reference/chat/runs-status) —
        check **whether** that run finished (status, not content).
      parameters:
        - name: chatId
          in: path
          required: true
          description: UUID of the chat to resume.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: >-
            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.
          headers:
            x-workflow-run-id:
              description: Durable workflow run ID of the resumed run.
              schema:
                type: string
          content:
            text/event-stream:
              schema:
                type: string
                description: Server-Sent Events stream containing UI message parts
        '204':
          description: No active stream to resume for this chat.
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatStreamErrorResponse'
        '403':
          description: The authenticated account does not own the referenced chat.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatStreamErrorResponse'
        '404':
          description: Chat not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatStreamErrorResponse'
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    ChatStreamErrorResponse:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
          description: Status of the request
        message:
          type: string
          description: Error message describing what went wrong
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Recoup API key. [Learn more](/quickstart#api-keys).
    bearerAuth:
      type: http
      scheme: bearer

````