Sample - OpenAI API
POST/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel

Cancel a vector store file batch

Cancels processing for a file batch in a vector store. Use this action to request cancellation of file processing as soon as possible.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
vector_store_idstringrequired
The identifier of the vector store that contains the file batch.
batch_idstringrequired
The identifier of the file batch to cancel.

2 status codes
200Returns the file batch after the cancellation request, including its status and counts for files in progress, completed, failed, and cancelled.
idstringrequired
The identifier, which can be referenced in API endpoints.
objectstringrequired
The object type, which is always `vector_store.file_batch`.
Allowed:vector_store.files_batch
created_atintegerrequired
The Unix timestamp (in seconds) for when the vector store files batch was created.
vector_store_idstringrequired
The ID of the [vector store](https://developers.openai.com/api/reference/resources/vector_stores) that the [File](https://developers.openai.com/api/reference/resources/files) is attached to.
statusstringrequired
The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`.
Allowed:in_progresscompletedcancelledfailed
file_countsobjectrequired
429Returned when the request was rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

vector_store_id must identify the parent vector store, and batch_id must identify the file batch you want to cancel. A 429 is returned when the request exceeds the applicable rate limit.