Start uploading an own LoRA
const url = 'http://localhost:8300/v1/studio/loras';const options = { method: 'POST', headers: { 'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"filename":"example","bytes":1}'};
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/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).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Must end in .safetensors; the name without it becomes the LoRA’s name
Example generated
{ "filename": "example", "bytes": 1}Responses
Section titled “Responses”The upload
object
State pending; pass its id to /v1/studio/loras/{lora_id}/complete
object
Shared: the file’s SHA-256; mine: a UUID
Shared: a file on the GPU hosts (registry <host>.<env>.loras), usable by everyone; mine: the caller’s own upload
The model family it fits (qwen-image), or unknown (it fits no family published now, or not checked yet)
The largest A/B rank
From the file’s metadata (modelspec.license, else license); null when it names none
Shared: the live hosts that have it (sorted); mine: [] (any host fetches it on first use)
Own LoRAs: pending (created, not completed), ready (checked and indexed), rejected (a check failed: reason); shared ones are always ready
Rejected: why (the complete call’s 422 detail); null otherwise
Mine: the upload’s creation; shared: the file’s mtime (the oldest over its hosts)
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
Signed single-use link: PUT the file here with exactly this Content-Type and Content-Length
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
object
Example generated
{ "detail": "example"}The resource’s state forbids this
object
Example generated
{ "detail": "example"}Invalid input
object
Example generated
{ "detail": "example"}Retryable
object
Example generated
{ "detail": "example"}