▥ Seedance 2.5 is here! ›
Qwen Image 2.1 Pro

Qwen Image 2.1 Pro API

Alibaba Qwen Image 2.1 Pro for detailed text-to-image generation and image editing, with clear text in English and Chinese.

Warm Official Live Priced by route Data privacy Zero training API docs

Input

prompt*string

A text description of the image you want to generate

route_modestring

Choose the provider route used for this request.

Lower-cost official route and the default for new requests and API keys.
generation_typestring

Select the generation workflow. The API mode updates with this choice.

aspect_ratiostring

Aspect ratio of the generated output

Default: "1:1"
resolutionstring

Higher resolutions may take longer to generate.

Default: "1K"
output_formatstring

Format of the output image

countinteger

Number of output images

Indicative cost$0.035 / image · 1K · fixed price≈ $0.035 for 1 image · official-cheap · 1KBilled at a fixed price per image on each route, whatever the resolution.

Output

Ready for a predictionAdjust the inputs, then run the model.
  1. Create an API key

    Create a key in the console and save it as the MLMUX_API_KEY environment variable.

    Create an API key
  2. Send a request

    Send the request to https://api.mlmux.com/v1/images/generations with the model ID qwen/qwen-image-2.1-pro. The example uses this page's default settings; change the prompt and options as needed.

  3. Read the result

    The response lists the image URLs in data. Add "async": true to get a task to poll instead.

curl https://api.mlmux.com/v1/images/generations \
  -H "Authorization: Bearer $MLMUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen/qwen-image-2.1-pro",
  "route_mode": "official-cheap",
  "prompt": "A red fox in fresh snow at sunrise, cinematic light",
  "size": "1024x1024",
  "output_format": "png",
  "n": 1
}'

Pricing

Pick a route below. The selected route is sent as route_mode in every request.

Learn more about pricing ↗

Readme

Qwen Image 2.1 Pro is available through MLMux with one request shape and two explicit route tiers.

Generate and edit

Create an image from a prompt, or edit one with up to three reference images using the same model.

Text in images

Qwen Image is known for rendering signs, posters, and labels in English and Chinese, so layouts need fewer retries.

Fixed price per image

Every image costs the same at 1K or 2K, on either route.

Frequently asked questions

What is Qwen Image 2.1 Pro?

Qwen Image 2.1 Pro is an image generation model from Alibaba. On MLMux you can run it in the browser or call it through one API. Alibaba Qwen Image 2.1 Pro for detailed text-to-image generation and image editing, with clear text in English and Chinese.

How do I use the Qwen Image 2.1 Pro API?

Create an API key in the MLMux Console, then send a POST request to https://api.mlmux.com/v1/images/generations with the key in the Authorization header and model set to qwen/qwen-image-2.1-pro. The generated images are returned in the response.

What can Qwen Image 2.1 Pro do?

Generation modes: Text to image and Image editing. Each request accepts up to 3 reference images and returns 1K or 2K images in aspect ratios such as 1:1, 16:9, 9:16, 4:3, and 3:4.

How much does Qwen Image 2.1 Pro cost?

MLMux is pay as you go, with no subscription or monthly fee, and 1 credit equals 1 US dollar. Every Qwen Image 2.1 Pro image costs $0.035 on the default official-cheap route and $0.038 on the official route, at any resolution it supports. The prices are also listed in the pricing section of this page.

Can I try Qwen Image 2.1 Pro without writing code?

Yes. Sign in and use the playground at the top of this page to run Qwen Image 2.1 Pro with the same settings as the API. The playground's code views show the matching request for your settings, and the quick start below has copy-paste examples in cURL, Python, and JavaScript.