hosting

POST /v1/vector/indexes

Create a vector index.

Tutti gli endpoint hosting

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

NomeTipoObbligatorioChe cos'è
namestring
dimensioninteger
metricstring<cosine, l2, inner_product>No

Risposta

NomeTipoObbligatorioChe cos'è
idstring
namestringLower-case, hyphenated, unique within the organisation.
dimensionintegerThe width your embedding model emits, and the width reads return. Fixed at creation.
metricstring<cosine, l2, inner_product>The distance function. Fixed at creation.
statusstring<ready, deleting>
vectorsintegerHow many vectors the index holds.
storage_bytesintegerWhat 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_atstring

Errori che questo endpoint può restituire

401 · 403 · 422 · 429