Skip to main content
POST
Python (SDK)

Authorizations

Authorization
string
header
required

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Headers

X-On-Behalf-Of
string

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

Path Parameters

vector_store_id
string
required

The ID of the vector store to search.

Body

application/json

Request body for searching a vector store.

query
required

A query string for a search, or an array of query strings.

filters
object

A filter to apply based on file attributes (evaluated against each file's current attributes). A missing attribute key fails every comparison, including ne/nin; gt/gte/lt/lte are numeric-only; in/nin take an array value.

max_num_results
integer
default:10

The maximum number of results to return. This number should be between 1 and 50 inclusive.

Required range: 1 <= x <= 50
ranking_options
object

Ranking options for search.

rewrite_query
boolean
default:false

Whether to rewrite the natural language query for vector search.

Response

200 - application/json

OK

A page of search results from the vector store.

object
any
required

The object type, which is always 'vector_store.search_results.page'.

search_query
string
required

The query that was used for the search.

data
object[]
required

Array of search results.

has_more
boolean
required

Whether there are more results available.

next_page
string | null
required

Cursor for the next page of results, or null if no more results.