hosting

POST /v1/vector/indexes

Create a vector index.

Tất cả các điểm cuối hosting

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền vector.manage; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.

Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

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

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

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.

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
namestring
dimensioninteger
metricstring<cosine, l2, inner_product>Không

Phản hồi

TênLoạiBắt buộcNội dung này là gì
idstring
namestringLower-case, hyphenated, unique within the organisation.
dimensionintegerThe 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>
vectorsintegerHow many vectors the index holds.
storage_bytesintegerWhat 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

Các lỗi điểm cuối này có thể trả về

401 · 403 · 422 · 429