GET/vector_stores/{vector_store_id}/files/{file_id}

Retrieve a file from a vector store

Retrieves a file attachment and its processing details from a vector store. Use vector_store_id and file_id to identify the attachment whose status and configuration you need.

2 parameters
vector_store_idstringrequired
The unique identifier of the vector store that contains the file.
file_idstringrequired
The unique identifier of the file attachment to retrieve.

4 status codes
200Returns the vector store file object, including its identifier, processing status, usage, chunking strategy, and attributes.
idstringrequired
The identifier, which can be referenced in API endpoints.
objectstringrequired
The object type, which is always `vector_store.file`.
Allowed:vector_store.file
usage_bytesintegerrequired
The total vector store usage in bytes. Note that this may be different from the original file size.
created_atintegerrequired
The Unix timestamp (in seconds) for when the vector store file 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 file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.
Allowed:in_progresscompletedcancelledfailed
last_errorobjectrequired
The last error associated with this vector store file. Will be `null` if there are no errors.
chunking_strategyobjectoptional
The strategy used to chunk the file.
attributesobjectoptional
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
404Returned when the vector store or file is not found.
errorobjectrequired
429Returned when the request exceeds a rate limit.
errorobjectrequired
500Returned when the vector store file could not be retrieved.
errorobjectrequired

Error handling

A 404 is returned when the vector store or file is not found; a 429 indicates that the request exceeded a rate limit; and a 500 means the vector store file could not be retrieved. The vector_store_id path parameter must identify the store, and the file_id path parameter must identify a file attached to it.