POST
https://your-instance.com/v1/images/editsTakes multipart form data rather than JSON. Supply the source image and a prompt describing the change; supply a mask as well to confine the edit to part of the frame.
modelstringrequiredImage model to use.
imagefilerequiredThe image to edit.
promptstringrequiredWhat the edited image should look like.
maskfileTransparent areas mark where the edit applies. Must match the source dimensions.
nintegerdefault: 1How many variations to produce.
sizestringdefault: "1024x1024"Output dimensions.
curl
curl https://your-instance.com/v1/images/edits \ -H "Authorization: Bearer $CLAWROUTER_API_KEY" \ -F model="gpt-image-2" \ -F image="@room.png" \ -F mask="@wall-mask.png" \ -F prompt="Repaint the wall deep green"
