Cancel vector store file batch

POST /vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel

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

Path parameters

  • vector_store_id string Required

    The ID of the vector store that the file batch belongs to.

  • batch_id string Required

    The ID of the file batch to cancel.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id string Required

      The identifier, which can be referenced in API endpoints.

    • object string Required

      The object type, which is always vector_store.file_batch.

      Value is vector_store.files_batch.

    • created_at integer Required

      The Unix timestamp (in seconds) for when the vector store files batch was created.

    • vector_store_id string Required

      The ID of the vector store that the File is attached to.

    • status string Required

      The status of the vector store files batch, which can be either in_progress, completed, cancelled or failed.

      Values are in_progress, completed, cancelled, or failed.

    • file_counts object Required
      Hide file_counts attributes Show file_counts attributes object
      • in_progress integer Required

        The number of files that are currently being processed.

      • completed integer Required

        The number of files that have been processed.

      • failed integer Required

        The number of files that have failed to process.

      • cancelled integer Required

        The number of files that where cancelled.

      • total integer Required

        The total number of files.

POST /vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel
curl \
 -X POST https://api.openai.com/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "id": "string",
  "object": "vector_store.files_batch",
  "created_at": 42,
  "vector_store_id": "string",
  "status": "in_progress",
  "file_counts": {
    "in_progress": 42,
    "completed": 42,
    "failed": 42,
    "cancelled": 42,
    "total": 42
  }
}