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

# Z-Image Turbo

> 阿里通义 Z-Image Turbo 生图模型：参数、示例与计费。

阿里通义 Z-Image Turbo 生图模型，出图快、价格低，只做文生图，单次 1 张。

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

## 请求参数

**Authorization** `string` *required*

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

**model** `string` *required*

`z-image-turbo`

**prompt** `string` *required*

画面描述。

**size** `string`

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

**prompt\_extend** `boolean` (default: false)

是否由模型自动改写、扩充提示词。开启后效果更稳，单价翻倍。

**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": "z-image-turbo",
    "prompt": "秋日咖啡店的拿铁海报，暖色调，留出标题位置",
    "size": "1104x1472"
  }'
```

## 计费

* 按张计费。
* 开启 `prompt_extend`（提示词改写）后单价是关闭时的 2 倍。
* 实时单价见 [模型广场](https://token.poryf.com/pricing/z-image-turbo)。按实际生成成功的张数结算，失败不扣费。

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