Skip to main content
Edit or outpaint an image from a source image and prompt (inpainting, local changes, etc.).

Basics

  • Endpoint: POST /v1/images/edits/
  • Host: https://tokensmind.ai
  • Auth: Bearer Token
  • Content-Type: multipart/form-data (file upload—use form data)

Form fields


Response

200 OK

cURL example


Notes

  1. PNG only—editing relies on the alpha channel to mark regions to repaint.
  2. Mask behavior
    • With mask, transparent areas of the mask are edited.
    • Without mask, transparent areas of image are edited.
  3. Square images—input must be 1:1.