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

# Stream Chat Progress

> Stream real-time progress for a chat job using Server-Sent Events (SSE).

Opens an SSE connection that streams events as the AI processes your request.
Use this with the job_id returned from POST /v1/chat/async.

Event types:
- 'intermediate': Progress updates during processing (content, sequence, timestamp).
- 'proposed_change_batch': The batch of document changes proposed for review, delivered as one
  event carrying changes[] (emitted when approval_mode is 'ask_every_time'). Changes are always
  delivered as a batch via this event.
- 'document_sync': Chunk-id sync emitted before the agent runs, so changes can reference stable ids.
- 'continue_prompt': A pause on a large edit, asking whether to continue or stop.
- 'documents_changed': Signals that one or more documents were auto-applied (with per-document
  change counts and changed chunk ids).
- 'model_fallback': Notice that the request automatically failed over to another model tier.
- 'final': Processing complete. Contains the full result with AI response and document changes.
- 'usage': Billing data emitted after 'final' (monthly_used, monthly_limit, monthly_remaining).
- 'error': An error occurred (job failed, cancelled, or not found).

Authentication: Pass a token or api_key as a query parameter (required for EventSource which cannot set headers).



## OpenAPI

````yaml /openapi.json get /v1/chat/{session_id}/stream
openapi: 3.1.0
info:
  title: Universal Document AI API
  description: AI-powered document editing with multi-tenant organization support
  version: 2.0.0
servers: []
security: []
paths:
  /v1/chat/{session_id}/stream:
    get:
      tags:
        - v1
        - chat
      summary: Stream Chat Progress
      description: >-
        Stream real-time progress for a chat job using Server-Sent Events (SSE).


        Opens an SSE connection that streams events as the AI processes your
        request.

        Use this with the job_id returned from POST /v1/chat/async.


        Event types:

        - 'intermediate': Progress updates during processing (content, sequence,
        timestamp).

        - 'proposed_change_batch': The batch of document changes proposed for
        review, delivered as one
          event carrying changes[] (emitted when approval_mode is 'ask_every_time'). Changes are always
          delivered as a batch via this event.
        - 'document_sync': Chunk-id sync emitted before the agent runs, so
        changes can reference stable ids.

        - 'continue_prompt': A pause on a large edit, asking whether to continue
        or stop.

        - 'documents_changed': Signals that one or more documents were
        auto-applied (with per-document
          change counts and changed chunk ids).
        - 'model_fallback': Notice that the request automatically failed over to
        another model tier.

        - 'final': Processing complete. Contains the full result with AI
        response and document changes.

        - 'usage': Billing data emitted after 'final' (monthly_used,
        monthly_limit, monthly_remaining).

        - 'error': An error occurred (job failed, cancelled, or not found).


        Authentication: Pass a token or api_key as a query parameter (required
        for EventSource which cannot set headers).
      operationId: stream_chat_progress_v1_chat__session_id__stream_get
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
        - name: job_id
          in: query
          required: true
          schema:
            type: string
            description: Job ID to stream progress for
            title: Job Id
          description: Job ID to stream progress for
        - name: last_sequence
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: >-
              SSE Last-Event-ID resume: only replay intermediate responses with
              sequence > this. Reconnects pass the highest sequence already
              processed so old events are NOT re-emitted; default 0 = full
              history.
            default: 0
            title: Last Sequence
          description: >-
            SSE Last-Event-ID resume: only replay intermediate responses with
            sequence > this. Reconnects pass the highest sequence already
            processed so old events are NOT re-emitted; default 0 = full
            history.
        - name: token
          in: query
          required: false
          schema:
            type: string
            description: >-
              Authentication token (query parameter for EventSource
              compatibility)
            title: Token
          description: Authentication token (query parameter for EventSource compatibility)
        - name: api_key
          in: query
          required: false
          schema:
            type: string
            description: API key (query parameter for EventSource compatibility)
            title: Api Key
          description: API key (query parameter for EventSource compatibility)
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````