Embeddings

POST /llm/embeddings turns text into embedding vectors. It speaks the OpenAI embeddings format, so an existing OpenAI client works once you point it at the DataMind Platform base URL and pass the key in the x-api-key header. Use it for search, similarity checks, clustering or recommendations in your own application.

Send an embeddings request

Send a JSON body with model and input:

bash
curl https://platform.datamind.ai/llm/embeddings \
  -H "x-api-key: $DATAMIND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3-embedding-8b",
    "input": ["Quarterly revenue by region", "Monthly active customers"]
  }'

The response is the standard OpenAI embeddings response, passed through unchanged: the vectors are in data, one entry per input, and usage reports the token counts. For the key, the header rules and SDK setup, see Use the API.

The one model

Model idqwen/qwen3-embedding-8b
In GET /llm/modelsNot listed
RegionThe global route, whichever region your company is set to
RetentionZero data retention, forced on every request

The models list covers the chat models your key can call, so this model is not part of it (Models API). Call it on this endpoint.

Embeddings always run on the global route. For a company set to the EU region, this endpoint is the one deliberate exception: the Region setting does not change where embeddings run (see Settings).

Checks before a request goes out

The same guards as for chat requests apply:

When a request is refused

A request that fails the body checks is answered with status 400 and the code invalid_request, and the message says what to fix:

What arrivedThe messageWhat to do
A body that is not a JSON objectRequest body must be a JSON objectSend JSON with Content-Type: application/json.
No model, or an empty one'model' is requiredSend the model id.
Another model idUnknown embedding model "<model>" - available: qwen/qwen3-embedding-8bUse qwen/qwen3-embedding-8b.
An empty input'input' must not be emptySend text to embed.
No input, or another type'input' is required (string or array)Send a string, or an array of strings.

With Prohibit PII transmission on, input text that matches a personal-data check is refused the same way, with status 400 and the code content_filter; the request is not forwarded, and the message names the kinds of data found, never the values.

When the model side fails

Failures on the model side are relayed unchanged, with the model side's own status and body. Two outcomes come from the platform itself, in the standard error shape:

StatusCodeMessageWhat to do
502upstream_unavailableFailed to reach the upstream providerRetry shortly.
504upstream_timeoutUpstream provider timed outRetry with a short back-off.

For the full list of statuses and codes and for retry advice, see Errors and retries.

Questions, answered

Which model can I use for embeddings?

One: qwen/qwen3-embedding-8b. Any other id is refused with Unknown embedding model "<model>" - available: qwen/qwen3-embedding-8b.

Can I embed several texts in one request?

Yes. Send input as an array of strings; each string gets its own entry in the response.

What does the response look like?

The standard OpenAI embeddings response, passed through unchanged: the vectors are in data, one entry per input, and usage reports the token counts.

Are embedding requests billed?

No. An embeddings call is not billed: it draws on no plan allowance, and it does not count against the spend cap. The usual guards still apply, as for chat: your company needs an active plan, and the per-minute and concurrency limits apply. The Usage page covers how billed calls are counted.

Are embeddings processed in the EU for an EU company?

No. Embeddings always run on the global route, whichever region the company is set to; this endpoint is the one deliberate exception to region routing. The Region field is on the company card in Settings.

Do I need a special client library for embeddings?

No. Any OpenAI-compatible client works: point it at https://platform.datamind.ai/llm, pass the key in the x-api-key header, and call its embeddings method with qwen/qwen3-embedding-8b. The setup is the same as for chat requests; see Use the API.

Why was my request refused with Unknown embedding model?

The model field must be qwen/qwen3-embedding-8b, the only model the endpoint serves. Send that id and the request goes through.

What happens if my input text contains personal data?

When Prohibit PII transmission is on for your company, the input text is checked before anything is sent. A match stops the request there, with status 400 and the code content_filter, and the message names the kinds of data found, never the values. Remove the personal data and send again; an Administrator manages the policy in Settings.