Overview
The Vector Store API lets you create collections of files for retrieval-augmented generation (RAG). Files uploaded via/v1/files can be attached to a vector store, and the store can be searched semantically to retrieve relevant passages.
Base URL
Endpoints
Authentication
All requests require a virtual key in theAuthorization header. See Authentication.
Create a vector store
Request body
Example request
Example response
List vector stores
Attach a file
Example response
List attached files
Search a vector store
Request body
Example request
Example response
Delete a vector store
Error codes
Related pages
- Files — upload files before attaching them
- Chat Completions — use retrieved context in completions
- Cookbooks: RAG Pipeline — end-to-end RAG guide