Blog

Qwen 2.1 (2026): Image Model, Pricing and API Code

Unicorn API Team · · 11 min read

Diagram of the Qwen 2.1 image model turning text prompts and input images into new and edited images

Qwen 2.1, in almost every search you will see, refers to Qwen-Image-2.1: the 7-billion-parameter open-weight image model from Alibaba’s Qwen team that both generates images from text and edits existing images with the same set of weights. This guide covers what the model actually does, how the faster Turbo checkpoint differs from the base release, what it costs per image, and complete code you can paste into a project today.

If you only want to see results, the browser playground runs it without any code. If you want to build with it, read on.

What is Qwen 2.1?

Qwen (also called Tongyi Qianwen) is Alibaba Cloud’s family of AI models, most of them released as open weights. Open weights means the trained model files are published, so anyone can download them and run the model on their own hardware, unlike closed models that you can only reach through the vendor’s API. The family began with large language models and has since grown to cover vision, audio and image generation.

Qwen-Image-2.1 is the image member of that family at version 2.1. Its main traits:

  • One model for generation and editing. Earlier generations split these jobs across separate checkpoints. Version 2.1 is a unified model: give it only a prompt and it draws a new image, give it a prompt plus images and it edits them.
  • 7B parameters. A parameter is one learned number inside the network. Seven billion is small enough that people run the model on their own GPUs in tools like ComfyUI, which is a big part of its appeal.
  • Native transparency. It can output RGBA images directly. RGBA means red, green, blue plus an alpha channel, the layer that stores transparency, so you get a cut-out product or logo with no background-removal step afterwards.
  • Multi-image editing. The open release accepts up to ten input images in a single edit, which is what makes compositing, reference-based edits and style transfer practical.

Why the name confuses search results

Because Qwen also ships language models, searches for Qwen 2.1 mix two different worlds. Queries like “Laguna S 2.1 vs Qwen” or “Laguna S 2.1 vs Qwen 27B” compare text models on chat and coding work. Those have nothing to do with Qwen-Image-2.1, which takes prompts and pictures and returns pictures. If you came for a language-model comparison, this is the wrong model; everything below is about images.

On Unicorn API, the model appears as Qwen 2.1 Image to Image (model id qwen2-1-image-to-image), added on 11 November 2026.

What can Qwen 2.1 do?

Here is what the model handles well and where the edges are, so you can decide whether it fits your workload before writing any code.

Instruction editing

You hand the model an image and a plain-language instruction: “change the mug to matte black”, “remove the person on the left”, “put this sneaker on a concrete floor in morning light”. The model keeps the parts you did not mention and changes the part you did. This is the most common production use, because e-commerce and marketing teams mostly edit existing photos rather than invent new ones.

Text-to-image generation

With only a prompt, Qwen 2.1 works as a standard text-to-image model. Being the same weights as the editor means a picture you generate can go straight back in for edits without switching models or styles.

Transparent output

Native alpha output is the feature that sets it apart from many open models. Stickers, icons, product cut-outs and game sprites can come out ready to place on any background. On Unicorn API, the background and output_format input fields control this; check the accepted values in the API documentation, and remember that transparency only survives in formats that store an alpha channel, such as PNG.

Multi-image edits

Passing several images lets you say things like “place the product from the first image into the room from the second” or “dress the model in the jacket from the third image”. The order of the images matters, because your prompt refers to them by position.

The Turbo checkpoint: 8 steps instead of 40

Qwen-Image-2.1 is a diffusion model. Diffusion models start from random noise and clean it up over a series of passes called denoising steps; more steps usually means more compute per image. The base model uses 40 steps. A later official Turbo checkpoint gets the same 7B generator and editor down to 8 steps at a CFG of 1.

CFG stands for classifier-free guidance, a setting that controls how strongly the model follows your prompt. Normal guidance needs two model passes per step; at CFG 1 that extra pass is unnecessary, so each step is cheaper as well as there being fewer of them. Turbo ships in BF16 and INT8 versions (number formats: BF16 keeps 16 bits per weight, INT8 compresses to 8 bits to save memory) and supports LoRA, small add-on weight files that teach the model a style or subject without retraining it.

The trade-off is the usual one for distilled, few-step models: you often give up a little fine detail and variety for the speed. Compare both on your own prompts before committing.

