Get a batch
Changed onReturns a batch with its status and request counts. Batches in a terminal status include results. Failed batches report the reason in error.message. See the Batch API Quickstart.
Request
- Base URLhttps://openrouter.ai/api/v1
- AuthHTTP bearer
Path parameters
The batch job id returned from submit.
Response
The current batch job status.
Unix timestamp after which the assigned provider no longer completes unfinished requests. Derived from the provider's documented batch window, so it can exceed created_at plus completion_window (Google Vertex can take up to 96 hours). null when the provider documents no hard expiry.
The output location of a batch submitted with input, whose results are null. Returned only by GET /batches/{id}, once the batch has ended and the provider reported an output folder or table. Batch lists and responses for a batch with an unpaid charge leave it out.
Provider OpenRouter assigned to run the batch, using the same name as the provider field of sync responses.
Example response
{
"output": {
"uri": "gs://my-bucket/openrouter-batch/output/org_abc/batch_123/batch_123/prediction-model-2026-01-01T00:00:00.000000Z"
},
"results": [
{
"error": {
"error_type": "rate_limit_exceeded"
},
"response": {
"body": {
"alignment": {
"calls": [
{
"call": 1,
"outcome": "allowed",
"rules": [
{
"applicable": true,
"broken": false,
"probability": 0.04
}
]
}
]
},
"choices": [
{
"finish_reason": "stop",
"message": {
"annotations": [
{
"file": {
"content": [
{
"text": "Quarterly revenue grew 12%.",
"type": "text"
}
],
"hash": "abc123",
"name": "report.pdf"
},
"type": "file"
}
],
"reasoning_details": [
{
"summary": "The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...",
"type": "reasoning.summary"
}
]
}
}
],
"openrouter_metadata": {
"attempt": 1,
"endpoints": {
"available": [
{
"model": "openai/gpt-4o",
"provider": "OpenAI",
"selected": true
}
],
"total": 1
},
"generation_time": 2016,
"is_byok": false,
"region": "iad",
"requested": "openai/gpt-4o",
"strategy": "direct",
"summary": "available=1, selected=OpenAI"
},
"safeguard_results": [
{
"status": {
"tool_uses": {
"call_abc": {
"explanation": "[Data Exfiltration]",
"outcome": "flagged",
"type": "evaluated"
},
"call_def": {
"outcome": "not_flagged",
"type": "evaluated"
}
},
"type": "available"
},
"type": "dangerous_tool_use"
}
]
}
}
}
],
"usage": {
"cache_creation": {
"ephemeral_1h_input_tokens": 0,
"ephemeral_5m_input_tokens": 100
},
"cost_details": {
"upstream_inference_completions_cost": 0.0004,
"upstream_inference_cost": null,
"upstream_inference_prompt_cost": 0.0008
},
"iterations": [
{
"cache_creation": null,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"input_tokens": 50,
"output_tokens": 25,
"type": "compaction"
}
],
"speed": "standard"
}
}Changes
- info
added the optional property
results/items/response/body/anyOf[#/components/schemas/BatchImageGenerationResponse]/idto the response with the status
- info
- warning
added the new
bedrock-amazon-responses-v1enum value to theresults/items/response/body/anyOf[#/components/schemas/OpenResponsesResult]/allOf[subschema #2]/output/items/oneOf[#/components/schemas/OutputReasoningItem]/allOf[subschema #2]/formatresponse property for the response status - warning
added the new
bedrock-amazon-responses-v1enum value to theresults/items/response/body/anyOf[subschema #1]/choices/items/message/reasoning_details/items/anyOf[#/components/schemas/ReasoningDetailEncrypted]/formatresponse property for the response status
3 more changes in this revision
- warning