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.

Image Upload Required

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.

Parameters
image_urls
https://pub-ebac96ac8a0c4c789f53c7470fd2339c.r2.dev/BQACAgUAAyEGAASHRsPbAAEDFHJo3RjyLCNIDyRJPhulBDRTS2e1dQACEBsAAs7-6FbennQ2yXsmjzYE (4).jpg
Estimated Cost (per edit)
3 Credits
Sample Result
Sample edited image
318 (suggested: 2,000)

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

Generated image 1

History

Max 20 items

0 running · 0 completed

Your generation history will appear here
$

Pricing

Starting from
$0.050
3 Credits
per edit
Guaranteed
99.9% Uptime
Powered by 16 redundant providers

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.

example 1

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.

example 2

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.

example 3

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.

example 4

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.

1

Step 1 — Construct the Payload

Send a POST request containing your base image (Base64/URL) and an optional mask image to the endpoint.

2

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").

3

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

Precision

Mask-Guided Inpainting

Restrict edits to specific pixels using binary masks.

Efficiency

Multi-Image Batching

Process small batches (up to 3 images) in a single API call (plan dependent).

Composition

Scene Restaging

Swap backgrounds while keeping subject depth correct.

Typography

Text Style Preservation

Modify embedded text without breaking visual design.

Global

Bilingual Instruction

Native support for complex prompts in English & Chinese.

Economy

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

ModelCategoryCore capabilityOutput sizingBillingBest for
Qwen Image Edit APIImage editingMask-guided inpainting, text replacement, local retouchingFlexible (input-dependent)Per successful edit (usage-based)Programmatic image editing workflows where precise local edits and text replacement matter
Wan 2.5 Image-to-ImageImage variation / restylingReference-based variation and heavy restylingHigh-res outputs (config dependent)Usage-basedCreating variations and stylistic transformations from a reference image (typically less suited for precise local text edits)
Nano Banana 2Text-to-image generationGeneral-purpose image generation1024px base (config dependent)Usage-basedGeneral 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.

The API supports concurrent requests, but standard tiers typically handle up to 3 images per batch call. Rate limits depend on your EvoLink plan.
Yes. Qwen Image Edit supports text replacement within images and is designed to better preserve style and layout. Results can vary by input image quality and typography complexity.
Masks should be binary images (black/white) where white represents the area to edit. They must match the resolution of the input image.
Yes, you can extend the canvas boundaries. Simply provide a mask covering the empty space and prompt the model to fill the new area.
The API accepts standard web formats (JPG, PNG) via URL or Base64 encoding, with a recommended file size under 10MB for optimal latency.
Pricing is usage-based and billed per successful edit. Effective cost can vary with input size and routing; use your dashboard usage and billing records as the source of truth.
POST
/v1/images/generations

Generate 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-edit

Image generation model name.

Exampleqwen-image-edit
promptstringRequired

Prompt describing the image to be generated or how to edit the input image.

Notes
  • Limited to 2000 tokens
ExampleA cat playing in the grass
image_urlsarrayRequired

Reference 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
Examplehttps://example.com/image1.png
callback_urlstringOptional

HTTPS 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
Examplehttps://your-domain.com/webhooks/image-task-completed

Request Example

{
  "model": "qwen-image-edit",
  "prompt": "Replace the background of this image",
  "image_urls": ["https://example.com/image1.png"]
}

Response Example

{
  "created": 1757165031,
  "id": "task-unified-1757165031-uyujaw3d",
  "model": "qwen-image-edit",
  "object": "image.generation.task",
  "progress": 0,
  "status": "pending",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 45
  },
  "type": "image",
  "usage": {
    "billing_rule": "per_call",
    "credits_reserved": 1,
    "user_group": "default"
  }
}