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

# Interrupt a Session

> Asks the runtime to stop generating. Closing the SSE connection does not stop the turn; this endpoint does. Idempotent: interrupting a session with nothing running succeeds.



## OpenAPI

````yaml POST /v1/sessions/{session_id}/interrupt
openapi: 3.0.0
info:
  title: Profy Platform API
  version: 1.0.0
  description: >-
    Platform API for building on Profy — invoke Experts, use models, report
    billing events, and manage OAuth.
servers:
  - url: https://api.profy.cn
    description: Production
security: []
paths:
  /v1/sessions/{session_id}/interrupt:
    post:
      tags:
        - Platform API
      summary: Interrupt the in-flight run
      description: >-
        Asks the runtime to stop generating. Closing the SSE connection does not
        stop the turn; this endpoint does. Idempotent: interrupting a session
        with nothing running succeeds.
      operationId: interruptSession
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Interrupted
        '401':
          description: Unauthorized
        '404':
          description: Not found
      security:
        - BearerToken: []
        - ApiKey: []
components:
  securitySchemes:
    BearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2 access token issued via POST /oauth/token
    ApiKey:
      type: http
      scheme: bearer
      description: Developer API Key (sk-pro-xxx) created at platform.profy.cn

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.