Four capabilities of Qwen-Image-2.1: generation, editing, transparent output and multi-image editing
One set of weights covers text-to-image, instruction edits, RGBA output and multi-image edits.

How much does Qwen 2.1 cost on Unicorn API?

Pricing is per output image and depends only on resolution:

ResolutionCredits per imageOn a monthly plan ($0.01/credit)On top-ups ($0.015/credit)
1K4$0.04$0.06
2K8$0.08$0.12

Any request without a resolution set is billed at the 1K rate of 4 credits. Credits are rounded up to whole numbers per output.

A worked example: a shop needs 500 product photos re-shot onto a clean background. At 1K, that is 500 × 4 = 2,000 credits, or $20, which fits inside the Starter plan ($25 a month for 2,500 credits). Doing the same batch at 2K costs 4,000 credits, which fits inside Creator ($50 for 5,000 credits). Top-up credits cost more per credit but never expire, which suits bursty work. All plan details are on the pricing page.

You never need to guess a bill. Before running a job, send the same model and input to POST /v1/models/price and you get the exact credit cost back. This is worth wiring into any batch script so it can refuse to start a run that would blow your budget.

How to call Qwen 2.1 from code

Media models on Unicorn API run as jobs: you create a job, then poll it until it finishes. The flow is the same for every image and video model, so code you write for Qwen 2.1 works for the others by changing the model id.

  1. Create an API key on the keys page and export it as UNICORN_API_KEY.
  2. Send POST /v1/jobs with the model id and an input object.
  3. Poll GET /v1/jobs/{id} until status is "succeeded".
  4. Read the image URL from outputs[0].url.

The quick version with curl

curl https://api.unicornapi.net/v1/jobs \
  -H "Authorization: Bearer $UNICORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen2-1-image-to-image",
    "input": {
      "prompt": "Place this ceramic mug on a light oak table, soft window light from the left, keep the mug shape and logo unchanged",
      "image_urls": ["https://example.com/mug.png"],
      "resolution": "1K"
    }
  }'

# Then, with the id from the response:
curl https://api.unicornapi.net/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $UNICORN_API_KEY"

A complete Python script

import os
import time
import requests

BASE_URL = "https://api.unicornapi.net"
HEADERS = {
    "Authorization": f"Bearer {os.environ['UNICORN_API_KEY']}",
    "Content-Type": "application/json",
}


def run_qwen_edit(prompt, image_urls, resolution="1K", seed=None):
    payload = {
        "model": "qwen2-1-image-to-image",
        "input": {
            "prompt": prompt,
            "image_urls": image_urls,
            "resolution": resolution,
        },
    }
    if seed is not None:
        payload["input"]["seed"] = seed

    resp = requests.post(f"{BASE_URL}/v1/jobs", headers=HEADERS, json=payload)
    resp.raise_for_status()
    job_id = resp.json()["id"]

    while True:
        job = requests.get(f"{BASE_URL}/v1/jobs/{job_id}", headers=HEADERS)
        job.raise_for_status()
        job = job.json()
        if job["status"] == "succeeded":
            return job["outputs"][0]["url"]
        if job["status"] == "failed":
            raise RuntimeError(f"Job {job_id} failed: {job}")
        time.sleep(2)


if __name__ == "__main__":
    url = run_qwen_edit(
        prompt=(
            "Place this ceramic mug on a light oak table, soft window light "
            "from the left, keep the mug shape and logo unchanged"
        ),
        image_urls=["https://example.com/mug.png"],
        seed=42,
    )
    print("Image ready:", url)

The documentation lists every job status; the script above treats anything other than success or failure as “still running”.

Input fields worth knowing

  • prompt: the instruction or description. Required.
  • image_urls: an array of public image URLs to edit or use as references.
  • resolution: "1K" or "2K"; this is what sets the price.
  • mask_url: a mask image that limits the edit to one region, useful when the model keeps touching parts you wanted left alone.
  • aspect_ratio, output_format, background: output shape, file type and background handling.
  • seed: a number that makes results repeatable. Same seed, same inputs, same image.
  • enhance_prompt: lets the service rewrite your prompt with more detail. Helpful for short prompts, unhelpful when you need exact wording.
  • nsfw_checker: toggles the content filter on outputs.

