hosting

POST /v1/vector/indexes

Create a vector index.

Все эндпоинты hosting

Аутентификация

Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение 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, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в 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Да

Ошибки, которые может возвращать этот эндпоинт

401 · 403 · 422 · 429