Упълномощаване
Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението 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, за да можете да видите действителния отговор. Отворете този крайpoint в 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 | Да | — |
Грешки, които този крайpoint може да върне
401 · 403 · 422 · 429