Providers
BatchRouter is a routing marketplace: when you submit a batch, the router picks the cheapest eligible provider lane that meets your requirements. Providers are the upstream services behind those lanes — hyperscale APIs like OpenAI and Anthropic, aggregators, and managed edge networks that onboard through the same provider contract. The provider directory is public and read-only, so you can see who can run your work before you create a batch.
This guide covers the two provider endpoints and how providers relate to lanes and the routing_mode
you choose at quote and create time.
List providers
Section titled “List providers”GET /v1/providers returns the public provider directory — each entry’s slug, display_name,
description, is_enabled status, and the supported_operations it can run.
curl https://api.batchrouter.com/v1/providers \ -H "Authorization: Bearer $BATCHROUTER_API_KEY"const res = await fetch("https://api.batchrouter.com/v1/providers", { headers: { Authorization: `Bearer ${process.env.BATCHROUTER_API_KEY}` },});const { providers } = await res.json();import os, requests
res = requests.get( "https://api.batchrouter.com/v1/providers", headers={"Authorization": f"Bearer {os.environ['BATCHROUTER_API_KEY']}"},)providers = res.json()["providers"]The response is a providers array. Fields below are illustrative — slugs and names you see are real,
but treat values as a snapshot:
{ "providers": [ { "slug": "openai", "display_name": "OpenAI", "description": "Native OpenAI Batch API for responses and embeddings.", "is_enabled": true, "supported_operations": ["responses", "embeddings"] }, { "slug": "anthropic", "display_name": "Anthropic", "description": "Anthropic Messages batch API.", "is_enabled": true, "supported_operations": ["responses"] } ]}Get one provider
Section titled “Get one provider”GET /v1/providers/{slug} returns a single provider keyed by its slug (for example openai). The
response wraps the same provider shape under a provider key and includes the provider’s
supported_operations and models. A provider profile may also carry richer marketplace metadata —
serving/residency regions, capacity signals, and the provider’s declared data-retention
policy — used by the router when it ranks lanes. The full, authoritative field list is in the
API reference; fetch a live provider to see exactly what it
exposes.
curl https://api.batchrouter.com/v1/providers/openai \ -H "Authorization: Bearer $BATCHROUTER_API_KEY"const res = await fetch("https://api.batchrouter.com/v1/providers/openai", { headers: { Authorization: `Bearer ${process.env.BATCHROUTER_API_KEY}` },});const { provider } = await res.json();import os, requests
res = requests.get( "https://api.batchrouter.com/v1/providers/openai", headers={"Authorization": f"Bearer {os.environ['BATCHROUTER_API_KEY']}"},)provider = res.json()["provider"]An unknown slug returns 404.
Providers, lanes, and routing
Section titled “Providers, lanes, and routing”A lane is a concrete way to run a piece of work: a specific provider serving a specific model in a specific region. One provider typically offers several lanes. When you quote or create a batch, the router applies your hard requirements (model, region/residency, privacy tier, required hosted tools, deadline), discards lanes that can’t satisfy them, then ranks what’s left — by price for direct routes — and selects the cheapest eligible lane (splitting across lanes when one can’t finish in time).
routing_mode lets you constrain which providers are even considered:
routing_mode | Effect on provider selection |
|---|---|
cheapest (default) | Any eligible lane, ranked by price. |
sla_aware | Balances price against the provider’s reliability and capacity for your SLA tier. |
public_only | Restricts routing to public/hyperscale provider lanes (e.g. OpenAI, Anthropic). |
edge_only | Restricts routing to managed edge provider lanes onboarded to the marketplace. |
hybrid | Allows both public and edge lanes. |
privacy_constrained | Only lanes whose provider satisfies your privacy_tier and data-handling rules. |
Every quote and every batch returns a routing receipt naming the selected lane(s) and why other
eligible lanes were not chosen — so a public_only or edge_only choice is always auditable. See
How routing works for the full ranking and rejection model.