Files
Send images, video and audio as input, as an https URL or a data URI.
Use one file for a file input or a list for a files input. Send each file as one of these strings:
- an
httpsURL the API can download, or - a
data:URI with the file inside (data:image/png;base64,iVBORw0...).
{
"model": "<model-id>",
"mode": "edit",
"input": {
"prompt": "make it night",
"image": "https://example.com/street.jpg"
}
}Sizes
- A request body can be up to 64 MB, data URIs included (
413above that). - Send larger files as an
httpsURL. Video can be up to 300 MB. - Each model says what it takes in its input schema: containers (
png,mp4, ...), the largest file, the smallest and largest side in pixels, the width to height ratio and the length in seconds. A file outside them answers422 invalid_input.
Output files
Files the model makes are links in output.files[].url, valid for one hour. See Requests.