by Alibaba

Integrate Qwen Image 2.1 Pro editing with ordered image references, optional aspect ratios, batched variations and asynchronous result handling.

alibaba/qwen-image-2.1-pro/edit
Qwen Image 2.1 Pro AI Image Generator online
  • Up to 2K
  • Up to 10 reference images
  • 15 aspect ratios
  • Up to 6 per run
  • Create Image
  • Edit Image

About Qwen Image 2.1 Pro

Use this edit endpoint when a product already has artwork to revise. It requires both prompt and image_urls, unlike the text-only route. A revision form can retain the current composition as the first source and explain the intended change in the instruction. The Jacket to winter example provides a concrete edit result for testing the presentation of a before-and-after pair.

Call it with the model name alibaba/qwen-image-2.1-pro/edit on POST /jobs/createTask, from $0.036.

Introduction

Qwen Image 2.1 Pro Image Editing changes an existing image from a plain-language instruction. Pro is the hosted tier of Alibaba's Qwen Image 2.1, which unifies generation and editing in one model; Alibaba lists editing with up to ten references, local edits that keep people and products intact, and improved portrait lighting and fine detail.

Choose a mode by what you have

Starting materialMode
One or more images to changeQwen Image 2.1 Pro Image Editing
A written brief and nothing elseQwen Image 2.1 Pro Text to Image

Key features

Speed

39 to 48 seconds per edit end to end across our runs, including two results from two references in one call.

Keeps the source shape

Without an aspect ratio, a 2:3 portrait came back as a 2:3 frame at about 2K (1664 × 2496). Set an aspect ratio when you need a fixed size.

Several references in one edit

A man and a woman photographed separately came back side by side at one candlelit table, both recognisable, with her outfit changed as asked.

Pro or Turbo editing

ProTurbo
What it isAlibaba's hosted Pro tier8-step checkpoint
WeightsNot publishedOpen, Qwen Research License
Results per request1 to 61 to 6

The request is the same, so you can run one instruction on both and keep the result you prefer.

Request parameters

ParameterRequiredDescription
aspect_ratioNoThe shape of the frame: wide, square or tall. 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 21:9 · 9:21 · 2:1 · 1:2 · 3:1 · 1:3 · 5:4 · 4:5
enable_prompt_expansionNoLets the model add detail to a short prompt. Default: false
enable_thinkingNoThe model plans more carefully first. Slower, but better with complex references. Default: true
image_urlsYesPhotos to edit or combine. Say in the prompt what each one adds.
num_outputsNoHow many results to make in one go. ≥ 1 · ≤ 6 · Default: 1
promptYesDescribe what you want to make.
resolutionNoChoose an available output size. 1k · 1.5k · 2k · Default: 2k
seedNoUse the same seed and settings for more controlled comparisons. ≥ 0 · ≤ 2147483647

Pricing

Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

OptionUSD per image
Standard$0.036

Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.

Use cases

Product retouching that keeps the product intact

Change the background, the surface or the light while the packshot stays as it is.

Portraits with better light

Relight a portrait or change the setting while keeping the face, hair and expression.

Combining references

Bring a person, a garment and a place from separate images into one frame by naming each reference in the instruction.

Prompt guide & pro tips

Change first, keep second

"Change his grey suit into a navy linen suit; keep his face, hair and expression" is an edit. "Make it better" is a reroll.

Name every reference

The model does not assign roles to references on its own. Say which image is the person, which is the garment and which is the place.

Leave expansion off

The rewrite can change your instruction before the model sees it. Off, the instruction reaches the model as written.

One change per pass

A single change is easy to judge. Five at once make it hard to tell which instruction moved the face or the hands.

Go back to the original after a few edits

Faces can drift over a long chain of edits. Return to your first approved frame when details start to move.

API quick start

Call the Qwen Image 2.1 Pro API in three steps

  1. Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
  2. Send the request. POST /jobs/createTask with model alibaba/qwen-image-2.1-pro/edit and an input object that follows the parameter table. The response returns a task ID straight away.
  3. Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "alibaba/qwen-image-2.1-pro/edit",
  "input": {
    "prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
    "image_urls": [
      "https://media.popnow.ai/influencer/examples/marco.webp"
    ],
    "resolution": "2k",
    "num_outputs": 1
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.

About the Qwen Image 2.1 Pro Edit Image endpoint

image_urls takes a nonempty array of up to ten inputs. Bind prompt references such as Image 1 and Image 2 to the actual serialized order. If your asset picker supports drag reordering, regenerate those labels before submission. Keep an immutable copy of the ordered list with the job so an edit remains reproducible as an application operation.

The edit ratio is optional and has no auto enum value. Omit aspect_ratio to let the model choose a size from the source images, or supply an explicit supported ratio for a destination layout. Do not copy the text-only default square into every edit automatically; that would turn an optional framing choice into an unintended request.

You can ask for several edited alternatives using num_outputs. Treat all returned pictures as candidates under the same revision, with billing counted per returned image. Changing from 1k to another available resolution tier does not change this model's unit rate. Fetch a fresh quote after changing batch count rather than using the original single-draft estimate.

Expansion remains optional during editing, and enable_thinking is effective only within that expansion step. For precise art direction, preview the exact instruction your application sends. An exclusion should be written into that instruction because there is no separate negative prompt field. Avoid promising that the source remains pixel-identical outside the described change.

Persist the accepted taskId before leaving the revision screen. Resolve completion through recordInfo or verify a task callback before attaching results to the design. On invalid_asset, preserve the edit brief and identify the source that needs repair. On invalid_request, inspect the array and enum values rather than retrying the same malformed edit.

Qwen Image 2.1 Pro API questions

How much does the Qwen Image 2.1 Pro API cost?

Qwen Image 2.1 Pro starts at $0.036 per image with Edit Image, its lowest-priced task. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

What are the limits of the Qwen Image 2.1 Pro · Edit Image API?

Resolutions: 1K · 1.5K · 2K; Aspect ratios: 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 +9; Outputs per call: 1–6; Reference images: 10; Prompt length (characters): 5,000. Requests outside these limits are rejected before anything is charged.

More about Qwen Image 2.1 Pro