Input Formats
Media input specification for the API
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.
200 MB is the upload endpoint cap. Each feature applies its own size limit when the file is used in a generation request (for example, images are capped at 15 MB), so a large upload may be rejected at generation time depending on the endpoint. See Per-endpoint video limits.
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}
Base64 encoding increases file size by ~33%. The whole JSON request body is capped at 32 MB, so a request carrying several data URIs can exceed it even when each fits its own limit. Over the cap, the API returns
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
Audio
Other PCM formats, such as 32-bit integer or 8-bit, are not supported.