hosting
POST /v1/vector/indexes
Create a vector index.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу vector.manage; кључ без ње се одбија уз 403, а не 404.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
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 конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом 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 width… |
created_at | string | Да | — |
Грешке које ова крајња тачка може вратити
401 · 403 · 422 · 429