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

> 终止一个正在进行的 Devin 会话。一旦终止，该会话将无法继续。

# 终止会话



## OpenAPI

````yaml zh/v1-openapi.yaml DELETE /v1/sessions/{session_id}
openapi: 3.1.0
info:
  description: Devin v1 API：个人 API key 与服务 API key
  title: Devin API v1
  version: 1.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v1/sessions/{session_id}:
    delete:
      summary: 终止会话
      description: 终止一个处于活动状态的 Devin 会话。该会话必须尚未退出。
      operationId: terminate_session_endpoint_v1_sessions__session_id__delete
      parameters:
        - in: path
          name: session_id
          required: true
          schema:
            title: Session Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerminateSessionResponse'
          description: 成功响应
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 验证错误
components:
  schemas:
    TerminateSessionResponse:
      description: 会话成功终止时的响应。
      properties:
        detail:
          title: Detail
          type: string
      required:
        - detail
      title: TerminateSessionResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: 个人 API Key（apk_user_\*）或服务 API Key（apk_\*）
      scheme: bearer
      type: http

````