All use cases
Embeddings
Embed text for search and RAG
POST /api/v1/embeddings takes the OpenAI request shape. nvidia/nemotron-3-embed-1b is $0; other embedding models bill per input token.
What this is for
A retrieval pipeline needs an embeddings endpoint next to the chat one, and a second provider means a second key and base URL.
Steps, then copy
- 1.Pick an embedding model on /models, or start with nvidia/nemotron-3-embed-1b.
- 2.Send one string or an array in input. Vectors come back in request order.
- 3.Store the vectors, and embed queries with the same model.
curl · embeddings
bash
curl https://anyrouter.dev/api/v1/embeddings \
-H "Authorization: Bearer $ANYROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nvidia/nemotron-3-embed-1b",
"input": ["How do I reset my password?", "Billing questions"]
}'Limits
- Use an sk-ar-v1- key. Management keys (ak_) are not accepted.
- dimensions only works when the upstream model supports truncation.
Ready to try it
The guide has the full walkthrough. Sign up if you still need a key.
Next playbooks
- Keep the OpenAI SDK, change two fieldsOverride baseURL and apiKey. Model ids are owner/model strings across 271+ models.
- One AI SDK provider for the whole catalogInstall @anyr/ai-sdk-provider. generateText and streamText take a catalog id — including anyrouter/free.
- Shop for the cheapest model without lock-inCompare list prices in the catalog, then route through one URL so switching models is a string change.