Overview
Vector stores are collections of processed files that can be used with thefile_search tool for retrieval-augmented generation. They automatically chunk, embed, and index your documents for semantic search.
Vector stores require the
OpenAI-Beta: assistants=v2 header, which is automatically added by the SDK.Create vector store
Creates a new vector store.Parameters
Name of the vector store
List of file IDs to add to the vector store
Description of the vector store’s purpose
How to chunk files. Options:
Expiration policy
Optional metadata (up to 16 key-value pairs)
Response
Unique vector store identifier
Name of the vector store
Processing status:
expired, in_progress, or completedFile processing counts:
Total bytes used by files
Unix timestamp of creation
Retrieve vector store
Retrieves a vector store by ID.Parameters
ID of the vector store
Update vector store
Modifies a vector store.Parameters
ID of the vector store to modify
New name
Updated expiration policy
Updated metadata
List vector stores
Returns a list of vector stores.Parameters
Number to return (1-100, default: 20)
Sort order:
asc or desc (default)Cursor for pagination
Cursor for reverse pagination
Delete vector store
Deletes a vector store.Parameters
ID of the vector store to delete
Search vector store
Searches a vector store for relevant chunks based on a query.Parameters
ID of the vector store to search
Search query (string or array of strings)
Maximum results to return (1-50, default: 20)
File attribute filters for narrowing search results
Ranking configuration options
Whether to rewrite the query for better vector search