List batches, newest first
Returns one page of your organization's batches, newest first, in the OpenAI list envelope. Page with limit (1 to 100, default 20) and after.
Required permission
Requires the batch.read permission. See Permissions for the roles and API key permissions that include it.
Command line
The orl CLI wraps this endpoint:
orl batches listapiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
limit?integerPage size, 1-100 (default 20).
after?stringA batch id; returns the batches submitted before it, the next page of the newest-first list (use the previous page's last_id).
OK
application/json- response
One page of batches, newest first (OpenAI list envelope).
object*"list""list"data*array<>first_id?stringId of the first batch on this page.
last_id?stringId of the last batch on this page; pass it as after to fetch the next page.
has_more*booleancurl -X GET 'https://inference.openrelay.inc/v1/batches'{ "object": "list", "data": [ { "id": "string", "object": "batch", "endpoint": "string", "input_file_id": "string", "completion_window": "24h", "priority": "standard", "status": "validating", "model": "string", "output_file_id": "string", "error_file_id": "string", "created_at": 0, "in_progress_at": 0, "expires_at": 0, "completed_at": 0, "failed_at": 0, "expired_at": 0, "cancelled_at": 0, "request_counts": { "total": 0, "completed": 0, "failed": 0 }, "usage": { "input_tokens": 0, "output_tokens": 0, "cost_nano_usd": 0 }, "metadata": { "property1": "string", "property2": "string" } } ], "first_id": "string", "last_id": "string", "has_more": true}Get the Batch API's current limits GET
Returns the limits a batch submission runs against today: the per-batch minimum fee and the metadata caps that create and update both enforce. The minimum fee is 0 when none is configured. orl estimate and orl batches create read this instead of assuming fixed constants, so a limit change on the server reaches them without a CLI release.
Create a batch inference job POST
Submit a batch from an uploaded input file (input_file_id) or inline request objects (requests); provide exactly one of the two. A batch has 24 hours from submission (expires_at) to finish: records not done by then come back with the batch_expired error and the batch ends expired. Standard batches bill at the discounted batch rate. Poll it with get, then download results via the output and error file ids. An API key whose spend budget is used up gets 402 key_budget_exceeded; a batch already running finishes, and its billed usage counts toward the key.