Skip to main content
POST
/
api
/
v1
/
vector_stores
/
{vector_store_id}
/
search
Search With Vector
curl --request POST \
  --url https://api.example.com/api/v1/vector_stores/{vector_store_id}/search \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query_vector": [
    123
  ],
  "limit": 5
}
'
{
  "items": [
    {
      "item": {
        "document_id": "<string>",
        "text": "<string>",
        "embedding": [
          123
        ],
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "document_type": "platform_file",
        "model_id": "platform",
        "metadata": {}
      },
      "score": 123
    }
  ],
  "total_count": 123,
  "next_page_token": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "has_more": false
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

vector_store_id
string<uuid>
required

Query Parameters

context_id
string<uuid> | null

Body

application/json

Request to search a vector store.

query_vector
number[]
required

Vector to search for

limit
integer
default:5

Maximum number of results to return

Required range: x <= 10

Response

Successful Response

items
VectorStoreSearchResult · object[]
required
total_count
integer
required
next_page_token
string<uuid> | null
required
has_more
boolean
default:false