Input Formats
Input Methods
The API accepts media through image_uri, video_uri, and audio_uri parameters using three methods:
- Cloud Storage: upload with
v1/uploadand pass the returnedstorage_uri. - HTTPS URL: a public link the API downloads.
- Data URI: the file inline in the request, base64-encoded.
Each method has a size limit.
Cloud Storage Upload
Upload via v1/upload endpoint. Returns a storage_uri for use in generation requests. Pass it as-is.
HTTPS URL
Direct link to publicly accessible files. API fetches during request.
Requirements:
- HTTPS only
- Timeout: 30s
- Domain names (no IPs)
- Publicly accessible
- No redirects
- The response’s
Content-Typemust be one of the MIME types in Supported Formats. For example,image/jpgandapplication/octet-streamare rejected.
Data URI (Base64)
Inline base64-encoded data. Format: data:{mime-type};base64,{encoded-data}
413 request_too_large_error.Size limits
Cloud Storage and HTTPS URLs share the same limits. Data URIs have lower ones, measured on the encoded size.
Per-endpoint video limits
Video input is capped at 32 MB on most endpoints. These accept more:
To send a file this large, use Cloud Storage or an HTTPS URL. Data URI input keeps its own lower limit on every endpoint.
Supported Formats
Images
Videos
Video codecs: H.264, H.265, VP9, AV1, MPEG-4 Part 2, and MPEG-2. Some endpoints also accept ProRes.