Skip to Content
Konduit docs

Embeddings

Vectors for search and retrieval, which models serve them, and what one costs.

POST /v1/embeddings is OpenAI's embeddings API. Send text, get back one vector per input, from a European provider konduit's routing chose for it.

curl https://api.konduit.eu/v1/embeddings \
  -H "Authorization: Bearer $KONDUIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3-embedding-8b",
    "input": ["The API is fast and reliable.", "The system reacts in time and is stable."]
  }'

The response is the provider's own, relayed unchanged: a data list with one embedding per input, in the order you sent them, and a usage object. The Konduit-Provider and Konduit-Deployment headers say who served it, as they do on a chat completion.

Which models

Every entry in GET /v1/models whose modality is embedding. model resolves exactly as it does on a chat completion — a model, a model at a provider, or one deployment id — and so does the provider sovereignty policy; see Routing and sovereignty.

The two endpoints do not share models. An embedding model sent to POST /v1/chat/completions, or a chat model sent here, is refused with 400 and model_does_not_support_endpoint, whose message names the endpoint to use. Nothing is reserved and no provider is asked.

What konduit forwards

Your body goes to the provider as you sent it, with two fields changed: model becomes the provider's own name for the deployment, and the provider policy is removed. konduit checks only that there is a model and something to embed. Everything else — encoding_format, dimensions, user, and whatever a provider adds — is forwarded untouched, and konduit adds no defaults of its own. Whether a model accepts dimensions is the provider's to answer, and a refusal comes back as upstream_invalid_request with the provider's own message.

The official SDKs ask for encoding_format: "base64" whenever you name no format, and decode the answer into floats for you; Scaleway and STACKIT both honour it, and so does the local mock-embed. A client of your own that reads embedding as an array of floats should send "encoding_format": "float".

Text and images in one vector

A multimodal embedding model takes its input as messages rather than input: text and image_url parts in one conversation-shaped request, embedded into a single vector. STACKIT documents Qwen3-VL-Embedding-8B this way:

{
  "model": "stackit/qwen3-vl-embedding-8b",
  "messages": [
    {
      "role": "user",
      "content": [
        { "type": "text", "text": "A red bicycle against a white wall." },
        { "type": "image_url", "image_url": { "url": "data:image/jpeg;base64,…" } }
      ]
    }
  ]
}

konduit forwards it like any other embeddings request. The 20 MiB request limit applies, and base64 adds a third to an image.

Large batches

A batch of hundreds of inputs at a few thousand dimensions is tens of megabytes of JSON. konduit relays the provider's response as it arrives instead of collecting it first, so it reaches you at the provider's pace and konduit never holds it — but it is not unbounded in time. One timeout covers the whole exchange, the provider computing every vector and you downloading them: 120 seconds unless the installation configures another. A client that stops reading for 30 seconds is taken for gone, sooner if the installation configures a shorter upstream idle timeout. If your batches come near either, split them.

Hanging up, or being taken for gone, does not cancel the charge. The provider has computed every vector by the time it sends the first byte, and bills for them whether or not anybody reads them, so konduit keeps reading its answer after you have gone — for up to a minute unless the installation configures another — and bills the request from the provider's usage like any other. Only a request whose usage does not reach konduit in that time is recorded for reconciliation, as described under What it costs. A batch you abandon and send again is paid for twice.

The status is committed with the first byte of the provider's body. A provider that refuses with an error is replaced by the next deployment of the model, as on a chat completion. One that answered 200 and then sends nothing is not: it computed, and bills, every vector before it sent that status, so you get a 502 upstream_error rather than the same vectors bought a second time. One that fails after it, before the whole document has reached you, has your connection cut off rather than the response finished: your client sees a broken connection, never a 200 carrying some of the vectors. Not every OpenAI SDK retries a failure that arrives after the status — openai-node does not — so treat it as a transport error and retry the request.

What it costs

An embedding is billed from the provider's own usage, at the deployment's pricing.input: an embedding model has no output price, because it generates no completion. Its entry in GET /v1/models says so with null: on an embedding entry, pricing.output and max_output_tokens are null, so a client that reads them must accept null as well as an integer. The reservation konduit opens before the request runs follows the same rule — your input, estimated, at the input price, and nothing for an output — so a 402 on this endpoint means your available credit did not cover even the estimate of the input.

A response whose usage never reaches konduit is recorded for reconciliation rather than estimated, the way a stream whose usage chunk went missing is. It is charged only if the provider's own numbers prove the usage within three days; after that konduit absorbs the cost and the request is never charged.

Scope

A key limited with scopes needs embeddings:write for this endpoint, and chat:write does not include it. A key with no scopes can call everything; see Authentication.

On this page