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

# Qwen Image Plus

> 通过 Anyfast API 调用阿里巴巴 Qwen Image Plus 文生图模型。

Qwen Image Plus 是通过 Anyfast 提供的文生图模型。API 为**同步调用** — 自动轮询上游异步任务，直接返回最终图片 URL。

## 核心能力

* **文生图** — 根据文字描述生成图片
* **灵活尺寸** — 通过 `size` 指定输出分辨率
* **URL 或 Base64** — 通过 `response_format` 选择返回格式

## 快速示例

<CodeGroup>
  ```bash cURL theme={null}
  curl https://www.anyfast.ai/v1/images/generations \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "qwen-image-plus",
      "prompt": "吉卜力风格的可爱猫咪",
      "size": "1024x1024",
      "response_format": "url"
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://www.anyfast.ai/v1/images/generations",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      json={
          "model": "qwen-image-plus",
          "prompt": "吉卜力风格的可爱猫咪",
          "size": "1024x1024",
          "response_format": "url"
      }
  )

  result = response.json()
  print(result["data"][0]["url"])
  ```
</CodeGroup>

## 参数说明

| 参数                | 类型      | 必填 | 说明                    |
| ----------------- | ------- | -- | --------------------- |
| `model`           | string  | 是  | 固定为 `qwen-image-plus` |
| `prompt`          | string  | 是  | 图片描述文字                |
| `n`               | integer | 否  | 生成张数，默认 `1`           |
| `size`            | string  | 否  | 输出尺寸，如 `1024x1024`    |
| `response_format` | string  | 否  | `url`（默认）或 `b64_json` |

## 响应字段

| 字段                      | 说明                                            |
| ----------------------- | --------------------------------------------- |
| `data[].url`            | 图片下载链接（有效期约 24 小时）                            |
| `data[].b64_json`       | Base64 编码图片（仅 `response_format=b64_json` 时返回） |
| `data[].revised_prompt` | AI 扩展后的实际提示词                                  |
| `created`               | 创建时间戳                                         |

<Card title="API 参考" icon="code" href="/zh/api-reference/model-api/alibaba/qwen-image-plus">
  查看 Qwen Image Plus 的交互式 API Playground。
</Card>

<script src="/feedback.js" />
