Save on embeddings with batch inference
Put one document per line in a JSONL file, submit once, and collect every vector within 24 hours. Backfills that were too expensive on demand become a routine job.
One line per document
Submit the job with HTTP or the OpenAI SDK. Each embeddings request is a standard OpenAI body on a batch line, attributed to the customer who owns it.
curl https://us.api.lararouter.com/v1/batches \
-H "Authorization: Bearer $LARAROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input_file_id": "file_9Hs4TnQ2",
"endpoint": "/v1/embeddings",
"completion_window": "24h"
}'One file in, one file out
Everything runs through the same jobs API: upload a JSONL file, create a batch, and download the results. There is no interactive tier with a premium price.
Millions of vectors in one job
Large document sets fit in a single file. Each line carries its own custom_id, so every vector returns matched to the row it came from.
Re-embed without rationing budget
Embedding models bill input tokens only, at rates below OpenRouter batch inference. Changing models no longer means delaying the backfill.
Cost attribution on every line
Tag each line with the tenant or feature that owns it, then review tokens and cost per entity through the Billing API.
Embedding models
Recommended embedding models, with the batch rate each one bills per million input tokens.
BatchPer 1M tokens | ||||
|---|---|---|---|---|
| Recommended for | ||||
| BGE Large EN v1.5 | Embeddings | $0.005 17% below OpenRouter batch | — | |
| BGE Base EN v1.5 | Embeddings | $0.004 20% below OpenRouter batch | — | |
| nomic-embed-text | Embeddings | $0.005 23% below OpenRouter batch | — | |
Start generating embeddings
Upload a file, create a batch, and collect every vector within 24 hours. Enterprise plans deliver in as little as 4 hours.