跳转到主要内容
POST
/
generate
/
f
/
z-image-turbo
Z-Image Turbo 图片生成
curl --request POST \
  --url https://api.sinancode.com/v1/generate/f/z-image-turbo \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "A hyper-realistic portrait of a cat",
  "acceleration": "none",
  "enable_prompt_expansion": false,
  "enable_safety_checker": true,
  "image_size": "landscape_4_3",
  "num_images": 1,
  "num_inference_steps": 8,
  "output_format": "png",
  "seed": 42,
  "sync_mode": false
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
使用阿里云通义万相 Z-Image Turbo 模型超快速生成图片。 模型特点:
  • 价格最低 - 目前平台上价格最便宜的图片生成模型
  • 速度最快 - 6B 参数蒸馏模型,8 步推理,H800 上亚秒级延迟,平台最快
  • 双语文字渲染 - 精准渲染中英文文字,解决乱码、笔画缺失问题
  • 照片级真实感 - 人像和写实场景的皮肤质感、光影、景深细节出色
  • 开源可商用 - Apache-2.0 协议,开源模型中达到 SOTA 水平

Authorizations

Authorization
string
header
required

请使用您的 API Token 进行认证

Body

application/json

任务参数

prompt
string
required

提示词文本(必填)

Minimum string length: 1
Example:

"A hyper-realistic portrait of a cat"

acceleration
enum<string>
default:none

加速级别(none/regular/high,默认 none)

可用选项:
none,
regular,
high
Example:

"none"

enable_prompt_expansion
boolean

启用提示词扩展(会增加 0.0025 积分/请求)

Example:

false

enable_safety_checker
boolean
default:true

启用安全检查器(默认 true)

Example:

true

image_size
enum<string>
default:landscape_4_3

图片尺寸(预设或自定义宽高) 预设值: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9

可用选项:
square_hd,
square,
portrait_4_3,
portrait_16_9,
landscape_4_3,
landscape_16_9
Example:

"landscape_4_3"

num_images
integer
default:1

生成图片数量(1-4 张,默认 1)

必填范围: 1 <= x <= 4
Example:

1

num_inference_steps
integer
default:8

推理步数(1-8,默认 8)

必填范围: 1 <= x <= 8
Example:

8

output_format
enum<string>
default:png

输出格式(jpeg/png/webp,默认 png)

可用选项:
jpeg,
png,
webp
Example:

"png"

seed
integer

随机种子(相同种子+相同提示词 = 相同结果)

Example:

42

sync_mode
boolean

同步模式(默认 false)

Example:

false

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"