Qwen Image Edit Inpaint

36.00 credits/MP
ae_qwen_image_edit_inpaint

Edit selected parts of an image by filling a masked area with content described in a text prompt.

Image
36.00 credits/MP

Pricing

36.00 AE credits per MP. Charge for successfully returned images. Round each image up to a whole MP, then sum. One MP is 1,000,000 pixels.

36.00 credits/MP

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYesNo parameter description.—
request_body.seedinteger | unknownNo The same seed and the same prompt given to the same version of the model will output the same image every time. —
request_body.promptstringYesThe prompt to generate the image with—
request_body.mask_urlstringYesThe URL of the mask for inpainting—
request_body.strengthnumberNoStrength of noising process for inpainting0.93
request_body.image_urlstringYesThe URL of the image to edit.—
request_body.sync_modebooleanNoIf `True`, the media will be returned as a data URI and the output data won't be available in the request history.false
request_body.image_sizeobject | string | unknownNoThe size of the generated image.—
request_body.image_size.widthintegerNoThe width of the generated image.512
request_body.image_size.heightintegerNoThe height of the generated image.512
request_body.num_imagesintegerNoThe number of images to generate.1
request_body.accelerationenum (none | regular | high)NoAcceleration level for image generation. Options: 'none', 'regular'. Higher acceleration increases speed. 'regular' balances speed and quality.regular
request_body.output_formatenum (jpeg | png)NoThe format of the generated image.png
request_body.guidance_scalenumberNo The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. 4
request_body.negative_promptstringNoThe negative prompt for the generation
request_body.num_inference_stepsintegerNoThe number of inference steps to perform.30
request_body.enable_safety_checkerbooleanNoIf set to true, the safety checker will be enabled.true

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key

Submit first, then query with the returned task_id until the task completes.

Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_qwen_image_edit_inpaint' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "guidance_scale": 4,
      "image_size": {
        "height": 2816,
        "width": 1584
      },
      "image_url": "https://v3b.fal.media/files/b/0ab1cbb2/0qB8Vmlk_b7Ed-9EOTnX8_0i9MOJcA.png",
      "mask_url": "https://file.gw.xnetwk.net/file/6323003e-3836-4426-9bb0-f4a42b199e6c.png",
      "negative_prompt": "Chinese characters, calligraphy, handwriting, text, writing, letters, symbols, inscriptions, watermark, logo",
      "num_inference_steps": 30,
      "output_format": "png",
      "prompt": "A completely blank weathered dark wooden plaque surface with uniform aged wood grain and subtle weathering, absolutely NO writing, NO Chinese characters, NO calligraphy, NO inscriptions, NO carved strokes, NO symbols. Keep the same dark wood tone, texture and lighting as the surrounding plaque frame. Everything outside the masked area must stay exactly unchanged.",
      "seed": 42,
      "strength": 0.93
    }
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "description": "task accepted; poll the result via query_tool with this task_id",
  "query_tool": "ae_get_result",
  "status": "created",
  "task_id": "8d99eae1-c6cb-429c-8786-5f357ef4d97e"
}

This example shows part of the response. Copied content is valid JSON.