1
Register the file
asset_id (what you will pass to a generation), upload_url (where to PUT
the bytes) and required_headers (send them exactly). Send the file’s exact byte count in
size_bytes; a smaller, empty or larger PUT is rejected. For video and audio, send
duration_seconds too.2
PUT the file
required_headers from the previous response exactly as given; the declared size is
signed as both the minimum and maximum. Successful uploads therefore match the size
registered for the asset and reserved against your storage quota. Upload URLs expire
after ten minutes. Register the file again if you miss it.3
Use the asset id in a generation
GET /v1/models/{id} names the reference inputs each model and mode accept (first_frame,
reference_images, motion_video, …) and which are required.Accepted files
Images (PNG, JPEG, WebP, GIF, AVIF) up to 20 MiB, video (MP4, MOV, WebM) up to 1 GiB, and audio (MP3, WAV, M4A) up to 100 MiB. MIME aliases such asaudio/m4a,
audio/x-m4a and audio/x-wav are normalized; use the returned Content-Type header
for the PUT. Audio WebM is not supported by this upload endpoint.
Per-model limits on count, duration and frame rate come from GET /v1/models/{id}; a request that breaks them is
rejected before any credit is reserved.
An asset id must belong to your organization and be visible to the key’s creator, the same rule
the app’s Assets library applies. Uploaded files appear in that library like any other upload.