Qwen Image 2.1 Text to Image API

alibaba/qwen-image-2.1/text-to-image
1K / 2K · 6 / 10 credits

Qwen Image 2.1 Text to Image turns text into native 1K and 2K images with RGBA transparency and Chinese-English typography. It preserves lighting, composition, and aspect ratios while delivering clean transparent layers that need no background removal.

Get API Key
Input
1271 / 5,000
OutputReady
10 credits / image · $0.050

Continue with

Examples

The Clockwork Snail Postman

This is an RGBA image with transparency. Create a single charming clockwork snail postman, shown in three-quarter view and entirely contained in a square frame with generous clear space around every extremity. Its small body is made of brushed copper and softly oxidized brass, with two delicate curved antennae, a smooth articulated foot, and tiny believable exposed clockwork gears. In place of a shell it carries a rounded pale-blue translucent glass mail satchel containing three folded cream envelopes tied with a red thread; the glass lets the envelopes and internal highlights remain visible. A tiny leather strap and a loosely curled paper route map suggest a courier setting off on a long journey. Exquisite handmade miniature realism, warm copper reflections, cool glass highlights, subtle scratches, fine thread, clear separate antennae, clean readable silhouette, soft studio illumination from upper left. Only the snail and its carried objects should exist. No floor, ground plane, backdrop, cast shadow outside the subject, lettering, labels, logos, brand, promotional layout, or watermark. Preserve real alpha transparency around the silhouette and through appropriate glass areas; do not draw a checkerboard. The background is transparent.

First Stars After the Blizzard

Create a single ultra-wide 21:9 cinematic environmental photograph of a remote mountaintop observatory immediately after a blizzard has cleared at night. Place the open circular observatory dome in the left third, with a large telescope pointed through its opening. One adult astronomer wearing a cream parka is visibly pushing aside the heavy dome shutter, their boots planted on a metal walkway. A small amber work lamp inside illuminates the astronomer's face, frost on the telescope mount, mechanical ribs, and wind-blown snow lodged on the door edge. Across the middle and right two-thirds, distant sharp snowy ridges stretch beneath an immense clear indigo sky with dense, small, physically plausible stars. A fresh trail of bootprints connects the dark entrance to the dome. The story is the first observation after days of bad weather. Restrained amber-versus-blue lighting, realistic metal, ice, snow granularity and wool, architectural perspective that makes mechanical sense, one continuous scene with fine foreground detail and distant atmospheric depth. No split panels, infographic, writing, signs, letters, brands, advertisement, watermark, excessive lens flare, or oversized planets.

Qwen Image 2.1 Text to Image

Qwen Image 2.1 Text to Image is a unified image generation model developed by Alibaba's Tongyi team. Built on a 7B-parameter Single-Stream DiT architecture and a Qwen3-VL encoder, it natively supports 2K images, RGBA transparency, and precise Chinese-English typography. It offers efficient, affordable, high-quality generation for poster design, creative e-commerce, and transparent asset production.

Why Choose Qwen Image 2.1 Text to Image?

  • Compact 7B architecture for efficient, affordable inferenceA 32-layer Single-Stream DiT architecture and Prefix KV caching substantially reduce computation compared with earlier 20B models. Generating a 1K image costs just 6 credits ($0.030), making image creation at scale more accessible.

  • Native 64-channel RGBA for true transparent backgroundsA dedicated 64-channel RGBA variational autoencoder (VAE) generates PNG or WebP images with an Alpha transparency channel directly from text. No separate background removal is needed, making it ideal for icons, stickers, and graphic compositing.

  • Detailed native 2K images in nine aspect ratiosSupports native 2048 x 2048 rendering at the default square 2K setting, with 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, and 9:21 aspect ratios. Capture fine portrait lighting and environmental textures across formats.

  • Precise Chinese-English typography and letteringAn enhanced Chinese-English text rendering engine produces clear, correctly spelled, well-structured multilingual text in poster headlines, printed packaging, street-scene neon signs, and directional signage.

  • Intelligent prompt expansion and content safetyThe integrated Qwen3.5-VL-powered PE-T2I prompt expansion model enriches lighting, composition, and camera details. A safety checker filters prohibited content to support reliable, compliant commercial image workflows.

Parameters

ParameterRequirementDescription
promptRequired

Required non-blank text, up to 5,000 characters after trimming leading and trailing whitespace.

sizeOptional

Choose a supported aspect ratio. Edit defaults to auto; generation defaults to 1:1.

Default1:14:33:43:22:316:99:1621:99:21
resolutionOptional

1K: 6 credits ($0.030); 2K: 10 credits ($0.050).

Default1K2K
output_formatOptional

Supports png, jpeg, and webp. Transparent backgrounds require png or webp.

Defaultpngjpegwebp
backgroundOptional

Supports opaque and transparent. A mask requires opaque.

Defaultopaquetransparent
prompt_extendOptional

Automatically expand the prompt. Ignored when a mask is supplied.

Defaulttrue
enable_safety_checkerOptional

Enable content safety checking.

Defaulttrue
seedOptional

Optional integer or decimal integer string. Use a string outside the JavaScript safe integer range; leave empty for a random seed.

How to Use

  1. Write a structured promptDescribe the subject, artistic style, environmental lighting, and camera composition in detail. For a transparent background, state the RGBA transparency requirement at the start of the prompt. Put text that should appear in the image in double quotes.

  2. Choose an aspect ratio and resolutionSelect from nine aspect ratios, including 1:1 and 16:9, to suit your publishing channel. Set the output resolution to 1K or 2K and choose the required file format.

  3. Submit an asynchronous generation taskConfigure the optional background mode and prompt expansion settings, then send the API request. The system accepts your parameters and immediately returns a unique task_id.

  4. Poll the status and retrieve your imageUse task_id to query the task status periodically. Once the status is finished, retrieve and download the high-resolution image from the returned media URL list.

