API reference · Embeddings

Embeddings.

Vectors for retrieval and agent memory, next to your chat calls — same key, same origin. Seven models from 384 to 2048 dimensions, OpenAI-compatible.

Endpoint

POST/v1/embeddings

Authenticate with Authorization: Bearer sdn_.... Pass any id from the table below as model; it defaults to sdn-embed. Embeddings are included on every paid plan.

Embedding requests are never re-routed. The model you name is the model that runs — we never substitute a different one, because vectors of different widths cannot be compared against an index you have already built.

ModelDimensionsMax inputNotes
sdn-bge-small-en384512 tokens384 dimensions — the smallest index and the fastest search.
sdn-bge-base-en768512 tokensThe long-standing default English embedding.
sdn-embed-gemma-300m7682,048 tokensCompact Gemma-family embedding with a 2K input window.
sdn-bge-large-en1024512 tokensThe most accurate English embedding in the catalog.
sdn-bge-m310248,192 tokensBAAI's versatile embedding — multilingual, multi-granularity.
sdn-qwen3-embed-0.6b10248,192 tokensMultilingual retrieval with an 8K input window.
sdn-plamo-embed-1b20484,096 tokensJapanese-specialist embedding — the widest vector in the catalog.

Request parameters

ParameterTypeNotes
modelstringAny id from the table above. Defaults to sdn-embed. An unknown id returns 404 — never a substitute.
inputstring | string[] · requiredOne text or a batch — up to 2,048 items per request. Token arrays are not supported.
encoding_formatstringfloat (default) or base64.
dimensionsintegerOptional; if set it must equal the chosen model's own width — each model has one fixed output size.

Example

curl https://api.sideren.io/v1/embeddings \
  -H "authorization: Bearer $SIDEREN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "sdn-embed",
    "input": ["agent memory entry one", "agent memory entry two"]
  }'
Embed a batch of texts
{
  "object": "list",
  "data": [
    { "object": "embedding", "index": 0, "embedding": [0.013, -0.021, ...] },
    { "object": "embedding", "index": 1, "embedding": [0.007,  0.049, ...] }
  ],
  "model": "sdn-embed",
  "usage": { "prompt_tokens": 12, "total_tokens": 12 }
}
Response (shape)
Note

Vectors come back in input order — index matches the position of each text in input. Cosine similarity is the intended distance measure.

Errors

Empty input, more than 2,048 items, or a dimensions value that does not match the model return 400 with an OpenAI-shaped body. An unrecognised model returns 404. On the free plan, embeddings return 403 plan_upgrade_required. Full reference: Errors.