hosting

POST /v1/vector/indexes

Create a vector index.

Բոլոր hosting վերջնակետերը

Նույնականացում

Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա vector.manage թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:

Այս վերջնակետը կազմակերպության ID չի ընդունում: Ձեր բանալին արդեն իսկ նույնականացնում է այն կազմակերպությունը, որին պատկանում է, և պատասխանը սահմանափակված է դրանով:

Փորձել

Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:

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 վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ 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