Sample - OpenAI API
GET/vector_stores/{vector_store_id}/files

List vector store files

Lists the files attached to a vector store. Use filter to select files by processing status and cursor parameters to navigate through the result set.

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

6 parameters
vector_store_idstringrequired
The identifier of the vector store whose files to list.
limitintegeroptional
Maximum number of files to return, from 1 to 100. Defaults to 20 when omitted.
Default:20
orderstringoptional
Sort order by creation time: `asc` or `desc`. Defaults to `desc` when omitted.
Allowed:ascdescDefault:desc
afterstringoptional
Cursor object ID after which to return the next page of files.
beforestringoptional
Cursor object ID before which to return the previous page of files.
filterstringoptional
Filter files by status: `in_progress`, `completed`, `failed`, or `cancelled.
Allowed:in_progresscompletedfailedcancelled

2 status codes
200Returns a paginated collection of vector store file objects, including usage, creation time, status, errors, chunking details, attributes, and pagination metadata.
objectstringrequired
dataarray<VectorStoreFiles>required
first_idstringrequired
last_idstringrequired
has_morebooleanrequired
429Returned when the request was rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

filter must be one of in_progress, completed, failed, or cancelled when supplied. limit must be between 1 and 100, and a 429 is returned when the request exceeds the applicable rate limit.