Skip to main content
Text-to-image

Z-Image

Fast lightweight generation

POST
/services/aigc/multimodal-generation/generation
cURL
curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--data '{
  "model": "z-image-turbo",
  "input": {
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "text": "A sitting orange cat with a happy expression, lively and cute, realistic and accurate"
          }
        ]
      }
    ]
  },
  "parameters": {
    "prompt_extend": false,
    "size": "1024*1024"
  }
}'
{
  "output": {
    "choices": [
      {
        "finish_reason": "stop",
        "message": {
          "role": "assistant",
          "content": [
            {
              "image": "https://dashscope-result-sgp.oss-ap-southeast-1.aliyuncs.com/xxx.png?Expires=xxx"
            },
            {
              "text": "Photo of a stylish young woman..."
            }
          ],
          "reasoning_content": ""
        }
      }
    ]
  },
  "usage": {
    "width": 1024,
    "height": 1024,
    "image_count": 1,
    "input_tokens": 0,
    "output_tokens": 0,
    "total_tokens": 0
  },
  "request_id": "abf1645b-b630-433a-92f6-xxxxxx"
}
Z-Image is a lightweight text-to-image model that generates images quickly. It renders Chinese and English text and adapts to various resolutions and aspect ratios. Quick links: Try it online | Technical blog

Authorizations

string
header
required

DashScope API key. Create one in the Qwen Cloud console. Alternatively, pass it via the X-DashScope-ApiKey request header.

Body

application/json
enum<string>
required

Model name.

z-image-turbo
z-image-turbo
object
required

Input content.

object

Image generation parameters.

Response

200-application/json
object

Model output.

object

Usage statistics. Includes data for successful generations only.

string

Unique request identifier. Use for tracing and troubleshooting.

abf1645b-b630-433a-92f6-xxxxxx