Documentation
A free, OpenAI-compatible embeddings endpoint. Bring your own provider key — EmbedRoute routes the request and adds no markup.
Quickstart
Send your text and your provider key to one endpoint. The response matches OpenAI’s embeddings format.
curl https://www.embedroute.com/api/v1/embeddings \
-H "Content-Type: application/json" \
-H "X-Provider-Key: $OPENAI_API_KEY" \
-d '{
"model": "openai/text-embedding-3-small",
"input": "The quick brown fox jumps over the lazy dog"
}'import OpenAI from 'openai'
// True drop-in: just point baseURL at EmbedRoute and use YOUR provider key.
const client = new OpenAI({
apiKey: process.env.OPENAI_API_KEY, // your provider key (must match the model)
baseURL: 'https://www.embedroute.com/api/v1',
})
const res = await client.embeddings.create({
model: 'openai/text-embedding-3-small',
input: 'Your text to embed',
})
console.log(res.data[0].embedding)from openai import OpenAI
client = OpenAI(
api_key=os.environ["VOYAGE_API_KEY"], # your provider key (Voyage here)
base_url="https://www.embedroute.com/api/v1",
)
res = client.embeddings.create(
model="voyage/voyage-4", # switch providers by changing this
input="Your text to embed",
)
print(res.data[0].embedding)Bring your own key
EmbedRoute is bring-your-own-key: you pass the API key for the target provider on every request, and we use it only to make that one call — never storing it. There are two ways to send it:
- OpenAI-SDK drop-in: put your provider key in the SDK’s
apiKey(it becomes theAuthorizationheader). Nothing else needed. - Explicit header: send
X-Provider-Key: <your key>. Use this when you also want to send an EmbedRouteer_key inAuthorizationfor usage tracking.
# Drop-in: provider key as the bearer
Authorization: Bearer <your provider key>
# Or, explicit — plus an optional EmbedRoute key for usage history:
X-Provider-Key: <your provider key>
Authorization: Bearer er_your_embedroute_keyThe key must match the model’s provider. A voyage/… model needs a Voyage key, a cohere/… model a Cohere key, and so on. Keep provider keys out of client-side code in production.
Create embeddings
POST https://www.embedroute.com/api/v1/embeddings
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | provider/model, e.g. voyage/voyage-4 |
input | string | string[] | Yes | Text to embed, or an array of texts. |
Example response
{
"object": "list",
"data": [
{ "object": "embedding", "index": 0, "embedding": [0.0023, -0.0142, ...] }
],
"model": "openai/text-embedding-3-small",
"usage": { "prompt_tokens": 9, "total_tokens": 9 }
}Supported models
Use the provider/model format. Prices are the provider’s own list price per 1M input tokens; you pay them directly. The live catalog is also available at GET https://www.embedroute.com/api/v1/models.
| Model ID | Dimensions | Max tokens | $ / 1M |
|---|---|---|---|
openai/text-embedding-3-small | 1,536 | 8,191 | $0.02 |
openai/text-embedding-3-large | 3,072 | 8,191 | $0.13 |
voyage/voyage-4-lite | 1,024 | 32,000 | $0.02 |
voyage/voyage-4 | 1,024 | 32,000 | $0.06 |
voyage/voyage-4-large | 1,024 | 32,000 | $0.12 |
voyage/voyage-code-3 | 1,024 | 32,000 | $0.18 |
cohere/embed-v4.0 | 1,536 | 128,000 | $0.12 |
mistral/mistral-embed | 1,024 | 8,192 | $0.1 |
mistral/codestral-embed-2505 | 1,536 | 8,192 | $0.15 |
google/gemini-embedding-001 | 3,072 | 2,048 | $0.15 |
Error handling
Standard HTTP status codes with a JSON error body.
| Status | Meaning |
|---|---|
200 | Success |
400 | Bad request — missing model/input, unknown model, or missing X-Provider-Key |
401 | Invalid EmbedRoute (er_) key, when one is supplied |
422 | The provider rejected your provider key (bad or unauthorized key) |
429 | Rate limited |
502 | The upstream provider was unreachable or errored |
503 | EmbedRoute auth service temporarily unavailable (retry) |
{
"error": {
"message": "Incorrect API key provided",
"type": "provider_error",
"provider_status": 401
}
}Accounts & usage
You don’t need an account to use the router or the Lab. A free account gives you an EmbedRoute key (er_…) that you can pass in the Authorization header to record usage history in your dashboard. It never replaces your provider key — you still bring that.
Rate limits. Anonymous requests are limited per IP; requests made with an EmbedRoute key get a higher per-account limit. Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset; a 429 also returns Retry-After.