Read an async job's results
Finished results so far, a page at a time, readable while the job runs: results arrive a group of requests at a time, as each group finishes. Groups show in order. A page reads at most 32 MB of results plus the one result that crosses that budget (a result is never split), and can end with none and has_more true; poll on with its next_cursor. has_more stays true while the job is live; poll with the same after. A cursor pages only the job and the status filter it was read under.
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-result list <id>apiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
id*stringstatus?stringcompleted for only the completed results; failed for every result that did not complete (failed, expired or cancelled).
"completed""failed"after?stringThe next_cursor of the previous page.
limit?integer1 <= value <= 1000100A page of results.
application/json- response
A page of a job's results: the requests the create rejected, then each group of requests (a shard) in turn, its completed results before the rest, each in the order it finished. A group shows once every request in it has finished and the group has closed, billed or not, so every result shown is final and counted. Groups show in order: one that closed behind a group still running waits for it, so a running job's request_counts can run ahead of its pages. Each request shows once, with the result its counts and its bill hold.
object*"list""list"data*array<>next_cursor?stringThe after of the next page.
has_more*booleanTrue while results remain or the job is live.
curl -X GET 'https://inference.openrelay.inc/v1/async/jobs/string/results'{ "object": "list", "data": [ { "custom_id": "string", "status": "completed", "line": 0, "late": true, "started_at": 0, "completed_at": 0, "response": { "status_code": 0, "body": {} }, "error": { "code": "string", "message": "string", "status_code": 0, "body": {} }, "cost_nano_usd": 0 } ], "next_cursor": "string", "has_more": true}Cancel an async job POST
Stop starting the job's requests. Requests already running finish and are charged; the rest end cancelled at no charge. A job that has not started ends cancelled at once; a running one answers cancelling until its in-flight requests finish.
Overview
Input and result files for the Batch API (JSONL, up to 200 MB and 50,000 records). Served by the inference endpoint (inference.openrelay.inc).