How is my job doing
Read one job, reconciling it first where that is possible. Photo, music and 3D are polled against their own service, so this is the call that turns a stale row into a settled one. VIDEO AND CHAT ARE NOT POLLED and deliberately so — video settles from its callback and chat from the turn itself, so for those two this reports what is already stored. poll_after_seconds is present only while the job is unsettled, so a loop can stop on its absence rather than on a status it has to interpret. A job is kept seven days: after that its request and its results are deleted and this answers 404, so fetch what you need before then.
curl https://api.auray.ai/v1/jobs/photo_docs-mtpb1vnh \
-H "Authorization: Bearer $AURAY_API_KEY"import { createClient } from "@auray/client";
const auray = createClient(); // reads AURAY_API_KEY
console.log(await auray.platform.jobs.get("photo_docs-mtpb1vnh"));from auray_client import Client
auray = Client() # reads AURAY_API_KEY
print(auray.platform.jobs.get("photo_docs-mtpb1vnh"))const res = await fetch("https://api.auray.ai/v1/jobs/photo_docs-mtpb1vnh", {
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/photo_docs-mtpb1vnh",
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/photo_docs-mtpb1vnh", 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/photo_docs-mtpb1vnh");
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/photo_docs-mtpb1vnh")
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/photo_docs-mtpb1vnh"))
.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/photo_docs-mtpb1vnh");
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");{
"id": "<string>",
"job_id": "<string>",
"object": "<string>",
"product": "<string>",
"model": "<string>",
"engine": "<string>",
"status": "<string>",
"provider_job_id": "<string>",
"credits_charged": 123,
"credits_reserved": 123,
"coverage": {
"by": "<string>",
"pass": "<string>",
"bundle": "<string>"
},
"settled": true,
"poll_after_seconds": 123,
"give_up_after_seconds": 123,
"assets": [
{
"index": 123,
"kind": "<string>",
"key": "<string>",
"bytes": 123,
"width": 123,
"height": 123,
"stage": "<string>",
"seconds": 123,
"sample_rate": 123,
"channels": 123,
"fps": 123,
"resolution": "<string>",
"has_audio": true,
"seed": 123
}
],
"request_id": "<string>",
"conversation_id": "<string>",
"content": "<string>",
"finish_reason": "<string>",
"usage": {
"prompt_tokens": 123,
"cached_prompt_tokens": 123,
"completion_tokens": 123,
"reasoning_tokens": 123
},
"reasoning": "<string>",
"created_at": "<string>",
"error": "<string>",
"error_code": "<string>",
"error_basis": "<string>",
"refused": 123,
"upstream_lost": true,
"resubmitted": true
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}Authorizations
Bearer auray_sk_… — jobs:read.
Path Parameters
Query Parameters
"true".OK
id here, request_id on the queue host (the queue protocol's name for it)."job".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".id on GET /v1/models — as the submit answered it; null otherwise. May be null."queued", "running", "succeeded", "failed", "cancelled".credits_charged is 0: {"by": "pass", "pass": "seedance-2-5"} names the pass (null when the grant ended more than seven days ago), with bundle beside it when the pass came from a bundle you chose; {"by": "promotion"} a promotion. Absent on a job your credits paid for.Show child attributes
"pass", "promotion".photos-week. Absent for a pass bought or given.created_at — the longest it may wait to start plus the longest it may run before it is stopped and refunded, the figure its submit answered. Waiting longer is waiting for nothing; the official clients wait this long by default. For a catalogue model the part it may run is its reap: lifecycle.stall_ceiling_seconds on GET /v1/models, lengthened for a video asked for more seconds than the length that figure is set for, in proportion to the seconds asked — so this give_up_after_seconds, not the listing's figure, is the one to wait by. Otherwise these are the shipped clocks: we may lengthen them in an incident, never shorten them.Show child attributes
"image", "audio", "video", "model".seed with the same prompt and settings and it usually renders the same clip; a clip made from reference pictures or a first frame may differ in fine detail. May be null.Show child attributes
include_reasoning=true was asked for. Often several times the length of the answer. Chat jobs only; absent on every other product.error_code prohibited_content when the model's maker said what it refused: output — it rejected what the model made; output_copyright — it rejected what the model made and said it may be related to copyright; output_audio — it rejected the sound of what the model made; output_audio_copyright — it rejected the sound and said it may be related to copyright; input_copyright — it refused what it was sent and said it may be related to copyright; input_real_person — it refused what it was sent and said it may show a real person. Absent otherwise, including when the maker refused what it was sent and said neither. One of "output_copyright", "output", "output_audio_copyright", "output_audio", "input_copyright", "input_real_person".true.true.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 |
job_read_failed — your job could not be read. It does not say the job is missing: a failed lookup used to answer 404 not_found, which asserts the id is wrong or not yours, and neither had been established. Retry; the job is untouched.
The error body: error, message, docs (the entry that explains it) and request_id.
Was this page helpful?
curl https://api.auray.ai/v1/jobs/photo_docs-mtpb1vnh \
-H "Authorization: Bearer $AURAY_API_KEY"import { createClient } from "@auray/client";
const auray = createClient(); // reads AURAY_API_KEY
console.log(await auray.platform.jobs.get("photo_docs-mtpb1vnh"));from auray_client import Client
auray = Client() # reads AURAY_API_KEY
print(auray.platform.jobs.get("photo_docs-mtpb1vnh"))const res = await fetch("https://api.auray.ai/v1/jobs/photo_docs-mtpb1vnh", {
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/photo_docs-mtpb1vnh",
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/photo_docs-mtpb1vnh", 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/photo_docs-mtpb1vnh");
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/photo_docs-mtpb1vnh")
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/photo_docs-mtpb1vnh"))
.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/photo_docs-mtpb1vnh");
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");{
"id": "<string>",
"job_id": "<string>",
"object": "<string>",
"product": "<string>",
"model": "<string>",
"engine": "<string>",
"status": "<string>",
"provider_job_id": "<string>",
"credits_charged": 123,
"credits_reserved": 123,
"coverage": {
"by": "<string>",
"pass": "<string>",
"bundle": "<string>"
},
"settled": true,
"poll_after_seconds": 123,
"give_up_after_seconds": 123,
"assets": [
{
"index": 123,
"kind": "<string>",
"key": "<string>",
"bytes": 123,
"width": 123,
"height": 123,
"stage": "<string>",
"seconds": 123,
"sample_rate": 123,
"channels": 123,
"fps": 123,
"resolution": "<string>",
"has_audio": true,
"seed": 123
}
],
"request_id": "<string>",
"conversation_id": "<string>",
"content": "<string>",
"finish_reason": "<string>",
"usage": {
"prompt_tokens": 123,
"cached_prompt_tokens": 123,
"completion_tokens": 123,
"reasoning_tokens": 123
},
"reasoning": "<string>",
"created_at": "<string>",
"error": "<string>",
"error_code": "<string>",
"error_basis": "<string>",
"refused": 123,
"upstream_lost": true,
"resubmitted": true
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}