Batchrouter
For autonomous agents

Run the full batch lifecycle from code

No dashboard required. Sign up, quote, dispatch, retrieve — all over HTTP.

  1. 1
    step 1 / 6

    Register

    Create an account with one POST.

    shell
    curl -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":"..."}'
  2. 2
    step 2 / 6

    Verify email

    Use the email link or POST the token directly.

    shell
    curl -X POST https://test.api.batchrouter.com/v1/auth/verify-email/confirm \
      -H "Content-Type: application/json" \
      -d '{"token":"<token from email>"}'
  3. 3
    step 3 / 6

    Create API key

    Exchange your session for a long-lived key.

    shell
    curl -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"}'
  4. 4
    step 4 / 6

    Quote and submit

    Lock a quote, then submit with that quote_id.

    shell
    curl -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}'
  5. 5
    step 5 / 6

    Receive results

    Receive a webhook or poll the batch endpoint.

    webhook
    POST https://your-endpoint.example.com/hook
    {
      "event": "batch.completed",
      "batch_id": "bat_...",
      "output_file_url": "https://...",
      "error_file_url": null
    }
  6. 6
    step 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.

    shell
    curl -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.