Images
Edit image
Create new images from input images and a prompt with a model served on the Images API
/v1/images/editsCreate new images from one or more input images and a prompt that says what to keep and what to change. Send the images as files in a multipart/form-data body, as client.images.edit in the OpenAI SDK does, or as base64 data URLs in a JSON body. This endpoint follows the OpenAI Images API.
It serves models whose endpoints in the List models API contain /v1/images/edits. To make a variation of an image, send it here and describe the variation in the prompt. See Edit an image for a walkthrough, and OpenAI Images API compatibility for how each field is handled.
An Images API model ID: a model whose endpoints in the List models API contain this route.
An input image file: PNG, JPEG or WebP, up to 20 MiB. For several images, repeat the field, up to the model's number of input images (meta/muse-image-1.0 takes up to 10). Send the images as image or as image[].
The same as image, under the name some clients use for several files. Send the images as image or as image[].
An image that marks the area to edit, on models that take one; rejected (400) on others, including meta/muse-image-1.0.
How many images to return, from 1 to the model's maximum. A larger value returns 400 with the maximum in the message. meta/muse-image-1.0 returns up to 10.
auto or WIDTHxHEIGHT, on models that take it. The model chooses the exact pixel dimensions and can treat the value as a shape: a 1024x1024 request to meta/muse-image-1.0 returned 1600x1600 images.
The file format of the returned images, on models that take it, with the values each model allows. meta/muse-image-1.0 takes png, jpeg or webp, and returns webp when it is left out.
Image quality, on models that take it; rejected (400) on others, including meta/muse-image-1.0.
Background, such as transparent or opaque, on models that take it; rejected (400) on others, including meta/muse-image-1.0.
How closely to keep the input images, on models that take it; rejected (400) on others, including meta/muse-image-1.0.
response_formatenum<string>default: "b64_json"
Images are always returned as base64 in b64_json. url is rejected (400).
Available options:b64_json
Return the result as server-sent events. The API sends one completed event per image once all images are ready; it sends no partial images.
One entry per image returned.
The size of the returned images when the model reports it; otherwise the size you asked for. Read the dimensions from the image file if you depend on them.
Token counts the model reports, for information only: the Images API bills per image returned, not per token. Omitted when the model reports none.
Show child attributes
Present only when the model reports it.