Jobs

Stop a job that is still running

Settles what it was worth; does not delete the row. Photo refunds in full, music and video bill the fraction made, 3D keeps the completed stages' shares. Cancelling something already finished is 200 with cancelled:false, not an error. A job that is charged but has no provider_job_id yet answers 200 with cancelled:true and settled:false: the stop is recorded on it and carried out as soon as it has one, or once it can no longer get one — refund included, and in full for a job that finished before the stop could reach it, whose output is withheld; poll it to see it settle. 3D can answer 409 cancel_refused when it cannot stop the job. A catalogue model that cannot be stopped once it starts answers 409 cancel_not_offered — it keeps running and keeps being charged — and a product with no cancel at all (chat) answers 400 cancel_unsupported.

DELETE
/v1/jobs/{id}
DELETE
/v1/jobs/{id}
Stop a job that is still running
Settles what it was worth; does not delete the row.
Authorizationstringrequired
Your API key. It is sent only when you press Send, to this request alone, and never stored.
idstringrequired
Stop a job that is still running
curl --request DELETE \
  --url 'https://api.auray.ai/v1/jobs/{id}' \
  --header 'Authorization: Bearer <api-key>'
{
  "id": "<string>",
  "status": "<string>",
  "cancelled": true,
  "settled": true,
  "credits_charged": 123,
  "credits_reserved": 123,
  "settled_unknown": true
}
Stop a job that is still running
curl -X DELETE https://api.auray.ai/v1/jobs/photo_docs-mtpb1vnh \
  -H "Authorization: Bearer $AURAY_API_KEY"
{
  "id": "<string>",
  "status": "<string>",
  "cancelled": true,
  "settled": true,
  "credits_charged": 123,
  "credits_reserved": 123,
  "settled_unknown": true
}

Authorizations

Authorizationstringheaderrequired

Bearer auray_sk_… — A scope that may submit the job's model: the kind it makes (image:write, video:write, …) or the older product name (photo:write, auray-ai-video:write, external:write).

Path Parameters

idstringrequired

Response

application/json

OK

idstring
statusstring
Five words, whatever the product. Our internals disagree; you never see that. One of "queued", "running", "succeeded", "failed", "cancelled".
cancelledboolean
settledboolean
credits_chargedinteger
What the job cost, after the cancel's refund — the ledger's net. Null, with settled_unknown: true, when the ledger could not be read; the job read answers it once it can. May be null.
credits_reservedinteger
What was taken when the job was charged. May be null.
settled_unknownboolean
Present, and true, when the cancel happened and its figures could not be read.

Headers:

HeaderDescription
RateLimit-LimitBurst capacity.
RateLimit-Remaining
RateLimit-ResetSeconds until refill.
X-RateLimit-Limit
X-RateLimit-Remaining
X-RateLimit-ResetUnix seconds. The X- spelling is what client libraries read.
X-Request-Id

Was this page helpful?

Stop a job that is still running
curl -X DELETE https://api.auray.ai/v1/jobs/photo_docs-mtpb1vnh \
  -H "Authorization: Bearer $AURAY_API_KEY"
{
  "id": "<string>",
  "status": "<string>",
  "cancelled": true,
  "settled": true,
  "credits_charged": 123,
  "credits_reserved": 123,
  "settled_unknown": true
}

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close search.