Embeddings
Part of the Rapid Router API reference. One OpenAI-compatible endpoint, https://rapidrouter.ai/api/v1, in front of every model in the catalog.
06Embeddings
POST /embeddings, the standard shape. input takes a string or an array of strings, and embeddings bill input tokens only. Embedding models carry the same vendor/model ids as everything else and are listed under the Embeddings tab of the catalog; they never appear in GET /models, which is chat only.encoding_format: "base64" and dimensions pass through where the provider supports them.
curl https://rapidrouter.ai/api/v1/embeddings \
-H "Authorization: Bearer $RAPIDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/text-embedding-3-small",
"input": ["first document", "second document"]
}'Rerankers ride the same catalog: POST /rerank with a query and documents returns them scored against the query, best first. Set top_n to cap how many come back and return_documents: true to echo the text alongside each score.
curl https://rapidrouter.ai/api/v1/rerank \
-H "Authorization: Bearer $RAPIDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3-reranker-0.6b",
"query": "how do I rotate an API key?",
"documents": ["Keys are rotated from the dashboard.", "Bananas are yellow."],
"top_n": 1
}'