Zumik
v1 · OpenAI-compatible

Embeddings

POST /v1/embeddings. The OpenAI-compatible embeddings shape, taking a single string or an array of strings and returning a data list of vectors.

Create embedding vectors for text. The request and response match OpenAI's embeddings shape, so an existing client works after a base-URL swap.

Create embeddings

POST https://api.zumik.ai/v1/embeddings

Parameters

modelstringrequired

A Zumik alias or a concrete provider embeddings model.

inputstring | arrayrequired

A single string, or a non-empty array of strings to embed. An empty input is rejected with 400.

Request

curl
curl https://api.zumik.ai/v1/embeddings \
  -H "Authorization: Bearer zk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"model":"auto.cheapest","input":["first chunk","second chunk"]}'

Response

{
  "object": "list",
  "data": [
    { "object": "embedding", "index": 0, "embedding": [0.013, -0.21, 0.07, "..."] },
    { "object": "embedding", "index": 1, "embedding": [0.004, 0.18, -0.09, "..."] }
  ],
  "model": "auto.cheapest",
  "usage": { "prompt_tokens": 6, "total_tokens": 6 }
}
objectstring

Always "list".

dataarray

One embedding object per input, each with its index (matching input order) and the embedding vector.

modelstring

The model value from the request, echoed back.

usageobject

prompt_tokens and total_tokens.

When the resolved provider exposes an embeddings endpoint and a key is configured, Zumik returns real provider vectors. On an unconfigured provider or a provider failure, it returns a deterministic local vector so an integration never hard-fails in development; the response shape is identical.

Errors

HTTPcodeWhen
400(none)input is empty, or the body is malformed.
401invalid_api_keyMissing or invalid bearer key.
404(none)The model does not exist.

See the full error reference.

On this page