Cancel vector store file batch

POSThttps:/api.openai.com/v1/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.

Response

The modified vector store file batch object.

Example request
1
curl https://api.openai.com/v1/vector_stores/vs_abc123/files_batches/vsfb_abc123/cancel \
2
-H "Authorization: Bearer $OPENAI_API_KEY" \
3
-H "Content-Type: application/json" \
4
-H "OpenAI-Beta: assistants=v2" \
5
-X POST
Example response
1
{
2
"id": "vsfb_abc123",
3
"object": "vector_store.file_batch",
4
"created_at": 1699061776,
5
"vector_store_id": "vs_abc123",
6
"status": "in_progress",
7
"file_counts": {
8
"in_progress": 12,
9
"completed": 3,
10
"failed": 0,
11
"cancelled": 0,
12
"total": 15,
13
}
14
}
Built with