Qwen Image Edit API
Leverage Qwen Image Edit, Alibaba's advanced image editing API, for programmatic photo manipulation. Upload images, define masks, and execute complex instruction-based edits—from text correction to object removal—at scale.
Upload 1-3 reference images to start editing. Supported formats: jpg, png, webp, bmp, tiff.
A cute fluffy cat captain sitting in a spaceship commander chair, wearing a small headset and a futuristic collar. Pixar animation style, 3D render, vibrant colors, soft volumetric lighting. The cockpit is cozy with round shapes, galaxy background outside the window. Octane render, high fidelity, adorable expression.

Upload up to 3 images (max 10MB each)
Click to upload or drag and drop
Supported formats: JPG, JPEG, PNG, BMP, WEBP, TIFF
Maximum file size: 10MB; Maximum files: 3

History
Max 20 items0 running · 0 completed
Pricing
Automate image editing with Qwen Image Edit API
Execute precise, region-based image edits using natural language instructions. Qwen Image Edit supports mask-guided inpainting, bilingual text replacement, and background/object edits for high-volume production workflows.

Capabilities of the Qwen Image Edit API
Smart Object & Text Removal
Use Qwen Image Edit to remove unwanted elements (watermarks, logos, objects) and reconstruct the background with consistent lighting and texture.

Precise Text Replacement
A key strength of Qwen Image Edit: replace text on signs or posters while better preserving the original font style and visual consistency.

Batch Image Processing
Send up to 3 images per request to apply consistent retouching rules across a product set. Limits can vary by plan and configuration.

Why developers choose Qwen Image Edit API
Use Qwen Image Edit for instruction-following image edits with strong mask control and reliable text replacement for production workflows.
Instruction-Based Control
Use natural language (e.g., "change the shirt to red") to guide the Qwen Image Edit API without complex parameter tuning.
High Fidelity Inpainting
The model understands context, ensuring edited regions blend seamlessly with the original lighting and perspective.
Cost-Effective Scaling
Control costs with per-edit billing and predictable usage tracking. Effective cost can vary with input size and routing—verify in your dashboard.
How to integrate the Qwen Image Edit API
A simple request-response flow for complex image manipulations.
Step 1 — Construct the Payload
Send a POST request containing your base image (Base64/URL) and an optional mask image to the endpoint.
Step 2 — Define the Instruction
Pass a text prompt to the Qwen Image Edit API describing the desired change (e.g., "replace the cat with a dog").
Step 3 — Retrieve & Deploy
Receive the processed image URL in the JSON response, ready for immediate display in your application.
API Key Features
Engineered for granular control and automation
Mask-Guided Inpainting
Restrict edits to specific pixels using binary masks.
Multi-Image Batching
Process small batches (up to 3 images) in a single API call (plan dependent).
Scene Restaging
Swap backgrounds while keeping subject depth correct.
Text Style Preservation
Modify embedded text without breaking visual design.
Bilingual Instruction
Native support for complex prompts in English & Chinese.
Transparent Pricing
Transparent per-edit billing with dashboard-based usage tracking (pricing varies by routing and workload).
Qwen Image Edit API vs. Alternatives
Choose the right programmatic editor for your stack
| Model | Category | Core capability | Output sizing | Billing | Best for |
|---|---|---|---|---|---|
| Qwen Image Edit API | Image editing | Mask-guided inpainting, text replacement, local retouching | Flexible (input-dependent) | Per successful edit (usage-based) | Programmatic image editing workflows where precise local edits and text replacement matter |
| Wan 2.5 Image-to-Image | Image variation / restyling | Reference-based variation and heavy restyling | High-res outputs (config dependent) | Usage-based | Creating variations and stylistic transformations from a reference image (typically less suited for precise local text edits) |
| Nano Banana 2 | Text-to-image generation | General-purpose image generation | 1024px base (config dependent) | Usage-based | General generation when you don't need mask-guided local editing or text-preserving retouching |
Qwen Image Edit API FAQs
Everything you need to know about the product and billing.
API Reference
Select endpoint
Authentication
All APIs require Bearer Token authentication.
Authorization:
Bearer YOUR_API_KEY/v1/images/generationsGenerate Image
Create an image generation task using text prompts or reference images. Supports text-to-image, image-to-image, and image editing modes.
Asynchronous processing mode, use the returned task ID to .
Generated image links are valid for 24 hours, please save them promptly.
Request Parameters
modelstringRequiredDefault: qwen-image-editImage generation model name.
qwen-image-editpromptstringRequiredPrompt describing the image to be generated or how to edit the input image.
Notes
- Limited to 2000 tokens
A cat playing in the grassimage_urlsarrayRequiredReference image URL list for image editing.
Notes
- Max 3 images per request
- Image dimensions must be within 384-3072 pixels
- Formats: .jpg, .jpeg, .png, .bmp, .webp, .tiff
- URLs must be directly accessible by the server
https://example.com/image1.pngcallback_urlstringOptionalHTTPS callback address after task completion.
Notes
- Triggered on completion, failure, or cancellation
- Sent after billing confirmation
- HTTPS only, no internal IPs
- Max length: 2048 chars
- Timeout: 10s, Max 3 retries
https://your-domain.com/webhooks/image-task-completed