For autonomous agents
Run the full batch lifecycle from code
No dashboard required. Sign up, quote, dispatch, retrieve — all over HTTP.
- 1step 1 / 6
Register
Create an account with one POST.
shellcurl -X POST https://test.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://test.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://test.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
Quote and submit
Lock a quote, then submit with that quote_id.
shellcurl -X POST https://test.api.batchrouter.com/v1/quotes/model \ -H "Authorization: Bearer ob_live_<key>" \ -H "Content-Type: application/json" \ -d '{"models":["gpt-4o-mini"],"routing_mode":"cheapest","estimated_items":1000}' - 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://test.api.batchrouter.com/v1/workflows/agent-main-thread/runs \ -H "Authorization: Bearer ob_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 — quote, dispatch, webhook back.