Worked example: Qwen Image 2.1 style transfer

Style transfer means keeping the content of one image (the layout, objects and people) while adopting the look of another (brushwork, palette, texture). Because Qwen 2.1 accepts several input images and understands instructions about them, you do it with a prompt rather than a dedicated style-transfer pipeline.

Set up the inputs

Put the content image first and the style reference second. Then write the prompt so it names both by position and spells out what must stay fixed:

url = run_qwen_edit(
    prompt=(
        "Repaint the first image in the style of the second image: "
        "thick visible brushstrokes and the same warm orange and teal palette. "
        "Keep the street layout, the cyclist and the shop signs exactly where "
        "they are. Do not add new objects."
    ),
    image_urls=[
        "https://example.com/street-photo.jpg",     # content
        "https://example.com/painting-style.jpg",   # style
    ],
    resolution="1K",
    seed=1234,
)

Iterate cheaply, then render once

A good loop for style work:

  1. Fix the seed. With the seed constant, any change in the output comes from your prompt, not from randomness. That makes it obvious which wording helps.
  2. Iterate at 1K. Each try costs 4 credits. Ten attempts is 40 credits, or $0.40 on a plan.
  3. Tighten the “keep” list. If faces drift or text on signs changes, name those things explicitly in the prompt, or supply a mask_url so only the background takes the style.
  4. Render the final at 2K. One 8-credit render once the prompt is right.
  5. Change the seed last. When the prompt is settled, try a few seeds to pick the best variation.

Two style references work too: list them as the second and third images and describe how to blend them (“brushwork from the second image, colour palette from the third”). Expect to iterate more, since the model has more to reconcile.

Style transfer with Qwen Image 2.1: a content photo and a style reference combined into one repainted image
Style transfer: content image first, style reference second, and a fixed seed while you tune the prompt.

Running Qwen 2.1 locally vs through an API

Because the weights are open, you can run Qwen 2.1 yourself. Whether you should depends on volume, hardware and how much setup you want to own.

Local options

  • ComfyUI. The node-based image tool has workflows for both the base model and the 8-step Turbo checkpoint, including the BF16 and INT8 variants and LoRA loading. This is the most common local route.
  • DiffSynth. A Python library with documented support for Qwen-Image-2.1, including direct RGBA output. A good choice if you want scripts instead of a node graph.
  • Hugging Face libraries and notebooks. The model card links to inference options for developers who already work in that stack.
  • LM Studio. Many people search for “LM Studio Qwen Image 2.1” because they already use LM Studio for local Qwen language models. LM Studio is built mainly around text models, so check whether your version lists image models before planning around it; otherwise use ComfyUI or DiffSynth.

The trade-offs

LocalUnicorn API
Cost per imageHardware and electricity only4 credits (1K) or 8 credits (2K)
SetupGPU, drivers, model download, workflowAn API key
Custom LoRAs and tweaksFull controlFields exposed by the API
Scaling to burstsLimited by your GPUsNo hardware to manage
Switching modelsNew download and workflow each timeChange the model id

A practical rule: if you need custom LoRAs or run the GPU flat out every day, local hardware pays for itself. If your volume is uneven, you want to compare Qwen 2.1 against other models on the same task, or you are shipping an app to users, the API is less work. Whichever you pick, read the license on the model card before using outputs commercially.

Qwen 2.1 vs other image models on Unicorn API

Since every model sits behind the same key and the same job endpoint, the real question is which one fits each task. Here is how Qwen 2.1 compares with the nearest alternatives:

ModelStrengthsCredits per image
Qwen 2.1 Image to ImageMulti-image edits, masks, transparent output, 1K or 2K4 (1K), 8 (2K)
Qwen Image EditEarlier Qwen editor; bilingual Chinese and English text editing that preserves font, size and style5
Nano Banana 2 LiteGoogle’s cheapest Gemini image model; fast 1K images and edits with up to 10 reference images4
GPT Image 1.5Reliable prompt adherence and legible text, optional transparent background, up to 4 references3 (low), 4 (medium), 22 (high)
GPT Image 2.5 FlareFast everyday generation and edits at 1K, 2K or 4K, up to 16 references6 (1K), 10 (2K), 16 (4K)
GPT Image 2.5 SunburstPremium GPT Image 2.5 variant with tighter control and more polished output; slower than Flare6 (1K), 10 (2K), 16 (4K)

