Qwen Image Edit Inpaint
alibaba/qwen-image-edit/inpaintQwen 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
PNG, JPEG, WebP, or GIF · 20 MiB maximum
PNG, JPEG, WebP, or GIF · 20 MiB maximum
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
| Configuration | Billing unit | Price |
|---|---|---|
| Base generation | Per request | $0.03 |
When to Use
| ✅ Good fit | ❌ Consider alternatives |
|---|---|
| The project needs this exact named workflow | The intended task belongs to another media route |
| All required reference or control media is available | Necessary assets or rights are unavailable |
| The brief can state transformation and preservation goals | Output must be deterministic at pixel or frame level |
| Supported duration, resolution, and format fit delivery | Final placement requires unsupported specifications |
| An asynchronous generated result fits production | A 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
| Spec | Value |
|---|---|
| Model ID | alibaba/qwen-image-edit/inpaint |
| Input fields | mask (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 input | prompt, image |
| Output fields | url, content_type |
| Execution | Asynchronous job |
Related Models
alibaba/qwen-imagealibaba/qwen-image/editalibaba/qwen-image/max
Start building
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
# 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
| Model | Context | Input / 1M | Output / 1M | Released |
|---|---|---|---|---|
Qwen Image Edit InpaintThis model Alibaba | — | — | — | Sep 17, 2025 |
Alibaba | — | — | — | Jul 21, 2026 |
Alibaba | — | — | — | Jul 21, 2026 |
Alibaba | — | — | — | Jul 21, 2026 |
Alibaba | — | — | — | Jun 22, 2026 |
Alibaba | — | — | — | Jun 22, 2026 |
