qwen-image-2.0

This documentation is valid for the following list of our models:

  • alibaba/qwen-image-2-0

Model Overview

A text-to-image model designed for accurate text rendering and general image generation. It provides good quality outputs with strong prompt adherence.

Setup your API Key

If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.

API Schema

post
Body
modelstring · enumRequiredPossible values:
promptstring · max: 2000Required

A positive prompt that describes the desired elements and visual features in the edited image.

image_urlsstring · uri[] · min: 1 · max: 3Optional

List of URLs or local Base64 encoded images to edit.

image_sizeany ofOptional

The size of the generated image.

Default: landscape_4_3
or
string · enumOptional

The size of the generated image.

Possible values:
enhance_promptbooleanOptional

Optional parameter to use an LLM-based prompt rewriting feature for higher-quality images that better match the original prompt. Disabling it may affect image quality and prompt alignment.

Default: true
negative_promptstring · max: 500Optional

The description of elements to avoid in the generated image.

seedinteger · max: 2147483647Optional

The same seed and the same prompt given to the same version of the model will output the same image every time.

watermarkbooleanOptional

Add an invisible watermark to the generated images.

Default: false
Responses
200Success
application/json
post
/v1/images/generations
200Success

Quick Example

Let's generate an image of the specified size using a simple prompt.

Response
Reference Images
Generated Image

Image #1

"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect."

Image #2

Last updated

Was this helpful?