Skip to main content
POST
Python (SDK)

Authorizations

Authorization
string
header
required

Send Authorization: Bearer , using an MKA1 API key for automation or an OAuth API access token for a signed-in application. Use a dynamic security callback to refresh OAuth access tokens. Browser session-only operations still require their declared cookie.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Body

application/json

Request body for creating a vector store.

name
string

The name of the vector store.

Maximum string length: 255
description
string

A description for the vector store. Can be used to describe the vector store's purpose.

file_ids
string[]

A list of File IDs that the vector store should use. Useful for tools like file_search that can access files. At most 500 per request.

Maximum array length: 500
expires_after
object

The expiration policy for a vector store.

chunking_strategy
object

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.

metadata
object

Set of 16 key-value pairs that can be attached to an object. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

embedding_model
string

The embedding model to use. Defaults to the auto-configured model if not specified.

embedding_dimensions
integer

The number of dimensions for the embedding vectors. Must equal the model's size when it is fixed, or lie within its range (embedding_dimension_range on GET /models/{model_id}). If not specified, uses the model's default dimensions. The store stays searchable only while the model's declared dimensions still include this size and the model returns embeddings of this width.

Required range: -9007199254740991 < x <= 9007199254740991
retrieval_mode
enum<string>

Retrieval mode, frozen at creation (cannot be changed later). 'hybrid' (default): vector similarity and full-text keyword search over the chunk text, fused by reciprocal rank fusion; the keyword index matches words in their written form in any language. 'vector': vector similarity search only. 'graph': GraphRAG — entities and relations are extracted from every chunk at ingest (metered against your usage) and search traverses the knowledge graph.

Available options:
vector,
hybrid,
graph
extraction_model
string

Model used for entity/relation extraction on graph stores (ingest-time triplet extraction and query-entity extraction). Defaults to the auto-configured model, resolved at creation time — same contract as embedding_model. Only valid when retrieval_mode is 'graph'.

max_hops
integer

Graph expansion depth for graph-mode queries (1-4, engine default 2). Only valid for graph stores.

Required range: 1 <= x <= 4

Response

200 - application/json

OK

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

id
string
required

The identifier, which can be referenced in API endpoints.

object
any
required

The object type, which is always 'vector_store'.

created_at
integer
required

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

Required range: -9007199254740991 <= x <= 9007199254740991
name
string | null
required

The name of the vector store.

usage_bytes
integer
required

The total number of bytes used by the files in the vector store.

Required range: -9007199254740991 <= x <= 9007199254740991
embedding_model
string | null
required

The embedding model used for this vector store. Resolved at creation time from the requested or auto model. Null for legacy vector stores.

embedding_dimensions
integer | null
required

The number of dimensions for the embedding vectors in this vector store. Null for legacy vector stores. If the embedding model's declared dimensions stop including this size, or the model returns embeddings of another width, search fails with 412 and new files fail to ingest.

Required range: 0 < x <= 9007199254740991
retrieval_mode
enum<string>
required

Retrieval mode, frozen at creation. 'hybrid' (the default for new stores): vector similarity and full-text keyword search over the chunk text, fused by reciprocal rank fusion. 'vector': vector similarity search only. 'graph': GraphRAG — entities and relations are extracted at ingest and queries traverse the knowledge graph.

Available options:
vector,
hybrid,
graph
file_counts
object
required

File processing status counts.

status
enum<string>
required

The status of the vector store. 'expired' means the store has expired, 'in_progress' means files are still being processed, 'completed' indicates that the vector store is ready for use.

Available options:
expired,
in_progress,
completed
last_active_at
integer | null
required

The Unix timestamp (in seconds) for when the vector store was last active: searched (directly or via file_search), modified, or had files ingested, re-tagged or removed. Searches update it at most once a minute; the service's own cleanup, such as removing an expired file, does not count.

Required range: -9007199254740991 <= x <= 9007199254740991
metadata
object
required

Set of 16 key-value pairs that can be attached to an object. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.

last_used_at
integer | null
required

The Unix timestamp (in seconds) for when the vector store was last used.

Required range: -9007199254740991 <= x <= 9007199254740991
extraction_model
string | null

The model used for entity/relation extraction on graph stores. Null for non-graph stores.

max_hops
integer | null

Graph expansion depth for graph-mode queries. Null for non-graph stores.

Required range: 1 <= x <= 4
expires_after
object

The expiration policy for a vector store.

expires_at
integer | null

The Unix timestamp (in seconds) for when the vector store will expire: last_active_at plus expires_after.days.

Required range: -9007199254740991 <= x <= 9007199254740991
description
string | null

A description for the vector store. Can be used to describe the vector store's purpose.