API reference

API reference · API

List a file batch's files

GET/v1/vector_stores/{id}/file_batches/{batchId}/filesAPI key

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.
limit (query)integer1 to 100; 20 by default. From 1 to 100.
order (query)stringBy created_at; desc by default. One of "asc", "desc".
after (query)string
before (query)string
filter (query)stringOne of "in_progress", "completed", "failed", "cancelled".

Answer 200

A page of files.

Fields of the 200 answer
FieldTypeWhat it is
object"list"
dataarray of VectorStoreFile
data[].idstring
data[].object"vector_store.file"
data[].created_atinteger
data[].vector_store_idstring
data[].statusstringOne of "in_progress", "completed", "failed", "cancelled".
data[].usage_bytesinteger
data[].last_errorobject or null
data[].last_error.codestringOne of "server_error", "unsupported_file", "invalid_file".
data[].last_error.messagestring
data[].attributesobject or nullAt most 16 pairs; keys up to 64 characters, values a string up to 512 characters, a number or a boolean.
data[].chunking_strategyobjectauto is 800 tokens overlapping by 400; static takes 100 to 4096 tokens and an overlap of at most half of that.
first_idstring or null
last_idstring or null
has_moreboolean

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