Skip to content

Image Edits

For Image Editing models, see the list of models with Edit label.

Terminal window
curl -X POST "https://api.imagerouter.io/v1/openai/images/edits" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "prompt=YOUR_PROMPT" \
-F "model=openai/gpt-image-1" \
-F "image[]=@your_image1.webp" \
-F "image[]=@your_image2.webp" \
-F "mask[]=@your_mask.webp"

Post parameners:

  • prompt* Text prompt for editing the image.
  • model* Model to use for image editing. Select from models that has “edit” label on them.
  • image[]* Image files to be edited. Different models support different quantity of input images (usually 1 to 16).
  • mask[] Some models require a mask file to specify areas to edit.
  • quality [auto, low, medium, high] - default “auto”; Supported models have “quality” feature label here
  • response_format [url, b64_json] - default “url”.

Currently, size is not supported. Please contact me if you miss anything.