hosting

POST /v1/vector/indexes

Create a vector index.

Všechny koncové body hosting

Autentizace

Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění vector.manage; klíč bez něj je odmítnut s kódem 403, nikoli 404.

Tento koncový bod nevyžaduje žádné ID organizace. Váš klíč již identifikuje organizaci, ke které patří, a odpověď je na ni omezena.

Vyzvednout

Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.

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> }'

Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API

Podrobnosti

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.

Tělo požadavku

NázevTypPožadovánoCo to je
namestringAno
dimensionintegerAno
metricstring<cosine, l2, inner_product>Ne

Odpověď

NázevTypPožadovánoCo to je
idstringAno
namestringAnoLower-case, hyphenated, unique within the organisation.
dimensionintegerAnoThe width your embedding model emits, and the width reads return. Fixed at creation.
metricstring<cosine, l2, inner_product>AnoThe distance function. Fixed at creation.
statusstring<ready, deleting>Ano
vectorsintegerAnoHow many vectors the index holds.
storage_bytesintegerAnoWhat 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_atstringAno

Chyby, které může tento koncový bod vrátit

401 · 403 · 422 · 429