hosting

POST /v1/vector/indexes

Create a vector index.

Semua titik akhir hosting

Pengesahan

Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran vector.manage; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.

Titik akhir ini tidak memerlukan id organisasi. Kunci anda telah mengenal pasti organisasi kepunyaannya, dan respons dis skopkan kepadanya.

Cuba

Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.

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

Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API

Butiran

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.

Badan permintaan

NamaJenisDiperlukanApakah ia
namestringYa
dimensionintegerYa
metricstring<cosine, l2, inner_product>Tidak

Respons

NamaJenisDiperlukanApakah ia
idstringYa
namestringYaLower-case, hyphenated, unique within the organisation.
dimensionintegerYaThe width your embedding model emits, and the width reads return. Fixed at creation.
metricstring<cosine, l2, inner_product>YaThe distance function. Fixed at creation.
statusstring<ready, deleting>Ya
vectorsintegerYaHow many vectors the index holds.
storage_bytesintegerYaWhat 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_atstringYa

Ralat yang boleh dikembalikan oleh titik akhir ini

401 · 403 · 422 · 429