> ## 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.

# 万相图像 2.7 Pro

> 阿里通义万相 2.7 图像旗舰版：参数、示例与计费。

阿里通义万相 2.7 图像旗舰版，支持文生图、图片编辑和最多 9 张参考图的多图参考生成，文字渲染和主体一致性强；文生图最高 4K。

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

## 请求参数

**Authorization** `string` *required*

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

**model** `string` *required*

`wan2.7-image-pro`

**prompt** `string` *required*

画面描述。

**size** `string`

输出尺寸：`1K`、`2K`，或 `宽x高`（最大 2048*2048；不带参考图时可到 `4K` / 4096*4096）。

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

生成张数，1–4。

**images** `string[]`

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

**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": "wan2.7-image-pro",
    "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": "wan2.7-image-pro",
    "prompt": "把图中的产品放到简洁的白色摄影棚背景里，保持产品外观不变",
    "images": ["https://example.com/product.jpg"],
    "size": "1328x1328"
  }'
```

## 计费

* 按张计费，1K、2K、4K 同价。
* 实时单价见 [模型广场](https://token.poryf.com/pricing/wan2.7-image-pro)。按实际生成成功的张数结算，失败不扣费。

> [!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.