SnapEditDocs
API Reference

Edit image with AI prompt

general-edit-of-qwen-image-editinpaint-of-qwen-image-edit

Edit 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.

post/v1/images/edits

Credit cost: 13

AuthorizationThis endpoint requires an API key. Pass it in the api-key header on every request. See the quickstart

Body

NameTypeStatusDescription
input_image
fileRequiredImage file or URL to edit.
prompt
stringRequiredNatural language editing instruction.
mode
stringRequiredEditing mode. Use inpaint with input_mask.
editinginpaint
input_mask
fileOptionalMask image file or URL for inpaint mode.

Responses

Image edited successfullySingleImageResponse

NameTypeDescription
createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL 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"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ]
}

Examples

(2 examples)

Prompt

transform the image into anime style

Input

Input 1

Output

Output