by Alibaba

Qwen Image 2 edit API: revise one photo with a written instruction in English or Chinese, choose the output shape, seedable, flat price, about 34 seconds.

alibaba/qwen-image-2/edit
Qwen Image 2 AI Image Generator online
  • 8 aspect ratios
  • Create Image
  • Edit Image

About Qwen Image 2

Qwen Image 2 edit takes a prompt and exactly one image in image_urls, typically in about 34 seconds.

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

Introduction

Qwen Image 2 Image to Image takes exactly one reference image plus an instruction and returns one edited result: relit, restyled, re-dressed or with lettering added, as the prompt describes.

Qwen Image 2 is Alibaba's general-purpose image model: 800-character prompts read natively in Chinese or English, five aspect ratios on text-to-image, and an editing endpoint that revises one reference at a ratio you choose. One image per request, with an optional seed to hold a draw steady while you compare.

Choose a Qwen Image 2 mode by starting material

Starting materialMode
A written art direction or design briefQwen Image 2 Text to Image
An approved source image to reviseQwen Image 2 Image Editing

Key features

Bilingual prompt work

Qwen Image 2 reads Chinese and English prompts directly, so a team can keep its working language where the creative brief is clearest instead of rebuilding it for handoff.

A written change to one supplied image

Its editing mode starts with one supplied visual and a written instruction. Use that starting point when the identity or composition already exists and the review is about a deliberate change, not a new concept from scratch.

Two distinct creative starting points

Text-to-image is for establishing a new scene from art direction; image editing is for revising a source visual. Selecting the starting material first prevents an edit brief from being evaluated like an original generation.

Request parameters

ParameterRequiredDescription
aspect_ratioNoThe shape of the frame: wide, square or tall. 1:1 · 4:3 · 3:4 · 16:9 · 9:16 · 3:2 · 2:3 · 21:9 · Default: 1:1
image_urlsYesPhotos to edit or combine. Say in the prompt what each one adds.
promptYesDescribe what you want to make.
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.035

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

Refine a supplied visual

Use this mode when an existing photograph should fix the subject, composition or style. Send it as the single entry in image_urls, say what changes and what must stay identical, and compare the result with the source at the size it will be used.

Product restaged in a new scene

Send the product shot and describe the setting it should sit in, including which light it should pick up. One call, one frame. If the environment has to come from a second photograph, use an editing model that accepts several references.

Bilingual campaign production

Adapt one approved key visual for another market by asking for lettering on a blank surface, written into the prompt exactly as it should read, in Chinese or English. Keep it to a short string: signage and dense copy are the Qwen Image 3.0 line's job.

Character and costume work

Keep the subject from one photograph and describe the new garment in words, including fabric and sheen. Set aspect_ratio to the photograph's shape — it defaults to 1:1 — so the result is not reshaped into a square you did not ask for.

Prompt guide & pro tips

Pick the frame before you write

The output shape comes from aspect_ratio, not from the source. It defaults to 1:1, and eight ratios are available, including 3:2, 2:3 and 21:9; set the one that matches your photograph before you write the instruction.

Spend the 800 characters on one complete scene

Describe the result, not the source. Say first what must stay identical, then what changes, and spend the rest on the new set and light — anything left unstated is open to drift.

Adapt the included example

Start with the published example and replace the creative direction while keeping the input contract for this mode intact.

The image has to come from you — the URL here is a placeholder, not a hosted sample.

Check the result before iterating

There is no strength dial here, and exactly one reference is accepted — a second is rejected before the request leaves the platform. aspect_ratio defaults to 1:1 and does not follow the source, so a portrait photograph comes back square unless you set the ratio. How much of the source survives is decided by how specifically you write the instruction. Fix seed when you want to compare two phrasings of the same edit against an identical draw.

API quick start

Call the Qwen Image 2 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/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/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"
    ],
    "aspect_ratio": "1: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 Edit Image endpoint

Set aspect_ratio to your photo's shape; it defaults to square and will crop otherwise.

There is no strength control; the instruction alone decides how much changes, so describe what stays as well as what changes.

Common uses are restaging a product in a new setting and swapping an outfit on one person.

Qwen Image 2 API questions

How much does the Qwen Image 2 API cost?

Qwen Image 2 starts at $0.035 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 · Edit Image API?

Aspect ratios: 1:1 · 4:3 · 3:4 · 16:9 · 9:16 · 3:2 +2; Reference images: 1; Prompt length (characters): 800. Requests outside these limits are rejected before anything is charged.

More about Qwen Image 2