Get batch results
curl --request GET \
--url https://openrouter.ai/api/v1/batches/{id}/results \
--header 'Authorization: Bearer <token>'import requests
url = "https://openrouter.ai/api/v1/batches/{id}/results"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://openrouter.ai/api/v1/batches/{id}/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openrouter.ai/api/v1/batches/{id}/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://openrouter.ai/api/v1/batches/{id}/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://openrouter.ai/api/v1/batches/{id}/results")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openrouter.ai/api/v1/batches/{id}/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [],
"has_more": false,
"next_cursor": null,
"object": "list"
}{
"error": {
"code": 400,
"message": "Invalid batch results query."
}
}{
"error": {
"code": 401,
"message": "No auth credentials found."
}
}{
"completion_window": "24h",
"created_at": 123,
"endpoint": "<string>",
"error": {
"code": 123,
"message": "<string>"
},
"expires_at": 123,
"finalized_at": 123,
"id": "<string>",
"model": "<string>",
"object": "batch",
"provider": "<string>",
"request_counts": {
"completed": 123,
"failed": 123,
"total": 123
},
"results": null,
"status": "validating",
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123,
"cache_creation": {
"ephemeral_1h_input_tokens": 0,
"ephemeral_5m_input_tokens": 100
},
"completion_tokens_details": {
"audio_tokens": 123,
"image_tokens": 123,
"reasoning_tokens": 123
},
"cost": 123,
"cost_details": {
"upstream_inference_completions_cost": 0.0004,
"upstream_inference_cost": null,
"upstream_inference_prompt_cost": 0.0008
},
"is_byok": true,
"iterations": [
{
"cache_creation": null,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"input_tokens": 100,
"output_tokens": 50,
"type": "message"
}
],
"prompt_tokens_details": {
"audio_tokens": 123,
"cache_write_tokens": 123,
"cached_tokens": 123,
"file_tokens": 123,
"video_tokens": 123
},
"server_tool_use": {
"tool_calls_executed": 123,
"tool_calls_requested": 123,
"web_search_requests": 123
},
"service_tier": "<string>",
"speed": "standard"
},
"output": {
"uri": "gs://my-bucket/openrouter-batch/output/org_abc/batch_123/batch_123/prediction-model-2026-01-01T00:00:00.000000Z"
}
}{
"error": {
"code": 404,
"message": "Batch not found."
}
}{
"error": {
"code": 409,
"message": "Batch results are not ready yet. Wait for the batch to finish and try again."
}
}{
"error": {
"code": 410,
"message": "Batch results have expired. OpenRouter deletes batch results 30 days after the batch is created."
}
}{
"error": {
"code": 413,
"message": "Batch result row exceeds the maximum readable page size. Read the batch via GET /api/v1/batches/{id} for inline batches, or read output.uri from GET /api/v1/batches/{id} for caller-owned input batches."
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded."
}
}{
"error": {
"code": 500,
"message": "Internal server error."
}
}{
"error": {
"code": 502,
"message": "Upstream batch-api is unavailable."
}
}Batch
Get batch results
Returns a cursor-paginated page of normalized OpenRouter-format results for a finished batch. Pass the previous page’s next_cursor as cursor to read the next page. Pages are stable across retries for the 30-day artifact retention window. See the Batch API Quickstart.
GET
/
batches
/
{id}
/
results
Get batch results
curl --request GET \
--url https://openrouter.ai/api/v1/batches/{id}/results \
--header 'Authorization: Bearer <token>'import requests
url = "https://openrouter.ai/api/v1/batches/{id}/results"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://openrouter.ai/api/v1/batches/{id}/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://openrouter.ai/api/v1/batches/{id}/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://openrouter.ai/api/v1/batches/{id}/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://openrouter.ai/api/v1/batches/{id}/results")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openrouter.ai/api/v1/batches/{id}/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [],
"has_more": false,
"next_cursor": null,
"object": "list"
}{
"error": {
"code": 400,
"message": "Invalid batch results query."
}
}{
"error": {
"code": 401,
"message": "No auth credentials found."
}
}{
"completion_window": "24h",
"created_at": 123,
"endpoint": "<string>",
"error": {
"code": 123,
"message": "<string>"
},
"expires_at": 123,
"finalized_at": 123,
"id": "<string>",
"model": "<string>",
"object": "batch",
"provider": "<string>",
"request_counts": {
"completed": 123,
"failed": 123,
"total": 123
},
"results": null,
"status": "validating",
"usage": {
"completion_tokens": 123,
"prompt_tokens": 123,
"total_tokens": 123,
"cache_creation": {
"ephemeral_1h_input_tokens": 0,
"ephemeral_5m_input_tokens": 100
},
"completion_tokens_details": {
"audio_tokens": 123,
"image_tokens": 123,
"reasoning_tokens": 123
},
"cost": 123,
"cost_details": {
"upstream_inference_completions_cost": 0.0004,
"upstream_inference_cost": null,
"upstream_inference_prompt_cost": 0.0008
},
"is_byok": true,
"iterations": [
{
"cache_creation": null,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"input_tokens": 100,
"output_tokens": 50,
"type": "message"
}
],
"prompt_tokens_details": {
"audio_tokens": 123,
"cache_write_tokens": 123,
"cached_tokens": 123,
"file_tokens": 123,
"video_tokens": 123
},
"server_tool_use": {
"tool_calls_executed": 123,
"tool_calls_requested": 123,
"web_search_requests": 123
},
"service_tier": "<string>",
"speed": "standard"
},
"output": {
"uri": "gs://my-bucket/openrouter-batch/output/org_abc/batch_123/batch_123/prediction-model-2026-01-01T00:00:00.000000Z"
}
}{
"error": {
"code": 404,
"message": "Batch not found."
}
}{
"error": {
"code": 409,
"message": "Batch results are not ready yet. Wait for the batch to finish and try again."
}
}{
"error": {
"code": 410,
"message": "Batch results have expired. OpenRouter deletes batch results 30 days after the batch is created."
}
}{
"error": {
"code": 413,
"message": "Batch result row exceeds the maximum readable page size. Read the batch via GET /api/v1/batches/{id} for inline batches, or read output.uri from GET /api/v1/batches/{id} for caller-owned input batches."
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded."
}
}{
"error": {
"code": 500,
"message": "Internal server error."
}
}{
"error": {
"code": 502,
"message": "Upstream batch-api is unavailable."
}
}Path Parameters
Query Parameters
Was this page helpful?