Skip to main content
POST /v1/images/edits uses multipart form-data. Use this endpoint when you want to modify one or more uploaded images rather than generate a new image from scratch.

Common fields

Multipart Example

Notes

  • at least one image must be provided
  • mask is optional
  • response_format can be url or b64_json
  • prompt and output usage are tracked separately from input image usage

Common mistakes

  • sending JSON instead of multipart form-data
  • forgetting that mask is optional but uploaded images are not
  • using image edits when plain image generation would be simpler

Reference