v1

latestOpenAPI 3.1.0MIT2026-07-132429592.7 MB
Vector stores

Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).

This endpoint is subject to a per-vector-store write rate limit of 300 requests per minute, shared with /vector_stores/{vector_store_id}/file_batches. For uploading multiple files to the same vector store, use the file batches endpoint to reduce request volume.

post/vector_stores/{vector_store_id}/files

Path parameters

vector_store_idstring required
Example:vs_abc123

The ID of the vector store for which to create a File.

Request body

file_idstring required

A File ID that the vector store should use. Useful for tools like file_search that can access files. For multi-file ingestion, we recommend file_batches to minimize per-vector-store write requests.

attributesVectorStoreFileAttributes nullable

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.

Response

OK

idstring required

The identifier, which can be referenced in API endpoints.

object'vector_store.file' required

The object type, which is always vector_store.file.

usage_bytesinteger required

The total vector store usage in bytes. Note that this may be different from the original file size.

created_atinteger required

The Unix timestamp (in seconds) for when the vector store file was created.

vector_store_idstring required

The ID of the vector store that the File is attached to.

status'in_progress' | 'completed' | 'cancelled' | 'failed' required

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.

attributesVectorStoreFileAttributes nullable

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.