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

Start uploading an own LoRA

POST
/v1/studio/loras
curl --request POST \
--url http://localhost:8300/v1/studio/loras \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "filename": "example", "bytes": 1 }'

Stores the caller’s LoRA pending (name = the file name without .safetensors, trimmed, cut to 80) and signs a single-use PUT link for u/<caller>/loras/<lora_id>.safetensors with Content-Type: application/octet-stream, valid 15 minutes (PUT /files/{path}, the take upload’s pattern). 422 only .safetensors files can be uploaded (the name must end in .safetensors, any case; the bytes are checked at complete), file is larger than 2 GB (over 2147483648 bytes). 409 You have 50 LoRAs; delete some first. (every own LoRA counts, whatever its state) and 409 Your LoRAs would use more than 20 GB; delete some first. (size_bytes of the pending and ready ones, deleted ones included until the sweep removes their object a day later, plus this one, over 21474836480). A LoRA still pending an hour after it was created is deleted (with its object).

Media typeapplication/json
object
filename
required

Must end in .safetensors; the name without it becomes the LoRA’s name

string
>= 1 characters <= 255 characters
bytes
required
integer
>= 1 <= 2147483648

Example generated

{
"filename": "example",
"bytes": 1
}

The upload

Media typeapplication/json
object
lora
required

State pending; pass its id to /v1/studio/loras/{lora_id}/complete

object
id
required

Shared: the file’s SHA-256; mine: a UUID

string
/^([0-9a-f]{64}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/
source
required

Shared: a file on the GPU hosts (registry <host>.<env>.loras), usable by everyone; mine: the caller’s own upload

string
Allowed values: shared mine
name
required
string
>= 1 characters <= 80 characters
family
required

The model family it fits (qwen-image), or unknown (it fits no family published now, or not checked yet)

string
rank
required

The largest A/B rank

integer | null
>= 1 <= 4096
size_bytes
required
integer
>= 1
key_style
required
One of:

How the file names its tensors

string
Allowed values: peft kohya comfyui
licence
required

From the file’s metadata (modelspec.license, else license); null when it names none

string | null
<= 200 characters
sha256
required
string | null
/^[0-9a-f]{64}$/
hosts
required

Shared: the live hosts that have it (sorted); mine: [] (any host fetches it on first use)

Array<string>
state
required

Own LoRAs: pending (created, not completed), ready (checked and indexed), rejected (a check failed: reason); shared ones are always ready

string
Allowed values: pending ready rejected
reason
required

Rejected: why (the complete call’s 422 detail); null otherwise

string | null
thumb_url
required
One of:

Signed, time-limited link; opaque

string
created_at
required

Mine: the upload’s creation; shared: the file’s mtime (the oldest over its hosts)

string format: date-time
prefused

Shared only: the title of a model a host publishes with this LoRA pre-fused into its weights (its file cannot be deleted: delete the model instead); absent otherwise

string
>= 1 characters
upload_url
required

Signed single-use link: PUT the file here with exactly this Content-Type and Content-Length

string
content_type
required
string
Allowed value: application/octet-stream
bytes
required
integer
expires_at
required
string format: date-time

Example

{
"lora": {
"source": "shared",
"family": "qwen-image",
"key_style": "peft",
"state": "pending",
"thumb_url": "/files/u/7d1e.../runs/3c9a.../0.png?exp=1767225600&sig=ab12"
},
"upload_url": "/files/u/7d1e.../loras/2c4e....safetensors?exp=1767225600&bytes=18874368&ct=application%2Foctet-stream&sig=ab12",
"content_type": "application/octet-stream"
}

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"
}

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"
}