When to pick which

  • Pick Qwen 2.1 for high-volume product edits, cut-outs and style transfer at 2K, where 8 credits per image is the cheapest 2K option in this table.
  • Pick Qwen Image Edit when the job is changing text inside an image, especially Chinese text, and the original typography must survive.
  • Pick Nano Banana 2 Lite when 1K is enough and you want many reference images at the same 4-credit price.
  • Pick GPT Image 1.5 at low or medium quality for the cheapest legible-text renders; high quality is a big step up in cost.
  • Pick GPT Image 2.5 Flare or Sunburst when you need 4K output or more than ten references. Choose Sunburst when polish matters more than speed, since both cost the same.

The fastest way to decide is to run the same prompt and inputs through two or three of these in the playground and look at the results side by side. The full list lives in the model catalog.

Common mistakes with Qwen 2.1

  • Writing edit prompts like generation prompts. “A mug on a table, cinematic, 8k” tells the editor nothing about what to change. Say what to change and what to keep: “move the mug onto an oak table, keep its shape and logo”.
  • Using private image URLs. The model fetches image_urls from the internet. Links behind a login, or local file paths, will fail. Use public or pre-signed URLs.
  • Getting image order wrong. In multi-image edits, “the first image” means the first item in the array. Swap them and you transfer the content onto the style instead of the other way round.
  • Iterating at 2K. Each 2K try costs twice as much and rarely tells you more about whether the prompt works. Tune at 1K, render once at 2K.
  • Leaving enhance_prompt on for precise edits. Automatic prompt rewriting can add details you did not ask for. Turn it off when exact wording matters.
  • Expecting transparency in a JPEG. JPEG has no alpha channel. Request a format that keeps transparency if you need a cut-out.
  • Hot-linking outputs. Download the images you want to keep and store them yourself rather than building pages around the job’s output URL.
  • Not checking cost before big batches. One call to POST /v1/models/price gives the exact credit count per request; multiply by your batch size before you start.

Qwen 2.1 is a compact, open, capable editor that handles the jobs most teams actually have: product shots, cut-outs and restyles. Start in the playground, move the prompt that works into the Python script above, and if you write code inside Cursor or Claude Code, the agent integration lets your assistant call the same models directly.

Frequently asked questions

Is Qwen 2.1 a language model or an image model?

When people search for Qwen 2.1 they almost always mean Qwen-Image-2.1, the image generation and editing model. The Qwen family also includes language models, so comparisons such as Laguna S 2.1 vs Qwen 27B are about text models measured on text tasks. Qwen-Image-2.1 takes prompts and images and returns images, so it does not compete with chat models.

Is Qwen Image 2.1 free?

The weights are open, so downloading and running the model on your own GPU costs nothing beyond hardware and electricity. Read the license on the model card before commercial use. If you call it through Unicorn API instead, each output costs 4 credits at 1K resolution or 8 credits at 2K, which works out to $0.04 or $0.08 on a monthly plan.

Can I run Qwen Image 2.1 in LM Studio?

LM Studio is built mainly around language models, so check whether your version lists image models before you plan around it. The routes the community documents for Qwen-Image-2.1 are ComfyUI workflows, including the 8-step Turbo checkpoint in BF16 or INT8, and the DiffSynth library. If you would rather skip local setup entirely, a hosted API call is the shortest path.

How do I do style transfer with Qwen Image 2.1?

Pass two images in image_urls: the photo whose content you want to keep, then a style reference. In the prompt, refer to them by order, for example "repaint the first image in the style of the second", and say what must not change. Fix the seed while you adjust the wording, iterate at 1K for 4 credits, then render the final at 2K.

What is the difference between Qwen Image 2.1 and Qwen Image 2.1 Turbo?

Turbo is an accelerated checkpoint of the same 7B model. It cuts the number of denoising steps from 40 to 8 and runs at a guidance scale of 1, so each image needs far less compute. It ships in BF16 and INT8 versions and supports LoRA add-ons. Distilled checkpoints like this can lose a little fine detail, so compare both on your own prompts.