Cancel a queued job, or a running download
const url = 'http://localhost:8300/v1/studio/admin/model-jobs/example/cancel';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8300/v1/studio/admin/model-jobs/example/cancel \ --header 'Authorization: Bearer <token>' \ --header 'x-api-key: <x-api-key>'Admin only (403). Queued: cancelled at once, never sent. cancels key <job_id>; the runner stops within 2 s, keeps the partial files (the variant shows partial; a new download resumes them) and reports cancelled; if the env’s hosts key is gone or older than 60 s, studio 409 a running delete cannot be cancelled, job already ended. Answers the job as it is now.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Model job UUID (malformed = 404)
Responses
Section titled “Responses”The job
object
The runner env that does it (the one whose models or loras key lists the model or LoRA)
Download, delete
Download: the variant; delete: null = every variant (or the add-on’s)
Download and delete: the optional add-on instead of a variant (variant null)
Lora_delete
Qwen Image 2.1 · Turbo, or the LoRA’s name
Delete: the shared components it leaves on disk, decided when it was queued; [] otherwise
object
The variants on the host that still load it
The admin’s user id
The first running status
Example
{ "kind": "download", "title": "Qwen Image 2.1 · Turbo", "state": "queued", "failure": { "class": "not_found" }}Missing or invalid x-api-key (Kong), or missing/invalid/expired/revoked bearer token
object
Example generated
{ "detail": "example"}Valid token without the admin role: “admin role required”
object
Example generated
{ "detail": "example"}Not found
object
Example generated
{ "detail": "example"}The resource’s state forbids this
object
Example generated
{ "detail": "example"}Retryable
object
Example generated
{ "detail": "example"}