> ## Documentation Index
> Fetch the complete documentation index at: https://openai-hd4n6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel vector store file batch

> Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.



## OpenAPI

````yaml api-definition.yaml post /vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel
openapi: 3.0.0
info:
  title: OpenAI API
  description: >-
    The OpenAI REST API. Please see
    https://platform.openai.com/docs/api-reference for more details.
  version: 2.3.0
  termsOfService: https://openai.com/policies/terms-of-use
  contact:
    name: OpenAI Support
    url: https://help.openai.com/
  license:
    name: MIT
    url: https://github.com/openai/openai-openapi/blob/master/LICENSE
servers:
  - url: https://api.openai.com/v1
security:
  - ApiKeyAuth: []
tags:
  - name: Assistants
    description: Build Assistants that can call models and use tools.
  - name: Audio
    description: Turn audio into text or text into audio.
  - name: Chat
    description: >-
      Given a list of messages comprising a conversation, the model will return
      a response.
  - name: Completions
    description: >-
      Given a prompt, the model will return one or more predicted completions,
      and can also return the probabilities of alternative tokens at each
      position.
  - name: Embeddings
    description: >-
      Get a vector representation of a given input that can be easily consumed
      by machine learning models and algorithms.
  - name: Evals
    description: Manage and run evals in the OpenAI platform.
  - name: Fine-tuning
    description: Manage fine-tuning jobs to tailor a model to your specific training data.
  - name: Batch
    description: Create large batches of API requests to run asynchronously.
  - name: Files
    description: >-
      Files are used to upload documents that can be used with features like
      Assistants and Fine-tuning.
  - name: Uploads
    description: Use Uploads to upload large files in multiple parts.
  - name: Images
    description: Given a prompt and/or an input image, the model will generate a new image.
  - name: Models
    description: List and describe the various models available in the API.
  - name: Moderations
    description: >-
      Given text and/or image inputs, classifies if those inputs are potentially
      harmful.
  - name: Audit Logs
    description: List user actions and configuration changes within this organization.
paths:
  /vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel:
    post:
      tags:
        - Vector stores
      summary: Cancel vector store file batch
      description: >-
        Cancel a vector store file batch. This attempts to cancel the processing
        of files in this batch as soon as possible.
      operationId: cancelVectorStoreFileBatch
      parameters:
        - in: path
          name: vector_store_id
          required: true
          schema:
            type: string
          description: The ID of the vector store that the file batch belongs to.
        - in: path
          name: batch_id
          required: true
          schema:
            type: string
          description: The ID of the file batch to cancel.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VectorStoreFileBatchObject'
components:
  schemas:
    VectorStoreFileBatchObject:
      type: object
      title: Vector store file batch
      description: A batch of files attached to a vector store.
      properties:
        id:
          description: The identifier, which can be referenced in API endpoints.
          type: string
        object:
          description: The object type, which is always `vector_store.file_batch`.
          type: string
          enum:
            - vector_store.files_batch
          x-stainless-const: true
        created_at:
          description: >-
            The Unix timestamp (in seconds) for when the vector store files
            batch was created.
          type: integer
        vector_store_id:
          description: >-
            The ID of the [vector
            store](/docs/api-reference/vector-stores/object) that the
            [File](/docs/api-reference/files) is attached to.
          type: string
        status:
          description: >-
            The status of the vector store files batch, which can be either
            `in_progress`, `completed`, `cancelled` or `failed`.
          type: string
          enum:
            - in_progress
            - completed
            - cancelled
            - failed
        file_counts:
          type: object
          properties:
            in_progress:
              description: The number of files that are currently being processed.
              type: integer
            completed:
              description: The number of files that have been processed.
              type: integer
            failed:
              description: The number of files that have failed to process.
              type: integer
            cancelled:
              description: The number of files that where cancelled.
              type: integer
            total:
              description: The total number of files.
              type: integer
          required:
            - in_progress
            - completed
            - cancelled
            - failed
            - total
      required:
        - id
        - object
        - created_at
        - vector_store_id
        - status
        - file_counts
      x-oaiMeta:
        name: The vector store files batch object
        beta: true
        example: |
          {
            "id": "vsfb_123",
            "object": "vector_store.files_batch",
            "created_at": 1698107661,
            "vector_store_id": "vs_abc123",
            "status": "completed",
            "file_counts": {
              "in_progress": 0,
              "completed": 100,
              "failed": 0,
              "cancelled": 0,
              "total": 100
            }
          }
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer

````