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

# 千问图像 3.0

> 阿里通义千问 Qwen-Image 3.0 生图模型：参数、示例与计费。

阿里通义千问 Qwen-Image 3.0 生图模型，中文文字渲染出色，适合海报、电商主图；支持文生图和最多 3 张参考图的图生图 / 编辑，单次最多出 6 张。

* 模型 ID：`qwen-image-3.0`
* 接口：`POST https://token.poryf.com/v1/images/generations`（同步返回）
* [查看价格](https://token.poryf.com/pricing/qwen-image-3.0) · [在线试用](https://token.poryf.com/model-guide/qwen-image-3.0)（登录后，按自己的余额扣费）

## 请求参数

**Authorization** `string` *required*

`Bearer YOUR_API_KEY`，在 [控制台的 API 密钥页](https://token.poryf.com/keys) 创建。

**model** `string` *required*

`qwen-image-3.0`

**prompt** `string` *required*

画面描述。

**size** `string`

输出尺寸：512*512 到 2048*2048 之间，宽高比不超过 8:1，如 `1328x1328`、`1664x928`、`2048x2048`。

**n** `integer` (default: 1)

生成张数，1–6。

**images** `string[]`

参考图的公网 URL 数组，最多 3 张。传了参考图即为图生图 / 图片编辑。

**negative\_prompt** `string`

不希望出现在画面里的内容。

**seed** `integer`

随机种子。

## 示例：文生图

```bash theme={null}
curl https://token.poryf.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-image-3.0",
    "prompt": "秋日咖啡店的拿铁海报，暖色调，留出标题位置",
    "size": "1104x1472"
  }'
```

## 示例：参考图生图

```bash theme={null}
curl https://token.poryf.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-image-3.0",
    "prompt": "把图中的产品放到简洁的白色摄影棚背景里，保持产品外观不变",
    "images": ["https://example.com/product.jpg"],
    "size": "1328x1328"
  }'
```

## 计费

* 按张计费，1K 与 2K 同价（像素数以 2,250,000 为界分档）。
* 每张参考图另按张计一笔小额费用。
* 实时单价见 [模型广场](https://token.poryf.com/pricing/qwen-image-3.0)。按实际生成成功的张数结算，失败不扣费。

> [!WARNING]
>
> * 参考图只接受公网可访问的 `http(s)` URL。
> * 返回的图片链接有有效期，请及时下载转存。
> * 接口同步返回，请把客户端超时设为 2 分钟以上，避免重复提交导致重复扣费。

通用字段、响应格式和常见错误见 [图片通用说明](https://docs.token.poryf.com/api/images/overview.md)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.