general-edit-of-qwen-image-editinpaint-of-qwen-image-editEdit an image using natural language prompts powered by the Qwen-Image-Edit model. Use editing for general image edits and inpaint when editing a selected masked region.
/v1/images/editsCredit cost: 13
Authorization — This endpoint requires an API key. Pass it in the api-key header on every request. See the quickstart
| Name | Type | Status | Description |
|---|---|---|---|
input_image | file | Required | Image file or URL to edit. |
prompt | string | Required | Natural language editing instruction. |
mode | string | Required | Editing mode. Use inpaint with input_mask.editinginpaint |
input_mask | file | Optional | Mask image file or URL for inpaint mode. |
Image edited successfullySingleImageResponse
| Name | Type | Description |
|---|---|---|
created | integer | Unix timestamp of when the response was created |
data | object[] | |
url | string | URL to download the result image |
curl -X POST "https://api.snapapi.ai/v1/images/edits" \
-H "api-key: YOUR_API_KEY" \
-F "input_image=@./image.jpg" \
-F "prompt=value" \
-F "mode=editing" \
-F "input_mask=@./image.png"{
"created": 1745827200,
"data": [
{
"url": "https://outputs.snapapi.ai/outputs/abc123.png"
}
]
}