对于大批量的工作或无需立即完成的请求,你现在可以使用新的 batch API。提交批次时,提供商可以在 24 小时窗口内自行选择完成请求的时间,作为交换,他们通常收取正常每 token 价格的 50%(有时更低)。
它目前已在 超过 70 个模型上可用。请在 Batch API 文档中了解如何使用它。
在实践中,我们观察到你很少需要等待接近 24 小时。在我们为期两周的 beta 期间完成的 230k+ 个批次中,中位数在 7 分钟内完成,90% 在一小时内完成。
Batch 是一种异步 API,适用于你可以接受高度可变响应时间的工作负载,例如为语料库打标签、回填嵌入向量、为评测集打分、汇总积压的工单,或在夜间对几千行数据运行相同的提示词。
Batch API 的工作原理
调用 api/v1/batches,传入你的请求列表,并指定要使用的端点形态。Chat completions、responses、messages 和 embeddings 均受支持。例如:
curl https://openrouter.ai/api/v1/batches \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-d '{
"endpoint": "/v1/chat/completions",
"model": "google/gemini-3.8-flash",
"requests": [
{ "custom_id": "ticket-0001", "body": { "messages": [{ "role": "user", "content": "Summarize this ticket in one sentence." }] } },
{ "custom_id": "ticket-0002", "body": { "messages": [{ "role": "user", "content": "Summarize this ticket in one sentence." }] } }
]
}' 发出请求后,开始轮询 GET /api/v1/batches/:id,直到状态为 completed、failed、expired 或 cancelled。已完成的批次会在同一响应中内联返回其结果。
大多数批次几分钟内即可完成
我们查看了两周测试期内完成的批次,并测量了从接受到返回结果的时间。中位数为 7 分钟,第 90 百分位为 1.0 小时,第 99 百分位为 10.3 小时。我们还发现,提交的时间点比发送的请求数量影响更大。

在太平洋时间凌晨 5 点到中午之间提交的批次,明显比其他时段更慢。最慢的十分之一需要 2 到 4.5 小时。在其他任何时段提交,第 90 百分位都会降到 1.1 小时以下,而在太平洋时间下午 6 点之后则低于 50 分钟。
单个请求的批次根据时段不同,完成时间为 5 到 11 分钟,而包含 1,000 个或更多请求的批次完成时间为 12 到 21 分钟。大批次处理确实需要更长时间。在太平洋时间午夜到中午之间提交的、请求数超过 100 的批次中,最慢的十分之一耗时长达 6.8 小时。

批次支持哪些功能
- 请求形态:你已发送给 OpenRouter 的任何文本请求体形态都将得到支持,包括 chat completions、responses、messages 和 embeddings。
- 路由:每个批次在单一提供商上执行。默认情况下,在应用你的提供商允许列表、数据政策和 BYOK 设置之后,我们会为该模型选择最便宜的批次端点。
- BYOK:配置了提供商密钥后,在支持该功能的提供商上的批处理会通过你的密钥路由,你只需支付 BYOK 费用。
- 逐请求结果:每个结果独立返回,因此少数几行出错绝不会导致整个任务失败。
- 保留期限:输入和结果会保留 30 天,或直到你
DELETE该批次。 - 日志记录:每个批次都会显示在日志的 Batches 标签页中,包含模型、提供商、状态和费用。
- 定价:折扣适用于按 token 计费的价格,并因模型而异。网络搜索调用按标准费率计费。
- 输入:图像和文件必须是公开 URL。音频、视频以及 OpenRouter 自有的网络搜索插件在批处理中不可用(参见文档中的限制部分)。
选择一个支持批处理的模型,获取一个API 密钥,然后将你的第一个批次提交到https://openrouter.ai/api/v1/batches。快速入门中有完整的请求和响应结构。
在 Discord 的#feedback中告诉我们你在批处理什么。
For large batches of work or requests that don’t need to be completed immediately, you can now use the new batch API. When submitting a batch, a provider gets to choose when during a 24 hour window they will complete the request, and in exchange they generally charge 50% (and sometimes less) of their normal per-token price.
It works today on more than 70 models. Learn how to use it in the Batch API docs.
In practice, we’ve observed you rarely wait anywhere near 24 hours. Across 230k+ batches that completed over our two week beta period, the median finished in 7 minutes and 90% finished within an hour.
Batch is an asynchronous API for workloads where you can accept highly variable response times, such as labeling a corpus, back-filling embeddings, scoring an eval set, summarizing a backlog of tickets, or running the same prompt across a few thousand rows overnight.
How the Batch API works
Call api/v1/batches with your list of requests and specify what endpoint shape to use. Chat completions, responses, messages, and embeddings are all supported. For example:
curl https://openrouter.ai/api/v1/batches \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-d '{
"endpoint": "/v1/chat/completions",
"model": "google/gemini-3.8-flash",
"requests": [
{ "custom_id": "ticket-0001", "body": { "messages": [{ "role": "user", "content": "Summarize this ticket in one sentence." }] } },
{ "custom_id": "ticket-0002", "body": { "messages": [{ "role": "user", "content": "Summarize this ticket in one sentence." }] } }
]
}' After the request, begin polling GET /api/v1/batches/:id until the status is completed, failed, expired, or cancelled. Completed batches return their results inline in the same response.
Most batches finish in minutes
We looked at the batches that completed during our two week beta period and measured the time from acceptance to finished results. The median was 7 minutes, the 90th percentile was 1.0 hour, and the 99th percentile was 10.3 hours. We also found that the time of day you submit matters more than how many requests you send.

Batches submitted between 5am and noon Pacific are significantly slower than other times of day. The slowest tenth take 2 to 4.5 hours. Submit at any other hour and the 90th percentile drops under 1.1 hours, and after 6pm Pacific it’s under 50 minutes.
A single-request batch finishes in 5 to 11 minutes depending on the hour, and a batch of 1,000 or more requests finishes in 12 to 21 minutes. Large batches do take longer to process. The slowest tenth of batches with more than 100 requests submitted between midnight and noon Pacific took as long as 6.8 hours.

What’s supported with batches
- Request shapes: any text request body shape you already send to OpenRouter will be supported, including chat completions, responses, messages, and embeddings.
- Routing: Each batch is executed on a single provider. By default we choose the cheapest batch endpoint for the model after your provider allowlist, data policy, and BYOK settings are applied.
- BYOK: with a provider key configured, batches on providers that support it route through your key and you pay only the BYOK fee.
- Per-request results: every result returns independently, so a few bad rows never fail the rest of the job.
- Retention: inputs and results are kept for 30 days, or until you
DELETEthe batch. - Logging: every batch shows up in the Batches tab of your logs with model, provider, status, and cost.
- Pricing: the discount applies to per-token pricing and varies by model. Web search calls bill at standard rates.
- Inputs: images and files must be public URLs. Audio, video, and OpenRouter’s own web search plugin aren’t available in batch (see the limitations section of the docs).
Pick a batch-capable model, grab an API key, and post your first batch to https://openrouter.ai/api/v1/batches. The Quickstart has the full request and response shapes.
Tell us what you’re batching in #feedback on Discord.