Upload the bytes of a signed upload link (the signature is the auth; no API key)
const url = 'http://localhost:8300/files/example';const options = { method: 'PUT', headers: {'Content-Type': 'application/octet-stream'}, body: 'example'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:8300/files/example \ --header 'Content-Type: application/octet-stream' \ --data exampleOnly reachable through an upload_url from POST /v1/studio/uploads (images and audio, at most 50 MB) or POST /v1/studio/loras (u/<owner>/loras/<lora_id>.safetensors, application/octet-stream, at most 2 GiB). The signature is the lower-case hex HMAC-SHA256 (the /files secret) of "PUT\n" + path + "\n" + exp + "\n" + bytes + "\n" + ct; a GET link (path + "\n" + exp) never verifies as a PUT. The request must carry Content-Type equal to ct and Content-Length equal to bytes (no chunked body); the body is streamed to the object store under path with that content type. Single use: an existing object is never overwritten (409).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The object key, u/
Query Parameters
Section titled “Query Parameters”Expiry, unix seconds (missing = 403)
The exact body size (missing = 403)
The content type, URL-encoded (missing = 403)
HMAC signature (missing = 403)
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Stored
The gateway (Kong/nginx) refuses a path that climbs above the root (.. segments) before the API sees it
Bad or missing signature, expired link, or a path outside u/ or with ..
object
Example generated
{ "detail": "example"}“already uploaded”: the object exists
object
Example generated
{ "detail": "example"}“Content-Length must be the signed bytes”: missing, chunked, or another size
object
Example generated
{ "detail": "example"}“Content-Type must be the signed type”
object
Example generated
{ "detail": "example"}