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

# End API Chat

> End an API chat run so it's scored right away.



## OpenAPI

````yaml post /test_framework/v1/runs/{id}/end-chat/
openapi: 3.1.0
info:
  title: Cekura API
  version: v1
  description: >-
    Complete API documentation for the Cekura platform. This API provides
    endpoints for testing, observing, and evaluating AI voice agents — including
    managing agents, running evaluators, defining metrics, and analyzing call
    quality.
servers:
  - url: https://api.cekura.ai
security: []
paths:
  /test_framework/v1/runs/{id}/end-chat/:
    post:
      tags:
        - Runs
      summary: Finish an API-chat run
      description: Finish an API-chat run
      operationId: runs-api-chat-end_2
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: A unique integer value identifying this run.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiChatFinish'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ApiChatFinish'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ApiChatFinish'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiChatFinishResponse'
          description: ''
      security:
        - api_key: []
components:
  schemas:
    ApiChatFinish:
      type: object
      description: Request body for POST /runs/{run_id}/end-chat/ (finish the chat).
      properties:
        reason:
          type: string
          description: Optional end reason, e.g. 'main_agent_ended_call'.
    ApiChatFinishResponse:
      type: object
      description: Response for POST /runs/{run_id}/end-chat/.
      properties:
        run_id:
          type: integer
        result_id:
          type: integer
        status:
          type: string
      required:
        - result_id
        - run_id
        - status
  securitySchemes:
    api_key:
      type: apiKey
      name: X-CEKURA-API-KEY
      in: header
      description: >-
        API Key Authentication. It should be included in the header of each
        request.

````