Skip to content

Workflow products

A workflow product lets you buy a finished job shape instead of choosing a model. Rather than naming gpt-4o-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.

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.

List the available workflow products to discover slugs and their default SLA tier.

Terminal window
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:

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

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).

Terminal window
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.

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": "" }] }
}
  • 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.

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

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. PollGET /v1/batches/{batchId} until a terminal status (completed, or failed | cancelled | 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.