Skip to content
All use cases

EmbeddingsSDKs · Free

Embed text for search and RAG

POST /api/v1/embeddings takes the OpenAI request shape. Embedding models bill per input token, or run on your own provider key.

Set it up

curl · embeddings
$ curl https://anyrouter.dev/api/v1/embeddings \
  -H "Authorization: Bearer $ANYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nvidia/nemotron-3.5-embed-1b",
    "input": ["How do I reset my password?", "Billing questions"]
  }'
  1. 1.Pick an embedding model on /models, or start with nvidia/nemotron-3.5-embed-1b.
  2. 2.Send one string or an array in input. Vectors come back in request order.
  3. 3.Store the vectors, and embed queries with the same model.
Why use this

A retrieval pipeline needs an embeddings endpoint next to the chat one, and a second provider means a second key and base URL.

Endpoints and key
OpenAI-compatible
https://anyrouter.dev/api/v1
Anthropic-compatible
https://anyrouter.dev/api
Key
ANYROUTER_API_KEY (sk-ar-…)
Limits
  • Use an sk-ar-v1- key. Management keys (ak_) are not accepted.
  • dimensions only works when the upstream model supports truncation.