Authentication
Send an API key as a bearer token. The key must carry the vector.manage permission; a key without it is refused with 403, not 404.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
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> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
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.
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
name | string | Yes | — |
dimension | integer | Yes | — |
metric | string<cosine, l2, inner_product> | No | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
id | string | Yes | — |
name | string | Yes | Lower-case, hyphenated, unique within the organisation. |
dimension | integer | Yes | The width your embedding model emits, and the width reads return. Fixed at creation. |
metric | string<cosine, l2, inner_product> | Yes | The distance function. Fixed at creation. |
status | string<ready, deleting> | Yes | — |
vectors | integer | Yes | How many vectors the index holds. |
storage_bytes | integer | Yes | 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_at | string | Yes | — |
Errors this endpoint can return
401 · 403 · 422 · 429