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/embeddingsParameters
modelstringrequiredA Zumik alias or a concrete provider embeddings model.
inputstring | arrayrequiredA single string, or a non-empty array of strings to embed. An empty input is rejected with 400.
Request
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 }
}objectstringAlways "list".
dataarrayOne embedding object per input, each with its index (matching input order) and the embedding vector.
modelstringThe model value from the request, echoed back.
usageobjectprompt_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
| HTTP | code | When |
|---|---|---|
| 400 | (none) | input is empty, or the body is malformed. |
| 401 | invalid_api_key | Missing or invalid bearer key. |
| 404 | (none) | The model does not exist. |
See the full error reference.
Chat completions
POST /v1/chat/completions. The exact OpenAI chat-completions shape, including streaming over Server-Sent Events and stream_options.include_usage.
Models
GET /v1/models and GET /v1/models/{id}. The exact OpenAI model-list shape, covering Zumik aliases and the underlying provider models.