אימות
שלחו מפתח API כאסימון נושא (bearer token). על המפתח לכלול את הרשאה vector.manage; מפתח שאינו כולל אותה יידחה בסטטוס 403, ולא 404.
נקודת קצה זו אינה דורשת מזהה ארגון. המפתח שלך כבר מזהה את הארגון שאליו הוא שייך, והתגובה מוגבלת אליו בלבד.
נסה זאת
החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.
curl -X POST https://api.zinndigital.com/v1/vector/indexes \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "dimension": <integer> }'מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API
פרטים
Creates an index of a fixed width and distance function. `dimension` is whatever your embedding model emits, from 1 to 3072 — it does not have to be a round number, and a width we do not store natively is held exactly rather than approximately. Above 2000 dimensions the index is stored at half precision, because pgvector's HNSW index does not accept a full-precision column wider than that. Requires `vector.manage`, and is refused if the plan's `vector_indexes` allowance is full.
גוף הבקשה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
name | string | כן | — |
dimension | integer | כן | — |
metric | string<cosine, l2, inner_product> | לא | — |
תשובה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
id | string | כן | — |
name | string | כן | Lower-case, hyphenated, unique within the organisation. |
dimension | integer | כן | The width your embedding model emits, and the width reads return. Fixed at creation. |
metric | string<cosine, l2, inner_product> | כן | The distance function. Fixed at creation. |
status | string<ready, deleting> | כן | — |
vectors | integer | כן | How many vectors the index holds. |
storage_bytes | integer | כן | What the index counts for against `vector_index_gb`. A published formula rather than a physical table size, so it is reproducible: 96 bytes of row overhead, plus the stored widt… |
created_at | string | כן | — |
שגיאות שנקודה קצה זו עשויה להחזיר
401 · 403 · 422 · 429