Skip to main content

Qwen Image 2.1 image editing revises one to ten reference images from a written instruction and returns one frame at 1k, 1.5k or 2k. It also does local edits with a black-and-white mask, where white is repainted.

From $0.036/image

Workbench

Input

Image editing
446/5000

Reordering updates prompt references. Removing media also removes its references; review your prompt.

Up to 5,000 characters. There is no negative prompt on this family, so exclusions belong here too — name what is in the frame, then say plainly what must not be. One continuous description outperforms a pile of keywords. at least 1 characters · at most 5000 characters
affects price2/10

Drop files or media links, paste, or browse · Up to 10 files · Max 10 MB · JPG · PNG · WEBP · GIF

  • Image 1
  • Image 2
2 / 10 files
Supply one to ten reference images to Qwen Image 2.1 for transparent subject cutouts, and tell the instruction which source provides the person, object or setting instead of leaving those roles implicit. at least 1 items · at most 10 items
For transparent subject cutouts in Qwen Image 2.1, omit aspect_ratio to follow the source shape or select a supported ratio when the destination layout is fixed.
affects price
For transparent subject cutouts, Qwen Image 2.1 exposes 1k, 1.5k, 2k; the tier changes the quote, and editing references add to it
Safety checkerOff

SpicyAPI does not run a safety checker on this model. Your prompt and media go to the model as written, and the model itself decides what comes back.

Checking your account before enabling submission and pricing.

Output

Ready for a new run
gold-gown-rooftopExample result

Related models and next tasks

Missing the model you need?

Editing is the same body plus one array, and the array is priced

Qwen Image 2.1 Image Editing takes the five fields text-to-image takes and adds image_urls, an array of one to ten references. Nothing else about the body changes, so a client that already generates can edit by attaching a single key. That array is also the second thing you pay for: we ran the same edit with one reference and with five, and the difference was linear in the count. Length is therefore a cost you set from the request body, alongside the resolution tier.

Open the playground
Editing is the same body plus one array, and the array is priced
Request body
The text-to-image fields plus image_urls; prompt and image_urls are both required
References
One to ten URLs in a single array, and the array has to be absent rather than empty to skip it
Priced axes
Two here: the resolution tier and the number of references
Reference cost
Linear — one reference and five differ by the count, measured rather than assumed
Content declaration
None: no maturity field on the request and no platform filter in front of the model
Delivery
Asynchronous — one image per request, read from platform storage once the task is terminal
Shape
Generation and editing share one request builderThe five fields are identical, defaults included, and editing adds exactly one key. The branch in your code is whether image_urls is attached — not a second body, a second client, or a second set of parameter names to keep in sync.
Quote
The array length is a multiplier you holdEvery reference you add raises the estimate by the same amount, which we checked by running one reference and then five. A ten-source request therefore carries that component ten times over, and trimming the array to the references doing real work is the most direct saving on this endpoint. The live estimate above the form is what settles.
Transparency
A cut-out comes back on white, not on alphaThe open-weight release describes native transparent output. This route does not carry it: we asked for a cut-out both by prompt and by editing a photograph with png selected, and both returned three-channel RGB. The subject is separated cleanly onto a white field, so plan a keying step rather than expecting a compositable layer.

Working with the Qwen Image 2.1 editing API

One body, two endpoints, one branch

One body, two endpoints, one branch

aspect_ratio, resolution, output_format, seed and prompt behave the same on both sides, so the editing call is the generation call with a reference array attached. Sharing the builder also means a change to defaults, validation or retry logic lands on both endpoints at once.

An empty array is not the same as no array

An empty array is not the same as no array

image_urls requires at least one entry, and text-to-image does not declare the field at all. An empty array fails here, and sending it to the other endpoint fails there, so the branch has to remove the key rather than blank it. It is the kind of bug that only appears once a user clears the uploader.

  • Cost you can reason about before sending

    Two inputs move the estimate: the tier and the array length. Both are sitting in the body you just assembled, so a client can show the shape of the cost while someone is still adding references instead of at the moment they submit. The live estimate remains the authoritative number.

  • References have no roles until you write them

    The array is positional in your code and unlabelled to the model, so a request carrying a person, a room and a garment blends them unless the prompt says which is which. Naming them costs nothing and is the difference between an edit and an average.

  • Uncensored editing is the same call

    There is no flag to set, no uncensored-only variant to request and no review step to model in your client. One wardrobe pass and the next differ only by the instruction, which keeps the integration down to a single path.

Who calls the Qwen Image 2.1 editing API

  • Add editing without a second client

    Teams with one request builder

    Add editing without a second client

    If generation already works, editing is an array away. Keep one body type with an optional reference list, branch on presence, and the polling, storage and error handling you have already written carry over unchanged.

  • Prove the instruction on one reference

    Cost-sensitive batch work

    Prove the instruction on one reference

    Since each reference adds the same amount, the cheapest way to find out whether an instruction works is to run it with the single source that matters. Add the rest once the wording is settled, and drop any reference that has stopped earning its place.

  • Budget a keying step for cut-outs

    Compositing and layout pipelines

    Budget a keying step for cut-outs

    Background removal here hands back a subject on white rather than a layer with alpha. That is workable — a clean white field keys well — but it is a step, and a pipeline that assumed a transparent file will otherwise composite a white rectangle.

How to integrate the Qwen Image 2.1 editing API

  1. Attach the array, or leave the key out entirely

    The presence of image_urls is what makes a call an edit. Removing the key is how you fall back to plain generation; blanking it to an empty list is rejected instead.

  2. Host every reference at a direct public URL

    Each entry has to resolve to a downloadable file. A viewer page, a share link that expands to HTML, or a signed URL that expires before the task runs will fail at fetch time rather than at submit time.

  3. Say in the prompt what each reference contributes

    Which source is the person, which is the setting, which is the garment. Unlabelled references get blended, and the fix is a sentence rather than a parameter.

  4. Trim the array before you submit it

    Every extra reference is paid for whether or not it changed the result. Read the estimate above the form after the last one is attached, not before the first.

  5. Poll to a terminal state, and expect RGB

    The call returns a handle and the edited frame arrives afterwards. Whatever container you chose, the pixels come back with three channels, so a cut-out lands as a subject on white.

Qwen Image 2.1 editing patterns

  • Two references, each given a job

    One source supplies the person and one supplies the place, and the prompt says so outright. Because the count is what you pay for, this is also the shape to test an instruction on before a longer array is worth attaching.

    Use the first image as the person and keep her face, hair and build exactly as they are; place her in the marble colonnade from the second image at dusk, match the warm low sun falling across her skin, change nothing else
  • A cut-out that arrives on white

    Asking for a removed background works, and what comes back is the subject on a clean white field in three channels. Treat the white as the key: it is even and unshadowed, which is exactly what a compositing step wants, and it is not the alpha layer the open-weight release describes.

    Remove the background completely and place the subject on a plain pure white field, keep the subject's edges, hair detail and colour exactly as they are, add no shadow and no reflection

Qwen Image 2.1 editing questions

Assembling the reference array

Think of the array as two things at once: the switch that makes a call an edit, and the multiplier on what it costs. It has to be present rather than empty, every entry has to be a direct public URL, and each one has to earn its place because each one is paid for. Name the roles in the prompt, because nothing else does, and when a job asks for a cut-out, plan on a subject arriving cleanly on white rather than on a layer with alpha.