Qwen Image Edit Inpaint

alibaba/qwen-image-edit/inpaint

Qwen Image Edit Inpaint is Alibaba's intelligent image editing model. Transform, retouch, and reimagine existing images using text prompts - from background replacement to artistic style conversion.

Base price
$0.03USD / run
Execution
async
Model type
image
Input fields
7

Try the model

Playground

Open playground
Input
The prompt to generate the image with

PNG, JPEG, WebP, or GIF · 20 MiB maximum

The URL of the image to edit.

PNG, JPEG, WebP, or GIF · 20 MiB maximum

The URL of the mask for inpainting
0.011
Strength of noising process for inpainting Range: 0.01 to 1.
The format of the generated image. Allowed values: jpeg, png.
The aspect ratio of the generated image. Allowed values: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16.
The same seed and the same prompt given to the same version of the model will output the same image every time.
OutputReady

Your output will appear here

Complete the inputs, then click Run.

Specifications

Pricing

Base price
$0.03 / run

Context & modalities

Input
Schema-defined
Output
image

Capabilities

Chat
Not supported
Vision
Not supported
Reasoning
Not supported
Structured output
Not supported
Function calling
Not supported
Audio input
Not supported

Access

Provider
Alibaba
Model ID
alibaba/qwen-image-edit/inpaint
Execution
async
API
Unified Run API
Endpoint
/v1/run

API README

Qwen Image Edit Inpaint

Qwen Image Edit Inpaint is a Qwen Image masked reconstruction route that combines visual-semantic understanding with image synthesis. It interprets subjects, spatial relationships, typography, and appearance as connected parts of one design, allowing the generated or revised image to follow a detailed creative brief instead of merely matching isolated keywords or request settings.

Use this exact route when the production task calls for masked reconstruction. Describe the subject and intended result first, then specify composition, viewpoint, text content, material, lighting, and visual finish. For edits, identify what must change and what must remain untouched; for adapted or layered work, explain the role of each source and the consistency expected across the final asset.

Highlights

  • Masked region reconstruction. Regenerates only the selected area while using the surrounding image to infer plausible content.
  • Context-aware boundary blending. Matches perspective, texture, color, and illumination across the edge of the edited region.
  • Semantic object replacement. Can remove, add, or transform content according to a natural-language instruction.
  • Preservation beyond the mask. Retains unselected regions so localized edits do not become uncontrolled full-image regeneration.

Pricing

ConfigurationBilling unitPrice
Base generationPer request$0.03

When to Use

✅ Good fit❌ Consider alternatives
The project needs this exact named workflowThe intended task belongs to another media route
All required reference or control media is availableNecessary assets or rights are unavailable
The brief can state transformation and preservation goalsOutput must be deterministic at pixel or frame level
Supported duration, resolution, and format fit deliveryFinal placement requires unsupported specifications
An asynchronous generated result fits productionA live frame-synchronous response is mandatory

Prompt Guide

Identify the primary subject and every source or condition, state the intended transformation or action, then describe composition, camera or viewpoint, lighting, materials, pacing, atmosphere, and exact preservation requirements. Refer to multiple inputs in their schema order.

{
  "prompt": "A precisely directed composition with explicit subject, transformation, camera or viewpoint, lighting, material, and preservation requirements",
  "image": "https://example.com/reference.png",
  "mask": "https://example.com/reference.png",
  "seed": 1,
  "strength": 0.93
}

Technical Specs

SpecValue
Model IDalibaba/qwen-image-edit/inpaint
Input fieldsmask (string)<br>seed (integer)<br>image (string)<br>prompt (string)<br>strength (number)<br>aspect_ratio (string; 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16)<br>output_format (string; jpeg, png)
Required inputprompt, image
Output fieldsurl, content_type
ExecutionAsynchronous job

Related Models

  • alibaba/qwen-image
  • alibaba/qwen-image/edit
  • alibaba/qwen-image/max

Start building

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

Production API
Unified Run API endpoint
https://api.sandbase.ai/v1/run
Model ID
alibaba/qwen-image-edit/inpaint
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
  -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'SANDBASE_JSON'
{
  "model": "alibaba/qwen-image-edit/inpaint",
  "mask": "https://static.sandbase.ai/examples/alibaba/qwen-image-edit/inpaint/input_mask_1.png",
  "image": "https://static.sandbase.ai/examples/alibaba/qwen-image-edit/inpaint/input_image_0.jpeg",
  "prompt": "Change the ball to a black and white football",
  "strength": 0.93,
  "output_format": "png"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
  status=$(printf '%s' "$result" | jq -r .status)
  case "$status" in completed|failed|timeout) break ;; esac
  sleep 2
  result=$(curl --fail-with-body --silent \
    -H "Authorization: Bearer $SANDBASE_API_KEY" \
    "https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"

Choose your model

Compare models

All language models
ModelContextInput / 1MOutput / 1MReleased
Alibaba———Sep 17, 2025
Alibaba———Jul 21, 2026
Alibaba———Jul 21, 2026
Alibaba———Jul 21, 2026
Alibaba———Jun 22, 2026
Alibaba———Jun 22, 2026