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

# Cancel Batch

> Cancel a running batch process



## OpenAPI

````yaml /gateway-openapi.json post /batches/{id}/cancel
openapi: 3.0.0
info:
  title: LLM Gateway
  description: API for LLM Gateway
  version: 1.0.0
servers:
  - url: https://{gatewayBaseURL}
    variables:
      gatewayBaseURL:
        default: gateway.truefoundry.ai
        description: Gateway base URL
    description: Gateway base URL
security:
  - AuthorizationBearer: []
tags:
  - name: Chat
  - name: Agent
  - name: Messages
  - name: MCP
  - name: Embeddings
  - name: Rerank
  - name: Responses
  - name: Image
  - name: Audio
  - name: Batch
  - name: Files
  - name: Fine-tuning
  - name: Moderations
  - name: Models
paths:
  /batches/{id}/cancel:
    post:
      tags:
        - Batch
      summary: Cancel Batch
      description: Cancel a running batch process
      parameters:
        - schema:
            type: string
            description: Batch ID.
          required: true
          name: id
          in: path
        - schema:
            type: string
            description: Optional metadata for the request
          required: false
          name: x-tfy-metadata
          in: header
        - schema:
            type: string
            description: Name of the provider
          required: false
          name: x-tfy-provider-name
          in: header
        - schema:
            type: string
            description: Azure OpenAI API version for the deployment
          required: false
          name: x-tfy-azure-api-version
          in: header
        - schema:
            type: string
            description: Vertex AI storage bucket name
          required: false
          name: x-tfy-vertex-storage-bucket-name
          in: header
        - schema:
            type: string
            description: Vertex AI region (e.g., europe-west4)
          required: false
          name: x-tfy-vertex-region
          in: header
        - schema:
            type: string
            description: Provider-specific model identifier
          required: false
          name: x-tfy-provider-model
          in: header
        - schema:
            type: string
            description: AWS S3 bucket name (Bedrock batch)
          required: false
          name: x-tfy-aws-s3-bucket
          in: header
        - schema:
            type: string
            description: AWS Bedrock model identifier
          required: false
          name: x-tfy-aws-bedrock-model
          in: header
      responses:
        '200':
          description: Batch cancelled successfully
        '404':
          description: Batch not found
components:
  securitySchemes:
    AuthorizationBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````