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

# Cancel stream

> Aborts the thread's in-flight chat run (explicit stop). Returns cancelled: false when no run is active.



## OpenAPI

````yaml /api-reference/openapi.json delete /v1/chat/stream
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/chat/stream:
    delete:
      tags:
        - Chat
      summary: Cancel stream
      description: >-
        Aborts the thread's in-flight chat run (explicit stop). Returns
        cancelled: false when no run is active.
      parameters:
        - name: threadId
          in: query
          required: true
          description: Thread identifier
          schema:
            type: string
            example: thread_2f81c04a
        - name: streamId
          in: query
          required: false
          description: >-
            The run to cancel — the X-Request-Id returned by the POST /v1/chat
            that started it. When provided, a mismatch is a no-op, so a stale
            stop cannot abort a newer run on the same thread.
          schema:
            type: string
            example: stream_5b7e93d1
      responses:
        '200':
          description: Cancellation result
          content:
            application/json:
              schema:
                type: object
                properties:
                  cancelled:
                    type: boolean
        '400':
          description: Bad request - missing threadId or organization context
      security:
        - sessionToken: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.
    sessionToken:
      type: http
      scheme: bearer
      description: >-
        Session token (`snat_…`) minted by POST /v1/token. Carries the
        organization and the end user; safe in a browser.

````