Skip to content
Alphahelmstudio is early software: things will change, and some will break.What's newReport an issue

Queue a download of a variant's weights to one host (a model job)

POST
/v1/studio/admin/models/{model}/download
curl --request POST \
--url http://localhost:8300/v1/studio/admin/models/example/download \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "host": "example", "variant": "example", "addon": "example", "accept_licence": true }'

Admin only (403). 202 with the new job, queued; 200 with the existing job when a download of the same (host, model, variant) is already queued or running (idempotent). The runner of the env whose models key lists the model on that host fetches the variant’s source (and any shared component of its owner variant not already on the host with matching hashes) into <models root>/<dir>/ as plain files. 404 for a model no host publishes. 422 host <host> has no env for <model>, <model> has no variant <variant>, <title> <variant> has no download source, licence <id> must be accepted (the variant’s source.must_accept and accept_licence not true). 409 <title> <variant> is already on <host> (state present), a delete of <title> on <host> is unfinished; runner’s hosts key reports models_disk.writable: false). add-on instead: 422 <model> has no add-on <addon>, give a variant or an add-on, not both, <title> <add-on title> has no download source; 409 <title> <add-on title> is already on <host>.

model
required
string

A model id of the registry (qwen-image-2.1; unknown or malformed = 404)

Media typeapplication/json
object
host
required
string
/^[a-z0-9]{1,32}$/
variant

Absent = the model’s first variant

string
/^[a-z0-9][a-z0-9_-]{0,63}$/
addon

Download this optional add-on (Model.addons[].component) instead of a variant; never with variant

string
/^[a-z][a-z0-9_]{0,63}$/
accept_licence

True: the admin accepted the variant’s licence text as GET /v1/studio/models showed it; required when its must_accept is true

boolean

Example generated

{
"host": "example",
"variant": "example",
"addon": "example",
"accept_licence": true
}

The same download, already queued or running

Media typeapplication/json
object
id
required
string format: uuid
kind
required
string
Allowed values: download delete lora_delete
host
required
string
env
required

The runner env that does it (the one whose models or loras key lists the model or LoRA)

string
model
required

Download, delete

string | null
variant
required

Download: the variant; delete: null = every variant (or the add-on’s)

string | null
addon
required

Download and delete: the optional add-on instead of a variant (variant null)

string | null
lora_id
required

Lora_delete

string | null
/^[0-9a-f]{64}$/
title
required

Qwen Image 2.1 · Turbo, or the LoRA’s name

string
state
required
string
Allowed values: queued running succeeded failed cancelled
progress
required
One of:
object
done_bytes
required
integer
total_bytes
required
integer | null
files_done
required
integer
files_total
required
integer | null
file
required
string | null
eta_s
required
number | null
failure
required
One of:
object
class
required

Host_lost: the host stopped responding while the job was released

string
Allowed values: not_found gated licence disk_full hash_mismatch network in_use not_downloadable internal host_lost
detail
required
string
result
required
One of:
object
bytes
integer
files
integer
freed_bytes
integer
reused
Array<string>
separate
Array<string>
kept
Array<string>
keeps
required

Delete: the shared components it leaves on disk, decided when it was queued; [] otherwise

Array<object>
object
component
required
string
from_variant
required
string
for
required

The variants on the host that still load it

Array<string>
>= 1 items
licence
required
One of:
object
id
required
string
sha256
required
string
/^[0-9a-f]{64}$/
requested_by
required

The admin’s user id

string format: uuid
created_at
required
string format: date-time
started_at
required

The first running status

string | null format: date-time
ended_at
required
string | null format: date-time

Example

{
"kind": "download",
"title": "Qwen Image 2.1 · Turbo",
"state": "queued",
"failure": {
"class": "not_found"
}
}

The job, queued

Media typeapplication/json
object
id
required
string format: uuid
kind
required
string
Allowed values: download delete lora_delete
host
required
string
env
required

The runner env that does it (the one whose models or loras key lists the model or LoRA)

string
model
required

Download, delete

string | null
variant
required

Download: the variant; delete: null = every variant (or the add-on’s)

string | null
addon
required

Download and delete: the optional add-on instead of a variant (variant null)

string | null
lora_id
required

Lora_delete

string | null
/^[0-9a-f]{64}$/
title
required

Qwen Image 2.1 · Turbo, or the LoRA’s name

string
state
required
string
Allowed values: queued running succeeded failed cancelled
progress
required
One of:
object
done_bytes
required
integer
total_bytes
required
integer | null
files_done
required
integer
files_total
required
integer | null
file
required
string | null
eta_s
required
number | null
failure
required
One of:
object
class
required

Host_lost: the host stopped responding while the job was released

string
Allowed values: not_found gated licence disk_full hash_mismatch network in_use not_downloadable internal host_lost
detail
required
string
result
required
One of:
object
bytes
integer
files
integer
freed_bytes
integer
reused
Array<string>
separate
Array<string>
kept
Array<string>
keeps
required

Delete: the shared components it leaves on disk, decided when it was queued; [] otherwise

Array<object>
object
component
required
string
from_variant
required
string
for
required

The variants on the host that still load it

Array<string>
>= 1 items
licence
required
One of:
object
id
required
string
sha256
required
string
/^[0-9a-f]{64}$/
requested_by
required

The admin’s user id

string format: uuid
created_at
required
string format: date-time
started_at
required

The first running status

string | null format: date-time
ended_at
required
string | null format: date-time

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

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Valid token without the admin role: “admin role required”

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Not found

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

The resource’s state forbids this

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Invalid input

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Retryable

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}