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

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 list
GET
/v1/async/jobs

Authorization

apiKey
headerAuthorizationBearer <token>

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

Query Parameters

limit?integer
Range1 <= value <= 100
Default20
after?string

The last_id of the previous page.

status?string

Only the jobs with this status. One value; an unknown one is a 400.

Value in"queued""running""cancelling""completed""cancelled""failed"

Response Body

A page of jobs.

application/json
  1. response
object*"list"
Value in"list"
data*array<>
first_id?string
last_id?string

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