hosting

POST /v1/vector/indexes/{indexId}/query

Find the nearest vectors.

כל נקודות הקצה מסוג hosting

אימות

שלחו מפתח API כאסימון נושא (bearer token). על המפתח לכלול את הרשאה vector.manage; מפתח שאינו כולל אותה יידחה בסטטוס 403, ולא 404.

נקודת קצה זו אינה דורשת מזהה ארגון. המפתח שלך כבר מזהה את הארגון שאליו הוא שייך, והתגובה מוגבלת אליו בלבד.

נסה זאת

החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.

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[]> }'

מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API

פרטים

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.

פרמטרים

שםסוגנדרשמה זה
indexId (path)stringכןThe index's id.

גוף הבקשה

שםסוגנדרשמה זה
valuesnumber[]כןThe query vector — exactly `dimension` values.
top_kintegerלא
filterobjectלא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…

תשובה

שםסוגנדרשמה זה
matchesobject[]כן

שגיאות שנקודה קצה זו עשויה להחזיר

401 · 403 · 404 · 422 · 429