Control plane
Create embeddings
Creates embedding vectors for the given input with the selected embedding model and debits the cost from your organization's embedding credits.
POST /v1/embeddings
- Choose an available modelCheck its input types, dimensions and price.
- Supply text or imagesSend the input items to the selected model.
- Match vectors to inputsUse each returned index to recover input order.
Before you start
Use your organization API key on the control-plane origin.
Choose an available, priced model from the embedding catalog. Requests consume embedding credits.
Request body
application/json
Limits and accepted values
- model must be a catalog id that is currently available and priced (otherwise 400 for an unknown or unavailable model, 403 for an unpriced one);
- a missing or non-string model is rejected with 422.
- input is declared optional for parsing but the route rejects an absent, null or empty-array input with 400: send a single item (a string, or an object with exactly one of text or image) or an array of items, up to the deployment's batch limit (400 above it).
- Any additional fields (for example input_type, query or document) are forwarded unchanged to the embedding service.
| Field | Type | Required |
|---|---|---|
model | string | Required |
input | any JSON | Required |
Read the result
Each item in data contains an embedding and its input index. Match that index to your original input order. dim is the vector length; usage.total_tokens reports usage for the billed request.
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. |
| 415 | Send the required Content-Type. |
| 422 | Correct the values or unsupported combination. |
| 500 | Check the outcome before retrying a write. |
| 502 | Check service availability and the write outcome. |
| 503 | Honor Retry-After when present; check write outcomes. |