Use POST /api/v1/hub/files to obtain a temporary URL for model fields with the URI format.
The multipart field must be named file. The maximum size is 50 MiB by default. It can be lower depending on the service configuration.
Reuse a file by its hash
Model fields with the URI format accept either the temporary URL or a sha256:<64 hexadecimal characters> reference. Build this reference from the sha256 property returned by the upload.
The reference resolves only to an unexpired file uploaded by the same account. An unknown or expired hash, or one owned by another account, returns 400 invalid_input when you submit the generation.
Accepted types
Images: image/png, image/jpeg, image/webp, image/gif.
Video: video/mp4, video/webm, video/quicktime.
Audio and documents: audio/mpeg, audio/wav, audio/ogg, application/pdf, application/octet-stream.
Uploaded files expire after 24 hours by default. Generated outputs expire after 7 days by default. The effective values remain available in expires_at and can vary with the service configuration. An expired download returns 410 file_expired.