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

# Cancel batch

> Cancels an in-progress batch job.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/batches/{batch_id}/cancel
openapi: 3.1.0
info:
  title: Neosantara AI API
  description: OpenAI-compatible LLM Gateway
  version: 1.0.0
servers:
  - url: https://api.neosantara.xyz
    description: Neosantara Production Gateway
security:
  - bearerAuth: []
paths:
  /v1/batches/{batch_id}/cancel:
    post:
      tags:
        - Batches
      summary: Cancel batch
      description: Cancels an in-progress batch job.
      operationId: postV1BatchesByBatchIdCancel
      parameters:
        - schema:
            type: string
          in: path
          name: batch_id
          required: true
      responses:
        '200':
          description: Batch cancellation requested
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                    const: batch
                  status:
                    type: string
                    const: canceled
                required:
                  - id
                  - object
                  - status
        '404':
          description: Batch not found
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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