hosting

POST /v1/vector/indexes

Create a vector index.

Tous les points de terminaison hosting

Authentification

Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation vector.manage ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.

Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.

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

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

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.

Corps de la requête

NomTypeObligatoireQu'est-ce que c'est
namestringOui
dimensionintegerOui
metricstring<cosine, l2, inner_product>Non

Réponse

NomTypeObligatoireQu'est-ce que c'est
idstringOui
namestringOuiLower-case, hyphenated, unique within the organisation.
dimensionintegerOuiThe width your embedding model emits, and the width reads return. Fixed at creation.
metricstring<cosine, l2, inner_product>OuiThe distance function. Fixed at creation.
statusstring<ready, deleting>Oui
vectorsintegerOuiHow many vectors the index holds.
storage_bytesintegerOuiWhat 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_atstringOui

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 422 · 429