image parameter on an image-to-image or image-to-video request. Every media
parameter accepts the same four forms, so you can use whichever fits your app:
Uploaded files and a model’s outputs are ephemeral — stored privately and deleted
about 24 hours after creation. Re-upload if you need them again.
Option 1 — Upload a file
POST /v1/uploads accepts a multipart/form-data body with a single file field
(image, video, or audio; max 50 MB) and returns a short-lived URL.
url as the media parameter:
Option 2 — Pass a public URL or base64 directly
No upload step needed — hand the model a public URL, a data URI, or raw base64:http/https. Private, loopback, and internal addresses are rejected.
Accepted formats
- Image — PNG, JPEG, WebP, GIF
- Video — MP4, WebM
- Audio — MP3, WAV, OGG
Content-Type you send.
A media parameter only accepts media of the matching kind (an image parameter requires
an image).
Image inputs are resized automatically
Input images whose longest edge is over 2048 px, or that are larger than 4 MB, are downscaled for you before the model sees them. Very large inputs (a 4K photo straight off a phone) make generations slow and can time them out, without improving the result — models work at or below this resolution internally either way.- The aspect ratio is preserved, so
match_input_imageand similar options behave exactly as they would on the original. - Images already within those limits are passed through byte for byte.
- Transparency is preserved: a PNG that uses an alpha channel stays a PNG.
- Output resolution is unaffected — it comes from the model’s own size parameters, not from the input image.
Notes
- Uploads are not charged — you’re billed only when a generation succeeds.
- Uploading requires the same plan access as generation. Because uploads are free,
POST /v1/uploadsalso has a dedicated 60 uploads/min per account cap (a rolling window) on top of the global request limits — see Rate limits. - Which models accept a media input, and under what parameter name, is listed on each model’s API reference page.