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

# Cancel a batch

> Request cancellation of unfinished files.



## OpenAPI

````yaml api-reference/openapi.json POST /v1/asr/batches/{batch_id}/cancel
openapi: 3.1.0
info:
  title: Chariot API
  version: '1'
  description: >-
    Chariot is a voice AI platform built for Indian and English languages.
    Convert text into natural-sounding speech over a simple REST call, an HTTP
    audio stream, or a low-latency WebSocket, and transcribe speech to text over
    a streaming WebSocket or from a prerecorded file (Beta). This reference
    documents the public, API-key-authenticated endpoints.
  contact:
    name: Chariot Support
    email: support@chariot.in
    url: https://chariot.in
servers:
  - url: https://api.chariot.in
    description: Production
security:
  - APIKeyHeader: []
tags:
  - name: Text to Speech
    description: Convert text into speech synchronously or as a stream.
  - name: Speech to Text
    description: >-
      Transcribe prerecorded files (Beta) and review streaming speech-to-text
      sessions.
  - name: Voices
    description: Browse the voice catalog.
  - name: Account
    description: Inspect your credit balance and usage.
paths:
  /v1/asr/batches/{batch_id}/cancel:
    post:
      tags:
        - Speech to Text
      summary: Cancel a batch
      description: >-
        **Beta.** Request cancellation of unfinished files. Completed files stay
        completed. Poll until the batch reaches a terminal state; cancellation
        can race with completion.


        See the [Async transcription
        guide](/guides/speech-to-text/async-transcription).
      operationId: cancelASRBatch
      parameters:
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '202':
          description: Accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ASRAsyncBatchDetail'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Resource not found in your workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid parameters or input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ASRAsyncBatchDetail:
      properties:
        id:
          format: uuid
          title: Id
          type: string
        status:
          enum:
            - queued
            - processing
            - cancelling
            - completed
            - partially_completed
            - failed
            - cancelled
          title: Status
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        finished_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finished At
        cancel_requested_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Cancel Requested At
        counts:
          additionalProperties:
            type: integer
          title: Counts
          type: object
        items_url:
          title: Items Url
          type: string
      required:
        - id
        - status
        - created_at
        - started_at
        - finished_at
        - cancel_requested_at
        - counts
        - items_url
      title: BatchDetail
      type: object
    Error:
      type: object
      description: Standard error envelope returned by all endpoints.
      properties:
        statusCode:
          type: integer
          description: HTTP status code, echoed in the body.
        error:
          type: string
          description: Machine-readable error class name.
        message:
          type: string
          description: Human-readable description of what went wrong.
      required:
        - statusCode
        - error
        - message
  responses:
    Unauthorized:
      description: Authentication failed. The API key is missing, invalid, or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: No credentials provided
              value:
                statusCode: 401
                error: UnauthorizedException
                message: No API key or user credentials provided
            invalid:
              summary: Invalid or unknown API key
              value:
                statusCode: 401
                error: UnauthorizedException
                message: Invalid API Key or user credentials
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: chariotai-api-key
      description: >-
        Your Chariot API key, generated from the dashboard. Send it in the
        `chariotai-api-key` header on every request.

````

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