Autenticazione
Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione vector.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.
Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.
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> }'Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
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.
Corpo della richiesta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
name | string | Sì | — |
dimension | integer | Sì | — |
metric | string<cosine, l2, inner_product> | No | — |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
id | string | Sì | — |
name | string | Sì | Lower-case, hyphenated, unique within the organisation. |
dimension | integer | Sì | The width your embedding model emits, and the width reads return. Fixed at creation. |
metric | string<cosine, l2, inner_product> | Sì | The distance function. Fixed at creation. |
status | string<ready, deleting> | Sì | — |
vectors | integer | Sì | How many vectors the index holds. |
storage_bytes | integer | Sì | 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 | Sì | — |
Errori che questo endpoint può restituire
401 · 403 · 422 · 429