Pengesahan
Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran vector.manage; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.
Titik akhir ini tidak memerlukan id organisasi. Kunci anda telah mengenal pasti organisasi kepunyaannya, dan respons dis skopkan kepadanya.
Cuba
Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.
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[]> }'Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API
Butiran
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.
Parameter
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
indexId (path) | string | Ya | The index's id. |
Badan permintaan
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
values | number[] | Ya | The query vector — exactly `dimension` values. |
top_k | integer | Tidak | — |
filter | object | Tidak | 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… |
Respons
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
matches | object[] | Ya | — |
Ralat yang boleh dikembalikan oleh titik akhir ini
401 · 403 · 404 · 422 · 429