Create image edit
Edit one or more input images from a text prompt.
/model/v1/images/edits● SupportedRequest body
modelstring必填Image model id; list candidates with listModels?type=image. Router support (supported): Verified to take effect.
Verified to take effect.
promptstring必填Text description of the desired edit. Router support (supported): Verified to take effect.
Verified to take effect.
imagearray必填Source images as base64 data URLs.
maskstring可选○ UnsupportedMask that marks the region to edit, as a base64 data URL or multipart file. Router support (unsupported): The tested PNG mask returns 400 and is currently unusable.
The tested PNG mask returns 400 and is currently unusable.
nnumber可选Number of edited images to generate. Router support (supported): Verified to take effect.
Verified to take effect.
sizestring可选Size of the edited images. Router support (supported): Verified to take effect.
Verified to take effect.
image[]array可选Source images, uploaded as multipart files. Router support (supported): Accepts multipart files or JSON data URLs.
Accepts multipart files or JSON data URLs.
Returns
200
Platform errors (auth, rate limits, validation) and OCR errors use problem+json; other model call errors follow the endpoint's own format (OpenAI or Anthropic) — see error codes
Response
HTTP 200
Edited images
application/json
| Name | Type | Description |
|---|---|---|
| created | number | Unix time in seconds at which the images were created. |
| data | array<object> | Edited images. |
| data[].url | string | URL of the image; present when response_format is `url`. |
| data[].b64_json | string | Base64-encoded image; present when response_format is `b64_json`. |