Skip to content

Embeddings

Embedding models support semantic retrieval, similarity and RAG. They have a separate model kind and request surface, rather than being a Chat output mode.

  1. Configure the provider’s OpenAI embeddings or Gemini models.embed endpoint.
  2. Import or create a model with embedding output modality and check its input token price.
  3. Add the corresponding surface and upstream target, using the actual upstream model name.
  4. Test vector count and dimensions in Playground, then use Simulator for real routing and accounting.

Embedding request and response in Playground

Terminal window
curl -sS http://localhost:8787/v1/embeddings \
-H 'Authorization: Bearer sk-your-api-key' \
-H 'Content-Type: application/json' \
-d '{"model":"your-embedding-model","input":["hello","world"]}'

The upstream interprets parameters such as dimensions and encoding_format. Embeddings use the same route pools, failover and rate limits. Only reported input tokens are billed; a response without usage is not charged.

Gemini uses native :embedContent or :batchEmbedContents bodies. Default GET /v1/models excludes embeddings; use ?kind=embedding or ?kind=all to discover them.

See the embedding API reference for exact request and accounting rules.