Database endpoints
Store vectors in bulk
Stores up to 100,000 dense vectors in a vector collection as one atomic batch.
POST /v1/tenants/{tenant}/vector/{table}/put_bulk
- Match the shared configurationUse compatible dimension, metric and index settings.
- Supply the vector batchInclude each vector's ID, embedding and optional metadata.
- Check the inserted totalRead accepted count and processing time.
Before you start
Use your database bearer token.
Use a collection whose dimension matches the vectors. Send the vectors envelope shown in the example, not a bare array.
Path parameters
| Field | Type | Required |
|---|---|---|
tenant | string | Required |
table | string | Required |
Headers
| Field | Type | Required | Description |
|---|---|---|---|
x-oc-db-user | string | Optional | Acting database user (role, grant and row-policy checks). Send with x-oc-db-key. |
x-oc-db-key | string | Optional | API key of the x-oc-db-user user. |
Request body
application/json
Limits and accepted values
- Envelope object, not a bare array.
- More than 100,000 vectors is a 413;
- an empty `vectors` list answers inserted 0.
- metric / quantization / index take the same values as the single put.
- `expected_generation` makes the write conditional on the collection's index generation (409 on mismatch).
| Field | Type | Required |
|---|---|---|
dim | integer | Required |
embedder | string | Optional |
expected_generation | string | Optional |
index | string | Optional |
metric | string | Optional |
quantization | string | Optional |
vectors | object[] | Required |
Fields in vectors
| Field | Type | Required |
|---|---|---|
embedding | number[] | Required |
Fields in embedding
| Field | Type | Required |
|---|---|---|
embedding | number | Optional |
| Field | Type | Required |
|---|---|---|
id | string | Required |
metadata | object | Optional |
Read the result
inserted reports the accepted vectors and elapsed_ms reports processing time. The body needs a vectors envelope with shared configuration; it is not a bare array of embeddings.
Response statuses
HTTP status reference
| Status | What to do |
|---|---|
| 200 | OK |
| 400 | Correct the request before retrying. |
| 401 | Check the credential and Authorization header. |
| 402 | Check feature access or available credits. |
| 403 | Check tenant access, roles and permissions. |
| 409 | Resolve the conflict before retrying. |
| 413 | Split or reduce the request body. |
| 415 | Send the required Content-Type. |
| 422 | Correct the values or unsupported combination. |
| 429 | Honor Retry-After when present; back off. |
| 500 | Check the outcome before retrying a write. |
| 503 | Honor Retry-After when present; check write outcomes. |