Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Der Schlüssel muss über die Berechtigung vector.manage verfügen; ein Schlüssel ohne diese wird mit 403 statt 404 abgelehnt.
Dieser Endpunkt erfordert keine Organisations-ID. Ihr Schlüssel identifiziert bereits die zugehörige Organisation, und die Antwort ist entsprechend eingeschränkt.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem 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[]> }'Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
Details
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
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
indexId (path) | string | Ja | The index's id. |
Anfragekörper
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
values | number[] | Ja | The query vector — exactly `dimension` values. |
top_k | integer | Nein | — |
filter | object | Nein | 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… |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
matches | object[] | Ja | — |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 404 · 422 · 429