BatchRouter Docs

Workflow products

Buy a finished job shape — classify, extract, summarize — and let BatchRouter pick the model and provider mix that satisfies the outcome contract.

A workflow product lets you buy a finished job shape instead of choosing a model. Rather than naming gpt-5.4-mini and a routing mode yourself, you pick a curated outcome — classify, extract, summarize, and so on — and BatchRouter selects the model and provider lanes that satisfy that contract. You describe the job; BatchRouter handles the infrastructure choices.

This is the outcome-contract alternative to the model-quote path. Both end at the same place — a quote_id you pass to POST /v1/batches — but they differ in who picks the model.

When to use a workflow product

A workflow product is a curated, versioned outcome contract plus a preset manifest (input shape, output shape, SLA, route policy). It is not a general DAG, pipeline, or multi-step orchestration engine — it is a single curated job outcome that BatchRouter knows how to route well.

Reach for a workflow product when:

  • You care about the result shape (a clean classification, a structured extraction, a summary) more than which model produces it.
  • You want BatchRouter to balance fit, validation history, and cost rather than always taking the cheapest model.
  • You'd rather not track model slugs, capabilities, or provider lanes yourself.

Use the model-quote path instead when you need a specific model, an explicit fallback list, or fine control over routing_mode.

Either path produces a quote_id. Quotes are always free — credits are only reserved when you create the batch.

Browse the catalog

List the available workflow products to discover their slugs.

curl https://api.batchrouter.com/v1/catalog/workflow-products \
  -H "Authorization: Bearer $BATCHROUTER_API_KEY"

Each entry carries a slug, display_name, description, sla_tier, and a latest_version_id. Fetch a single product by slug to inspect its details before quoting:

curl https://api.batchrouter.com/v1/catalog/workflow-products/classify \
  -H "Authorization: Bearer $BATCHROUTER_API_KEY"

classify is illustrative. List the catalog to see the real slugs available to your account, and check the interactive API reference for the full field list on each product.

Quote a workflow product

POST /v1/quotes/workflow quotes a curated workflow product and returns model-agnostic provider lanes that satisfy the contract. Send the workflow slug plus your input(s). You can quote a single item with input, or a representative set with inputs (each entry takes a customer_item_id and an input object).

curl https://api.batchrouter.com/v1/quotes/workflow \
  -H "Authorization: Bearer $BATCHROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflow": "classify",
    "inputs": [
      {
        "customer_item_id": "item-1",
        "input": {
          "messages": [
            { "role": "user", "content": "Summarize: BatchRouter routes batch-AI workloads across providers." }
          ]
        }
      }
    ]
  }'

The response is the same QuoteResponse shape as a model quote: a quote_id, a pricing_estimate, and the quote_lanes BatchRouter would route to. The difference is that you never named a model — BatchRouter chose lanes that satisfy the workflow's outcome contract.

Pin a workflow version

Workflow products are versioned. Passing the bare slug uses the latest version. To pin a specific version for reproducibility, send workflow as an object with slug plus either version_id or version_number:

{
  "workflow": { "slug": "classify", "version_number": 3 },
  "input": { "messages": [{ "role": "user", "content": "…" }] }
}

Constrain cost and tools

  • max_price caps the quote — see the API reference for the Money shape.
  • required_tools forces provider-hosted tools (such as web_search or python_execution) onto every lane. Quote-level required_tools are merged with any per-input requirements, and lanes whose provider doesn't declare every required tool are rejected with a tool_support failure. If no eligible lane remains, the quote fails rather than routing to a lane that lacks the tools.

How it differs from a model quote

The two quote endpoints converge on a quote_id but invert who owns model selection.

Model quote (POST /v1/quotes/model)Workflow quote (POST /v1/quotes/workflow)
You choosemodel / models, routing_modea workflow slug (and optional version)
BatchRouter choosesthe cheapest eligible lane for your model(s)the model + provider mix that satisfies the contract
Inputitems[] (each names a model)input or inputs[] (model-agnostic)
Best whenyou need a specific model or routing modeyou care about the outcome, not the model
Returnsquote_id, pricing_estimate, quote_lanesquote_id, pricing_estimate, quote_lanes

For workflow products the cheapest lane does not always win — the router balances workflow fit and validation history against cost, so a workflow quote may price differently than the cheapest model that could nominally do the job.

From quote to batch

Once you have a quote_id, the rest of the flow is identical to any other batch.

  1. Create the batch — pass the quote_id to POST /v1/batches with an Idempotency-Key header. The active quote snapshot reserves credits; final cost settles from actual provider token usage.

  2. Poll — GET /v1/batches/{batchId} until batch.state is terminal (completed, or failed | canceled | expired).

  3. Fetch results — page GET /v1/batches/{batchId}/results, or pull the signed bundle from GET /v1/batches/{batchId}/artifact-url.

See Submit a batch for the full create-poll-results walkthrough.

Next steps

On this page