hosting

POST /v1/vector/indexes

Create a vector index.

Todos os endpoints de hosting

Autenticação

Envie uma chave de API como um token de portador. A chave deve ter a permissão vector.manage; uma chave sem ela é recusada com 403, e não 404.

Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.

Experimente

Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.

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

Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API

Detalhes

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 da requisição

NomeTipoObrigatórioO que é
namestringSim
dimensionintegerSim
metricstring<cosine, l2, inner_product>Não

Resposta

NomeTipoObrigatórioO que é
idstringSim
namestringSimLower-case, hyphenated, unique within the organisation.
dimensionintegerSimThe width your embedding model emits, and the width reads return. Fixed at creation.
metricstring<cosine, l2, inner_product>SimThe distance function. Fixed at creation.
statusstring<ready, deleting>Sim
vectorsintegerSimHow many vectors the index holds.
storage_bytesintegerSimWhat 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_atstringSim

Erros que este endpoint pode retornar

401 · 403 · 422 · 429