Unispec Docs
ApiVector database

Query an index

Query by a raw `vector`, by `text` (integrated-embedding indexes), or by an existing vector `id`. On hybrid indexes a text query defaults to `mode: hybrid` — the dense ANN leg and the sparse full-text leg run concurrently and are fused with Reciprocal Rank Fusion (the fused `score` is an RRF score, not a cosine similarity). One hybrid query meters as a single vector read.

POST
/v1/indexes/{name}/query

Query by a raw vector, by text (integrated-embedding indexes), or by an existing vector id. On hybrid indexes a text query defaults to mode: hybrid — the dense ANN leg and the sparse full-text leg run concurrently and are fused with Reciprocal Rank Fusion (the fused score is an RRF score, not a cosine similarity). One hybrid query meters as a single vector read.

Authorization

TokenAuth
Authorization<token>

Project API key as Token lb-sk_...

In: header

Path Parameters

name*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/indexes/string/query" \  -H "Content-Type: application/json" \  -d '{    "text": "Where is the Eiffel Tower?",    "top_k": 3,    "include_metadata": true  }'
{  "matches": [    {      "id": "string",      "score": 0,      "values": [        0      ],      "metadata": {}    }  ]}