> ## Documentation Index
> Fetch the complete documentation index at: https://docs.geekai.co/llms.txt
> Use this file to discover all available pages before exploring further.

# 千问文生图

通义千问-文生图模型（Qwen-Image）是一款通用图像生成模型，支持多种艺术风格，尤其擅长复杂文本渲染。模型支持多行布局、段落级文本生成以及细粒度细节刻画，可实现复杂的图文混合布局设计。
通义-文生图-Z-Image 是一款轻量级文生图模型，可快速生成图像，支持中英文字渲染，并灵活适配多种分辨率与宽高比例。

### 模型参数

* 模型 ID：`qwen-image`/`qwen-image-plus`/`z-image-turbo`
* 模型价格：你可以在[模型广场](https://geekai.co/models?platform=dashscope\&type=image)查看最新价格信息
* 调用入口：`https://geekai.co/api/v1/images/generations`
* 模型参数：参考[画图 API 手册](https://docs.geekai.co/cn/api/image/generations)
* API 认证：[获取 API KEY](https://docs.geekai.co/cn/docs/quick_start)

<Note>
  不支持画图 API 中的以下参数：

  * `image`
  * `strength`
  * `aspect_ratio`
  * `quality`
  * `style_preset`
  * `response_format`
  * `output_format`
  * `mask`
  * `background`

  附：[千问文生图官方 API 文档](https://bailian.console.aliyun.com/?spm=5176.12818093_47.overview_recent.2.39e42cc9oUX0MV\&tab=doc#/doc/?type=model\&url=2840914)
</Note>

千问文生图 可以通过 `size` 字段实现输出图像的分辨率:

可选的分辨率及其对应的图像宽高比例为：

| 宽高比  | 像素值       |
| ---- | --------- |
| 1:1  | 1328x1328 |
| 4:3  | 1472x1104 |
| 3:4  | 1104x1472 |
| 16:9 | 1664x928  |
| 9:16 | 928x1664  |

### 文生图

**qwen-image**

通过给模型提供清晰准确的文字指令，即可快速获得符合描述的高质量单张图片：

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model": "qwen-image",
    "prompt": "一副典雅庄重的对联悬挂于厅堂之中，房间是个安静古典的中式布置，桌子上放着一些青花瓷，对联上左书“义本生知人机同道善思新”，右书“通云赋智乾坤启数高志远”， 横批“智启通义”，字体飘逸，在中间挂着一幅中国风的画作，内容是岳阳楼。",
    "size": "1328x1328",
    "negative_prompt ": "低分辨率，低画质，肢体畸形，手指畸形，画面过饱和，蜡像感，人脸无细节，过度光滑，画面具有AI感。构图混乱。文字模糊，扭曲。",
    "watermark": false
}'
```

响应是一个 JSON 对象，包含生成图片的 URL：

```json theme={null}
{
  "model": "qwen-image",
  "created": 1767516972,
  "task_id": "93bf3349-1944-4e79-8bed-e73f1c446141",
  "task_status": "succeed",
  "data": [
    {
      "url": "https://static.geekai.co/image/2026/01/04/7a3b4052d71060d17e10743fc0082eb1.png"
    }
  ],
  "usage": {
    "billed_units": 1
  }
}
```

**z-image-turbo**

Z-Image 不支持的参数除了上述之外，还包括 `negative_prompt`,`watermark`

总像素为 1024x1024 的推荐分辨率:

| 宽高比  | 像素值       |
| ---- | --------- |
| 1:1  | 1024x1024 |
| 2:3  | 832x1248  |
| 3:2  | 1248x832  |
| 3:4  | 864x1152  |
| 4:3  | 1152x864  |
| 7:9  | 896x1152  |
| 9:7  | 1152x896  |
| 9:16 | 720x1280  |
| 16:9 | 1280x720  |
| 9:21 | 576x1344  |
| 21:9 | 1344x576  |

总像素为 1280x1280 的推荐分辨率:

| 宽高比  | 像素值       |
| ---- | --------- |
| 1:1  | 1280x1280 |
| 2:3  | 1024x1536 |
| 3:2  | 1536x1024 |
| 3:4  | 1104x1472 |
| 4:3  | 1472x1104 |
| 7:9  | 1120x1440 |
| 9:7  | 1440x1120 |
| 9:16 | 864x1536  |
| 16:9 | 1536x684  |
| 9:21 | 720x1680  |
| 21:9 | 1680x720  |

总像素为 1536x1536 的推荐分辨率:

| 宽高比  | 像素值       |
| ---- | --------- |
| 1:1  | 1536x1536 |
| 2:3  | 1248x1872 |
| 3:2  | 1872x1248 |
| 3:4  | 1296x1728 |
| 4:3  | 1728x1296 |
| 7:9  | 1344x1728 |
| 9:7  | 1728x1344 |
| 9:16 | 1152x2048 |
| 16:9 | 2048x1152 |
| 9:21 | 864x2016  |
| 21:9 | 2016x864  |

总像素在`[512x512, 2048x2048]`之间,推荐分辨率范围在 `[1024x1024, 1536x1536]`之间，出图效果更佳

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--data '{
    "model": "z-image-turbo",
    "prompt": "一副典雅庄重的对联悬挂于厅堂之中，房间是个安静古典的中式布置，桌子上放着一些青花瓷，对联上左书“义本生知人机同道善思新”，右书“通云赋智乾坤启数高志远”， 横批“智启通义”，字体飘逸，在中间挂着一幅中国风的画作，内容是岳阳楼。",
    "size": "1024x1024"
}'
```

响应是同上述的 qwen-image 一样，是一个 JSON 对象，包含生成图片的 URL。
