On this page
article
阿里 - Image
1.概述
阿里通义文成图模型
模型列表:
z-image
2.请求说明
- 请求方法:
POST - 请求地址
https://gateway.theturbo.ai/v1/images/generations
3.请求参数
3.1 Header参数
| 参数名称 | 类型 | 必填 | 说明 | 示例值 |
|---|---|---|---|---|
Content-Type |
string | 是 | 设置请求头类型,必须为application/json |
application/json |
Accept |
string | 是 | 设置响应类型,建议统一为application/json |
application/json |
Authorization |
string | 是 | 身份验证所需的 API_KEY,格式Bearer $YOUR_API_KEY |
Bearer $YOUR_API_KEY |
3.2 Body 参数 (application/json)
| 参数名称 | 类型 | 必填 | 说明 | 示例(默认值) |
|---|---|---|---|---|
| model | string | 是 | 要使用的模型 ID。详见概述列出的可用版本,如 z-image。 |
z-image |
| prompt | string | 是 | 一段描述所需图像的文字z-image 描述最大长度为 32000 字符。 | A cute baby sea otter |
| n | number | 否 | 生成图像的数量,必须在 1 到 10 之间。z-image 仅支持 n=1。 | 1 |
| size | string | 否 | 生成图像的尺寸。z-image支持1024x1024、1792x1024、1024x1792,z-image支持1024x1024、1536x1024、1024x1536 |
1024x1024 |
| quality | string | 否 | 生成图像的质量选项。z-image支持high 、medium 、low。 | high |