Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Vector Stores

Create vector store
vector_stores.create(**kwargs) -> VectorStore { id, created_at, file_counts, 8 more }
POST/vector_stores
Delete vector store
vector_stores.delete(vector_store_id) -> VectorStoreDeleted { id, deleted, object }
DELETE/vector_stores/{vector_store_id}
List vector stores
vector_stores.list(**kwargs) -> CursorPage<VectorStore { id, created_at, file_counts, 8 more } >
GET/vector_stores
Retrieve vector store
vector_stores.retrieve(vector_store_id) -> VectorStore { id, created_at, file_counts, 8 more }
GET/vector_stores/{vector_store_id}
Search vector store
vector_stores.search(vector_store_id, **kwargs) -> Page<VectorStoreSearchResponse { attributes, content, file_id, 2 more } >
POST/vector_stores/{vector_store_id}/search
Modify vector store
vector_stores.update(vector_store_id, **kwargs) -> VectorStore { id, created_at, file_counts, 8 more }
POST/vector_stores/{vector_store_id}
ModelsExpand Collapse
class AutoFileChunkingStrategyParam { type }

The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400.

FileChunkingStrategy = StaticFileChunkingStrategyObject { static, type } | OtherFileChunkingStrategyObject { type }

The strategy used to chunk the file.

FileChunkingStrategyParam = AutoFileChunkingStrategyParam { type } | StaticFileChunkingStrategyObjectParam { static, type }

The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty.

class OtherFileChunkingStrategyObject { type }

This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the chunking_strategy concept was introduced in the API.

class StaticFileChunkingStrategy { chunk_overlap_tokens, max_chunk_size_tokens }
class StaticFileChunkingStrategyObject { static, type }
class StaticFileChunkingStrategyObjectParam { static, type }

Customize your own chunking strategy by setting chunk size and chunk overlap.

class VectorStore { id, created_at, file_counts, 8 more }

A vector store is a collection of processed files can be used by the file_search tool.

class VectorStoreDeleted { id, deleted, object }
class VectorStoreSearchResponse { attributes, content, file_id, 2 more }

Vector StoresFile Batches

Cancel vector store file batch
vector_stores.file_batches.cancel(batch_id, **kwargs) -> VectorStoreFileBatch { id, created_at, file_counts, 3 more }
POST/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel
Create vector store file batch
vector_stores.file_batches.create(vector_store_id, **kwargs) -> VectorStoreFileBatch { id, created_at, file_counts, 3 more }
POST/vector_stores/{vector_store_id}/file_batches
List vector store files in a batch
vector_stores.file_batches.list_files(batch_id, **kwargs) -> CursorPage<VectorStoreFile { id, created_at, last_error, 6 more } >
GET/vector_stores/{vector_store_id}/file_batches/{batch_id}/files
Retrieve vector store file batch
vector_stores.file_batches.retrieve(batch_id, **kwargs) -> VectorStoreFileBatch { id, created_at, file_counts, 3 more }
GET/vector_stores/{vector_store_id}/file_batches/{batch_id}
ModelsExpand Collapse
class VectorStoreFileBatch { id, created_at, file_counts, 3 more }

A batch of files attached to a vector store.

Vector StoresFiles

Retrieve vector store file content
vector_stores.files.content(file_id, **kwargs) -> Page<FileContentResponse { text, type } >
GET/vector_stores/{vector_store_id}/files/{file_id}/content
Create vector store file
vector_stores.files.create(vector_store_id, **kwargs) -> VectorStoreFile { id, created_at, last_error, 6 more }
POST/vector_stores/{vector_store_id}/files
Delete vector store file
vector_stores.files.delete(file_id, **kwargs) -> VectorStoreFileDeleted { id, deleted, object }
DELETE/vector_stores/{vector_store_id}/files/{file_id}
List vector store files
vector_stores.files.list(vector_store_id, **kwargs) -> CursorPage<VectorStoreFile { id, created_at, last_error, 6 more } >
GET/vector_stores/{vector_store_id}/files
Retrieve vector store file
vector_stores.files.retrieve(file_id, **kwargs) -> VectorStoreFile { id, created_at, last_error, 6 more }
GET/vector_stores/{vector_store_id}/files/{file_id}
Update vector store file attributes
vector_stores.files.update(file_id, **kwargs) -> VectorStoreFile { id, created_at, last_error, 6 more }
POST/vector_stores/{vector_store_id}/files/{file_id}
ModelsExpand Collapse
class FileContentResponse { text, type }
class VectorStoreFile { id, created_at, last_error, 6 more }

A list of files attached to a vector store.

class VectorStoreFileDeleted { id, deleted, object }