Send your first batch
For the full step-by-step guides and API reference, head to the docs.
Batchrouter is a batch-AI routing platform: submit a batch once and it routes across providers on SLA-aware lanes, with quotes you can read back and receipts for every routing decision. It speaks the OpenAI-Batch format, so most clients work with a base-URL swap.
Three ways in
Direct chat completions
The standard OpenAI request body, answered right away. Set "stream": true to get the reply as server-sent events.
POST /v1/chat/completions
One request, queued as a batch
The same request, run as a one-item batch. You get 202 and a job id right away, then read the result from GET /v1/chat/completions/{id} or a webhook.
POST /v1/chat/completions with "batch": true
Bulk batches
Many requests at once, from the native API or a JSONL file. An existing OpenAI Batch client works with a base-URL swap.
POST /v1/batches, or /v1/openai/v1 for OpenAI Batch clients
The four steps below are the bulk path, about ten minutes to get started. These examples show the two chat-completions paths:
curl https://api.batchrouter.com/v1/chat/completions \
-H "Authorization: Bearer $BATCHROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5-4-mini","stream":true,"messages":[{"role":"user","content":"Say hello."}]}'curl https://api.batchrouter.com/v1/chat/completions \
-H "Authorization: Bearer $BATCHROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5-4-mini","batch":true,"messages":[{"role":"user","content":"Say hello."}]}'
# 202 {"id":"chatjob_...","object":"chat.completion.job","status":"queued",...}
# then: GET https://api.batchrouter.com/v1/chat/completions/chatjob_...Quote, submit and receive
Step 1 Create an API key
Sign-up is not open yet. If you already have an account, create a key under Account → API keys (keys start with br_live_ and are shown once). Store the key as BATCHROUTER_API_KEY.
Step 2 Get a free quote
Price a batch with POST /v1/quotes/model. Quotes are free and return a quote_id you pass to create — credits are only reserved when the batch is created.
Get a free quote examplecurl https://api.batchrouter.com/v1/quotes/model \ -H "Authorization: Bearer $BATCHROUTER_API_KEY" \ -H "Content-Type: application/json" \ -d '{"items":[{"customer_item_id":"item-1","operation":"chat.completions","model":"gpt-5-4-mini","input":{"messages":[{"role":"user","content":"Summarize: Batchrouter routes batch-AI workloads across providers."}]}}]}'Step 3 Submit the batch
Create the batch with the quote_id and an Idempotency-Key header for safe retries. Batchrouter routes across provider lanes and returns a batch id (bat_…).
Submit the batch examplecurl https://api.batchrouter.com/v1/batches \ -H "Authorization: Bearer $BATCHROUTER_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"quote_id":"<quote_id from the preceding response>","items":[{"customer_item_id":"item-1","operation":"chat.completions","model":"gpt-5-4-mini","input":{"messages":[{"role":"user","content":"Summarize: Batchrouter routes batch-AI workloads across providers."}]}}]}'Step 4 Poll or receive results
Poll GET /v1/batches/{id} until completed, then fetch GET /v1/batches/{id}/results (or an /artifact-url for large batches). Prefer a webhook to skip polling — set webhook.url on create and verify the X-BatchRouter-Signature.
OpenAI-Batch compatible
Point your existing OpenAI batch client at Batchrouter and keep your JSONL format.
Transparent pricing
Every quote itemizes provider cost, Batchrouter fee, and discount. Unselected lanes return rejection reasons.
SLA tiers
The API reports which tiers this environment offers. Published windows are: Priority (4h), Standard (24h), Relaxed (48h), Flex (72h) or Economy (7 days), or Realtime (best effort) for a direct chat request. Batchrouter routes to lanes that meet the deadline, and slower tiers cost less.
Read the full documentation
Step-by-step guides for authentication, submitting batches, the JSONL format, quotes and pricing, polling and results, webhooks, OpenAI compatibility, SLA-aware routing and the complete API reference.