4Z API

Seedream 5.0 Pro

接口: POST https://4zapi.com/api/v3/images/generations

请求体 (application/json)

  • model (string, 必填): 模型名称 ["doubao-seedream-5-0-pro-260628"]
  • prompt (string, 必填): 生成/编辑提示词
  • guidance_scale (number): 与 prompt 的一致程度,范围 [1, 10]
  • image: 参考图(官方字段)。单张 URL 字符串,或多张 URL 数组(交互编辑/图生图,最多约 10 张)
  • images: 兼容字段;网关会归一到 image。与 image 二选一即可
  • n (integer): 生成张数,Pro 通常为 1
  • optimize_prompt_options (object): 提示词优化配置
  • output_format (string): 图片文件格式 ["jpeg", "png"]
  • response_format (string): 返回形态 ["url", "b64_json"]
  • seed (integer): 随机种子,范围 [-1, 2147483647],默认 -1
  • size (string): 分辨率档或像素尺寸。常用 1K/2K;也支持如 1024x1024、2048x2048、2816x1584 等。空值按高档计费 ["1K", "2K", "1024x1024", "1152x864", "864x1152", "1424x800", "800x1424", "1248x832", "832x1248", "1568x672", "2048x2048", "2368x1776", "1776x2368", "2816x1584", "1584x2816", "2496x1664", "1664x2496", "3136x1344"]
  • watermark (boolean): 是否添加水印

请求示例

{
  "model": "doubao-seedream-5-0-pro-260628",
  "prompt": "一只猫",
  "response_format": "url",
  "size": "2K",
  "watermark": false
}