List async jobs
Your organization's async jobs, newest first, a page at a time. Add status to list only the jobs with that status. A request with status reads a bounded number of jobs, so a page can hold fewer than limit, or none, with has_more true. Page on with after set to its last_id, which is then the last job the request read and may not be on the page.
Required permission
Requires the async.read permission. See Permissions for the roles and API key permissions that include it.
Command line
The orl CLI wraps this endpoint:
orl async job listapiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
limit?integer1 <= value <= 10020after?stringThe last_id of the previous page.
status?stringOnly the jobs with this status. One value; an unknown one is a 400.
"queued""running""cancelling""completed""cancelled""failed"A page of jobs.
application/json- response
object*"list""list"data*array<>first_id?stringlast_id?stringThe after of the next page: the page's last job, or under a status filter the last job the request read, which the page may not hold.
has_more*booleancurl -X GET 'https://inference.openrelay.inc/v1/async/jobs'{ "object": "list", "data": [ { "id": "string", "object": "async.job", "completion_window": "1h", "status": "queued", "created_at": 0, "started_at": 0, "completed_at": 0, "deadline_at": 0, "request_counts": { "total": 0, "completed": 0, "failed": 0, "expired": 0, "cancelled": 0 }, "usage": { "input_tokens": 0, "cached_input_tokens": 0, "output_tokens": 0 }, "cost_nano_usd": 0, "input_file_id": "string", "output_file_id": "string", "error_file_id": "string", "metadata": { "property1": "string", "property2": "string" }, "rejected_count": 0, "rejected_records": [ { "line": 0, "custom_id": "string", "code": "invalid_json", "message": "string" } ], "rejected_records_file_id": "string" } ], "first_id": "string", "last_id": "string", "has_more": true}Overview
Async jobs: requests delivered within 1 hour (20% off the Sync price) or within 24 hours (50% off), with their results paged while the job runs. Served by the inference endpoint (inference.openrelay.inc). These endpoints return 404 for an organization Async is not turned on for.
Create an async job POST
Submit requests as a job, for delivery within 1 hour (20% off the Sync price) or within 24 hours (50% off Sync). Send them inline (requests, up to 1,000) or as an uploaded input file (input_file_id); provide exactly one of the two. Each line names its url (/v1/chat/completions, /v1/messages or /v1/embeddings) and the body that endpoint takes, and a job may mix models and endpoints. Every line is checked when the job is created, with the Batch API's record rules: a line that breaks one is rejected and the rest are accepted. The answer counts the rejections in rejected_count, lists the first 100 in rejected_records, and rejected_records_file_id names a file holding all of them; a rejected line never runs, is never billed, and counts as failed. When no line can run, the answer is 400 no_valid_records and nothing is created. A request not started before deadline_at expires at no charge; one that started finishes and is charged. A 1-hour job holds up to 10,000 requests and a 24-hour job up to 50,000.