Skip to content
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. 1.Pick an embedding model on /models, or start with nvidia/nemotron-3-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.
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.