API reference

API reference · API

Cancel a file batch

POST/v1/vector_stores/{id}/file_batches/{batchId}/cancelAPI key

Files still being read are cancelled; what was embedded before stays billed.

Parameters

Path and query parameters
FieldTypeWhat it is
id (path)requiredstringThe vector store id, vs_ and 24 hex digits.
batchId (path)requiredstringThe file batch id, vsfb_ and 24 hex digits.

Answer 200

The batch.

Fields of the 200 answer
FieldTypeWhat it is
idstring
object"vector_store.file_batch"
created_atinteger
vector_store_idstring
statusstringOne of "in_progress", "completed", "cancelled", "failed".
file_countsobject
file_counts.in_progressinteger
file_counts.completedinteger
file_counts.failedinteger
file_counts.cancelledinteger
file_counts.totalinteger

Errors

  • 400OpenAI shaped error.
  • 401OpenAI shaped error.
  • 402OpenAI shaped error.
  • 403OpenAI shaped error.
  • 404OpenAI shaped error.
  • 429OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter