Start here
List jobs, newest first
/v1/jobson https://api.auray.ai/v1How a lost id is recovered.
How a lost id is recovered. Newest first across every product, or one with product. Every filter runs inside each product's read — settled and status narrow what is read, never a page after it was cut — so each page is full while older matches exist, and next_before is present exactly when there is another page, whether one product is listed or all of them. Statuses are as fresh as each job's last update; GET /jobs/{id} refreshes one.
#Authentication
Authorization: Bearer auray_sk_… — jobs:read.
#Request
#Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
product | any | no | |
limit | integer | no | 1 to 100. |
settled | string | no | true for jobs that have stopped (succeeded, failed or cancelled), false for those still queued or running. Any other value is refused 400 bad_value. One of "true", "false". |
status | string | no | One or more of queued, running, succeeded, failed, cancelled, separated by commas. Combined with settled, a job must match both. An unknown word is refused 400 bad_value with the allowed list. |
before | string | no | Cursor. Feed back the next_before from the previous page; the next page starts strictly older than it. |
model | string | no | Only jobs submitted to this address — the string each job prints as model. |
#Example request
curl https://api.auray.ai/v1/jobs \
-H "Authorization: Bearer $AURAY_API_KEY"import { createClient } from "@auray/client";
const auray = createClient(); // reads AURAY_API_KEY
const page = await auray.platform.jobs.list({ limit: 20 });
console.dir(page, { depth: null });from auray_client import Client
auray = Client() # reads AURAY_API_KEY
page = auray.platform.jobs.list(limit=20)
print(page)const res = await fetch("https://api.auray.ai/v1/jobs", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.AURAY_API_KEY}` },
});
console.log(await res.json());import os, requests
r = requests.get(
"https://api.auray.ai/v1/jobs",
headers={"Authorization": f"Bearer {os.environ['AURAY_API_KEY']}"},
)
r.raise_for_status()
print(r.json())package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.auray.ai/v1/jobs", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AURAY_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}<?php
$ch = curl_init("https://api.auray.ai/v1/jobs");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AURAY_API_KEY"),
],
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), " ", $response, PHP_EOL;require "net/http"
uri = URI("https://api.auray.ai/v1/jobs")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer #{ENV.fetch("AURAY_API_KEY")}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.code, res.bodyimport java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.auray.ai/v1/jobs"))
.header("Authorization", "Bearer " + System.getenv("AURAY_API_KEY"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System.Net.Http.Headers;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("AURAY_API_KEY"));
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.auray.ai/v1/jobs");
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");#Responses
#200 OK
OK
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
object | string | no | — | One of "list". |
data | object[] | no | — | |
data[].id | string | no | — | |
data[].job_id | string | no | — | The job's one id on every host: id here, request_id on the queue host (the queue protocol's name for it). |
data[].object | string | no | — | One of "job". |
data[].product | string | no | — | external covers every model somebody else runs, each at its own address. chat is accepted and delivers no webhook event: a chat turn is answered by the request that paid for it. One of "photo", "music", "video", "threed", "chat", "external". |
data[].model | string | no | — | The address the job was submitted to. May be null. |
data[].status | string | no | — | Five words, whatever the product. Our internals disagree; you never see that. One of "queued", "running", "succeeded", "failed", "cancelled". |
data[].credits_charged | integer | no | — | What the job cost, after any refund — the ledger's net for it, the same figure on every door. |
data[].credits_reserved | integer | no | — | What was taken when the job was charged, before any refund. |
data[].settled | boolean | no | — | |
data[].origin | string | no | — | Which door the job came in by. NOT the same vocabulary as /usage, which says app rather than ui for the same idea — the jobs tables and the credit ledger were given different words and both are load-bearing. Chat turns always read ui: chat_messages has no origin column. One of "ui", "api". |
data[].created_at | string | no | — | When it was submitted. This is the field the list is ordered by, and the value to feed back as ?before=. |
next_before | string | no | — | Present exactly when there is another page. It is the created_at of the last row read for this page. May be null. |
request_id | string | no | — | Mirrored in the X-Request-Id header. It sits here, on the envelope, not on each item. |
Headers:
| Header | Description |
|---|---|
RateLimit-Limit | Burst capacity. |
RateLimit-Remaining | |
RateLimit-Reset | Seconds until refill. |
X-RateLimit-Limit | |
X-RateLimit-Remaining | |
X-RateLimit-Reset | Unix seconds. The X- spelling is what client libraries read. |
X-Request-Id |
#400 Bad Request
#401 Unauthorized
#403 Forbidden
#429 Too Many Requests
#500 Internal Server Error
job_read_failed — one product's jobs could not be read, and product says which. It used to be answered as a list without that product's jobs; retry, nothing changed.
The error body: error, message, docs (the entry that explains it) and request_id.
#503 Service Unavailable
#Status codes
| Status | Meaning |
|---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
429 | Too Many Requests |
500 | job_read_failed — one product's jobs could not be read, and product says which. |
503 | Service Unavailable |
Every refusal names its code, and every code is explained at Errors.