hosting

POST /v1/vector/indexes

Create a vector index.

Всички крайни точки в hosting

Упълномощаване

Изпратете 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.

Тяло на заявката

ИмеТипЗадължителноКакво представлява
namestringДа
dimensionintegerДа
metricstring<cosine, l2, inner_product>Не

Отговор

ИмеТипЗадължителноКакво представлява
idstringДа
namestringДаLower-case, hyphenated, unique within the organisation.
dimensionintegerДаThe 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>Да
vectorsintegerДаHow many vectors the index holds.
storage_bytesintegerДа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_atstringДа

Грешки, които този крайpoint може да върне

401 · 403 · 422 · 429