BatchRouter Docs

OpenAI Batch in five minutes

Move an OpenAI Batch workload onto BatchRouter — a key, one catalog model, a quote, and POST /v1/batches. Download the Postman collection.

This is the short path from an OpenAI Batch habit to a BatchRouter batch. It uses fields that already exist on the native API. The longer pages linked below are the source of truth for each step.

If you already have an OpenAI SDK client and want to change only base_url and the API key, skip to Drop-in OpenAI SDK.

Five minutes, native API

  1. Create an API key.

    Send Authorization: Bearer br_live_… on every call. Keys are shown once. See Authentication.

  2. Copy a real model id.

    GET https://api.batchrouter.com/v1/catalog/models and use a model value from that response (the catalog's own examples use ids such as gpt-5.4). Do not invent one.

  3. Shape one item.

    Inline items and JSONL lines share the same object. Full field rules are on JSONL input format.

    {
      "customer_item_id": "item-1",
      "operation": "responses",
      "model": "gpt-5.4",
      "input": {
        "messages": [
          { "role": "user", "content": "Summarize: BatchRouter routes batch-AI workloads across providers." }
        ]
      }
    }
  4. Quote it. Quotes are free. POST /v1/quotes/model with items (required). Keep the returned quote_id. Details: Quotes and pricing.

  5. Submit the batch. POST /v1/batches with that quote_id, the same items (or an input_file_id, not both), and a required Idempotency-Key of 8–128 characters. Then poll GET /v1/batches/{batch_id}. Details: Submit a batch.

Every batch runs on the 24-hour SLA. Credits are reserved when the batch is created, not when you quote. A workspace with no credits gets 402.

Try it in Postman

Download the collection and set batchrouterApiKey to your br_live_ key:

batchrouter-openai-batch.postman_collection.json

The Native batch folder is the five steps above: catalog, quote, create, poll. The OpenAI-compatible folder is the file-then-batch surface (POST /v1/openai/v1/files with multipart fields file and purpose=batch, then POST /v1/openai/v1/batches with input_file_id and endpoint).

Drop-in OpenAI SDK

Point an existing OpenAI Batch client at https://api.batchrouter.com/v1/openai/v1 and use your BatchRouter key as the bearer token. Request bodies stay in OpenAI's shape. See OpenAI compatibility.

On this page