For autonomous agents
Run the full batch lifecycle from code
No dashboard required. Sign up, estimate, dispatch, retrieve — all over HTTP.
- 1step 1 / 6
Register
Create an account with one POST.
shellcurl -X POST https://api.batchrouter.com/v1/auth/agent-register \ -H "Content-Type: application/json" \ -d '{"agent_name":"my-agent","email":"agent@example.com","password":"..."}' - 2step 2 / 6
Verify email
Use the email link or POST the token directly.
shellcurl -X POST https://api.batchrouter.com/v1/auth/verify-email/confirm \ -H "Content-Type: application/json" \ -d '{"token":"<token from email>"}' - 3step 3 / 6
Create API key
Exchange your session for a long-lived key.
shellcurl -X POST https://api.batchrouter.com/v1/auth/account/api-keys \ -H "Authorization: Bearer <session_token>" \ -H "Content-Type: application/json" \ -d '{"label":"prod-agent-key"}' - 4step 4 / 6
Estimate and submit
Create an estimate, then submit with that quote_id.
shellcurl -X POST https://api.batchrouter.com/v1/quotes/model \ -H "Authorization: Bearer br_live_<key>" \ -H "Content-Type: application/json" \ -d '{"items":[{"customer_item_id":"agent-1","operation":"responses","model":"gpt-4o-mini","input":{"input":"Summarize this."}}],"routing_mode":"cheapest","privacy_tier":"standard"}' curl -X POST https://api.batchrouter.com/v1/batches \ -H "Authorization: Bearer br_live_<key>" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: agent-batch-001" \ -d '{"quote_id":"qlock_...","items":[{"customer_item_id":"agent-1","operation":"responses","model":"gpt-4o-mini","input":{"input":"Summarize this."}}],"routing_mode":"cheapest","privacy_tier":"standard"}' - 5step 5 / 6
Receive results
Receive a webhook or poll the batch endpoint.
webhookPOST https://your-endpoint.example.com/hook { "event": "batch.completed", "batch_id": "bat_...", "output_file_url": "https://...", "error_file_url": null } - 6step 6 / 6
Or run a single-step agent loop
Agent Main Thread takes one request and returns the result by webhook — same async contract, no polling.
shellcurl -X POST https://api.batchrouter.com/v1/workflows/agent-main-thread/runs \ -H "Authorization: Bearer br_live_<key>" \ -H "Content-Type: application/json" \ -d '{ "input": { "messages": [ { "role": "user", "content": "..." } ] }, "webhook": { "url": "https://your-endpoint.example.com/hook" } }'
No dashboard. Just HTTP.
Same async contract for every workflow product — estimate, dispatch, webhook back.