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:
| Form | When to use |
|---|---|
| Uploaded-file URL | You have a local file and no public URL. Upload it once (below), pass the returned url. |
| Public URL | The image already lives at a public https:// address. Pass it directly. |
| Data URI | Small inline images: data:image/png;base64,iVBORw0... |
| Raw base64 | The bare base64 string, no prefix. |
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).
Notes
- Uploads are not charged — you’re billed only when a generation succeeds.
- The same plan access and rate limits that apply to generation apply to uploads.
- Which models accept a media input, and under what parameter name, is listed on each model’s API reference page.