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

# Cancel batch

> Cancel a batch.
This is the equivalent of POST https://api.openai.com/v1/batcheses/{batch_id}/cancel

Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/cancel

Example Curl
```
curl https://api.uncensoredgpt.ai/v1/batches/batch_abc123/cancel         -H "Authorization: Bearer $UNCENSOREDGPT_API_KEY"         -H "Content-Type: application/json"         -X POST

```



## OpenAPI

````yaml api-reference/openapi.json post /v1/batches/{batch_id}/cancel
openapi: 3.1.0
info:
  title: UncensoredGPT API
  description: >-
    Every UncensoredGPT model through a single, OpenAI-compatible endpoint.
    Create an API key in the [UncensoredGPT
    Console](https://console.uncensoredgpt.ai), point your code at this base
    URL, and pay per token.
  version: 1.0.0
servers:
  - url: https://api.uncensoredgpt.ai
security: []
tags:
  - name: Chat
    description: >-
      Create a chat response for a list of messages. Supports streaming, tool
      calling, and vision models.
  - name: Completions
    description: Generate a text continuation for a prompt (legacy completions format).
  - name: Embeddings
    description: >-
      Turn text into a vector representation for search, retrieval, and
      clustering.
  - name: Responses
    description: >-
      The Responses API: stateful generations with tool use, plus retrieval and
      deletion of past responses.
  - name: Models
    description: List and inspect the models available to your API key.
  - name: Moderations
    description: Classify text against usage policies.
  - name: Batches
    description: >-
      Submit batches of requests for asynchronous processing within 24 hours, at
      lower cost.
  - name: Files
    description: Upload and manage files, for example Batch input files.
  - name: Images
    description: Generate or edit images from a text prompt.
  - name: Messages
    description: >-
      Call models using the Anthropic Messages format, for code that already
      targets the Anthropic API.
paths:
  /v1/batches/{batch_id}/cancel:
    post:
      tags:
        - Batches
      summary: Cancel Batch
      description: >-
        Cancel a batch.

        This is the equivalent of POST
        https://api.openai.com/v1/batcheses/{batch_id}/cancel


        Supports Identical Params as:
        https://platform.openai.com/docs/api-reference/batch/cancel


        Example Curl

        ```

        curl https://api.uncensoredgpt.ai/v1/batches/batch_abc123/cancel        
        -H "Authorization: Bearer $UNCENSOREDGPT_API_KEY"         -H
        "Content-Type: application/json"         -X POST


        ```
      operationId: cancel_batch_v1_batches__batch_id__cancel_post
      parameters:
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
            title: Batch Id
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearerAuth: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An UncensoredGPT API key created in the [UncensoredGPT
        Console](https://console.uncensoredgpt.ai).

````

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