Pricing

One image per request, billed by resolution. No extra charge for reference images or masks. 1 credit = $0.005.

UsageRateDetails
1K6 credits / image$0.030 / image
2K10 credits / image$0.050 / image

Best Use Cases

  • Transparent e-commerce assets and icon designUse native RGBA transparency to generate isolated product images, miniature stickers, UI icons, and ready-to-composite design elements without a colored backdrop, eliminating manual background removal and edge cleanup.

  • Advertising posters and graphic layoutsUse multilingual typography to generate high-fidelity commercial graphics with bold headlines, promotional copy, brand marks, and rich lighting.

  • Panoramic concept wallpapers and film storyboardsCreate natural landscapes, futuristic city architecture, and storyboard concept sketches with clear lighting and accurate perspective in widescreen formats such as 16:9 and 21:9.

  • Batch image creation for social media channelsCombine efficient 7B inference with prices starting at 6 credits per image to produce eye-catching feed images with a consistent style across social platforms.

Pro Tips

  • Use standard transparency instructions: Start the prompt with "This is an RGBA image with transparency." and end with "The background is transparent." Choose png or webp for the best transparent-layer results.
  • Put text in double quotes: Enclose any wording, signage, or brand slogan that must appear precisely in straight double quotes to improve clean character edges and spelling accuracy.
  • Use Prompt Extend for automatic expansion: Enable prompt_extend for short or simple prompts so the dedicated optimization model can fill in lighting, materials, and camera composition details.
  • Plan your resolution: Use 1K at 6 credits for concept exploration and batch drafts. Once the design is settled, generate the final image at 2K for 10 credits to balance efficiency and cost.

Notes

  • prompt is required and supports up to 5,000 characters. Describe the subject, lighting, atmosphere, and composition in detail.
  • When background is transparent, output_format must be png or webp. jpeg does not support transparent backgrounds.
  • Billing depends on the output resolution: 1K costs 6 credits ($0.030), and 2K costs 10 credits ($0.050). Each credit is worth $0.005.
  • The model is deployed from open-source weights under the Qwen Research License. For commercial authorization, follow Alibaba's open-source licensing terms.

Qwen Image 2.1 Text to Image API Frequently Asked Questions

What is the Qwen Image 2.1 Text to Image API?

Qwen Image 2.1 Text to Image is a unified image generation model developed by Alibaba's Tongyi team. It generates native high-resolution 1K and 2K images from text prompts, with a native 64-channel RGBA transparency system, precise Chinese-English typography, and nine aspect ratios. Built on a 7B-parameter Single-Stream DiT architecture and a Qwen3-VL encoder, it follows the prompt's spatial composition and lighting details while using low-latency inference to deliver clean transparent backgrounds without edge cleanup. You can call it programmatically through the API or try it online in the playground above.

Can Qwen Image 2.1 Text to Image generate transparent backgrounds without background removal?

Yes. A 64-channel RGBA variational autoencoder (VAE) optimized for transparency natively generates images with an Alpha channel. Set background to transparent and choose png or webp to produce an image without a background removal step. Start your prompt with "This is an RGBA image with transparency." and end it with "The background is transparent." to help the model recognize your intent.

Can Qwen Image 2.1 Text to Image render Chinese and English text in images?

Yes. The Qwen-Image series excels at multilingual typography, and version 2.1 further improves how text blends into natural scenes and complex lighting. It can render well-structured text with distinct strokes in Chinese calligraphy signs, printed advertising slogans, and English neon lettering. Enclose the desired wording in straight double quotes, such as "Tongyi Qianwen" or "QWEN 2.1", to improve clean character edges and spelling accuracy.

Which native aspect ratios and resolution tiers does Qwen Image 2.1 Text to Image support?

The model offers 1K and 2K resolution tiers. At 2K, the default 1:1 resolution is 2048 x 2048. It supports nine aspect ratios: 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, and 9:21. Widescreen formats such as 16:9 and 21:9 support images up to 2752 x 1536, suitable for square avatars, portrait wallpapers, poster cards, and panoramic concept art.

What does Prompt Extend do in Qwen Image 2.1 Text to Image?

prompt_extend is an intelligent prompt refinement feature built on the dedicated Qwen3.5-VL PE-T2I rewriting model. For short or conversational prompts, it analyzes the intended subject and adds professional visual descriptions of materials, environmental lighting, depth of field, and camera angles to improve aesthetics and detail. It defaults to true. Set it to false if you want the result to follow your original brief instruction strictly.

How much does the Qwen Image 2.1 Text to Image API cost?

Each request produces one image, and the cost depends entirely on resolution: a 1K image costs 6 credits ($0.030), and a 2K image costs 10 credits ($0.050). Each platform credit is worth $0.005. Choosing a different aspect ratio, background mode, or prompt expansion setting does not add any extra charge.

Can images generated by Qwen Image 2.1 Text to Image be used commercially?

Qwen-Image-2.1 is open-sourced by Alibaba under the Qwen Research License. The official open-source weights are primarily licensed for academic research and non-commercial evaluation. For commercial sales, advertising, or enterprise production systems, follow Alibaba's open-source licensing terms or apply to the Tongyi team for a formal commercial license.