hosting

POST /v1/vector/indexes

Create a vector index.

همه نقاط پایانی hosting

احراز هویت

یک کلید API را به عنوان یک توکن حامل ارسال کنید. این کلید باید دارای مجوز 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