Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
Skip to Content
API ReferenceInferenceAsync

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>
GET
/v1/async/jobs/{id}/results

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Path Parameters

id*string

Query Parameters

status?string

completed for only the completed results; failed for every result that did not complete (failed, expired or cancelled).

Value in"completed""failed"
after?string

The next_cursor of the previous page.

limit?integer
Range1 <= value <= 1000
Default100

Response Body

A page of results.

application/json
  1. 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"
Value in"list"
data*array<>
next_cursor?string

The after of the next page.

has_more*boolean

True while results remain or the job is live.

Example Request
curl -X GET 'https://inference.openrelay.inc/v1/async/jobs/string/results'
Example Response
{  "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}