hosting
POST /v1/vector/indexes/{indexId}/query
Find the nearest vectors.
Autentifikimi
Drgoni një çelës API si një token mbajtës. Çelësi duhet të ketë lejen vector.manage; një çelës pa të refuzohet me 403, jo 404.
Ky pikëndalim nuk pranon id të organizatës. Çelësi juaj tashmë identifikon organizatën së cilës i përket dhe përgjigjja kufizohet vetëm për atë.
Provoje
Zëvendësoni çdo gjë brenda kllapave këndore me vlerat tuaja dhe vendbanuesin e çelësit me një çelës nga paneli juaj.
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[]> }'Jeni kyçur? Konsola e API-së në panelin tuaj plotëson ID-në tuaj reale të organizatës dhe çelësin tuaj, dhe ekzekuton kërkesën kundrejt API-së live, kështu që ju mund të shihni përgjigjen aktuale. Hapni këtë pikë fundore në konsolën e API-së
Detajet
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.
Parametrat
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
indexId (path) | string | Po | The index's id. |
Trupi i kërkesës
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
values | number[] | Po | The query vector — exactly `dimension` values. |
top_k | integer | Jo | — |
filter | object | Jo | 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… |
Përgjigja
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
matches | object[] | Po | — |
Gabimet që ky pikëndalim mund të kthejë
401 · 403 · 404 · 422 · 429