Autenticazione
Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione vector.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.
Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.
curl -X POST https://api.zinndigital.com/v1/vector/indexes/{indexId}/query \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "values": <number[]> }'Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
Returns the `top_k` nearest vectors, nearest first, optionally restricted to those whose metadata contains `filter`. `distance` is in the index's own metric, so smaller is always nearer whichever metric you chose. ⛔ A query **spends the plan's monthly query allowance**, which is why it requires `vector.manage` rather than `vector.view` — a read that costs money is not a read.
Parametri
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
indexId (path) | string | Sì | The index's id. |
Corpo della richiesta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
values | number[] | Sì | The query vector — exactly `dimension` values. |
top_k | integer | No | — |
filter | object | No | Restrict the search to vectors whose metadata contains these keys and values. Containment, not equality of the whole object, so a filter naming one key matches a vector carrying… |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
matches | object[] | Sì | — |
Errori che questo endpoint può restituire
401 · 403 · 404 · 422 · 429