ListenHubDocs
API 参考图片生成

Seedream

Seedream 5.0 Pro 和 5.5 的型号、尺寸限制、参考图和积分计价。

Seedream 5.0 Pro 和 Seedream 5.5 是 ListenHub 上字节跳动的图片模型,都通过共用图片接口支持文字生图 和参考图生成。下方精准编辑示例使用 Seedream 5.0 Pro。接口、请求 schema、异步流程和错误码请看 图片生成总览,本页介绍 Seedream 的型号与限制。

模型

模型显示名称适用场景
seedream-5-0-proSeedream 5.0 Pro编辑给定图片中的指定区域
seedream-5-5Seedream 5.5文字生图与参考图生成

使用 provider: "bytedance"。

限制

限制项值
图片尺寸1K、2K——4K 返回 400
宽高比全部 14 种,含四种极端比例
默认宽高比1:1(来自请求 schema)
参考图最多 10 张
quality忽略

Seedream 校验的是尺寸,不是比例:schema 接受的每一种比例都在范围内——包括另外只有 Nano Banana Flash 才允许的那四种极端比例。输出像素由尺寸预算和你传的 aspectRatio 共同算出——而 aspectRatio 在 schema 层默认为 1:1,所以请显式设置它以匹配你的源图。唯一的硬限制是尺寸: 4K 会被直接拒绝,带 code: 29003,而不是被静默降级为 2K。

精准编辑

没有单独的编辑接口,也没有蒙版或区域参数。编辑用的就是同一个生成接口:源图放在 referenceImages 里,“改什么、怎么改”写进 prompt。模型直接从提示词文本中读取绝对像素坐标(原点在图片左上角)和 行业通用色号。

{
  "provider": "bytedance",
  "model": "seedream-5-0-pro",
  "prompt": "Treating the top-left corner as the coordinate origin, change the content inside top-left:(376,363) bottom-right:(701,638) to green, and leave everything else unchanged",
  "referenceImages": [
    {
      "fileData": {
        "fileUri": "https://assets.listenhub.app/your-source-image.png",
        "mimeType": "image/png"
      }
    }
  ],
  "imageConfig": { "imageSize": "2K", "aspectRatio": "1:1" }
}

服务端会原样透传提示词,不解析坐标。如果你的产品提供可视化编辑手势(框选、套索、箭头),请在自己 的前端把它们转成坐标字符串——或者把标注直接画进参考图——再写进 prompt。aspectRatio 要与源图的真实比例保持一致;不一致可能让模型重建整张图,而不是只编辑 一个区域。

计费

两个型号均按尺寸固定计价(pricing.mode: "fixed"):1K 为 6 积分,2K 为 15 积分,无需订阅。 只有 Seedream 5.0 Pro 使用 seedream-5-0-pro 免费额度,Seedream 5.5 不共享该额度。当前预估请调用 POST /v1/images/generation/estimate-credits。

示例

curl -X POST "https://api.marswave.ai/openapi/v1/images/generation/async" \
  -H "Authorization: Bearer $LISTENHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "bytedance",
    "model": "seedream-5-0-pro",
    "prompt": "Treating the top-left corner as the coordinate origin, repaint the jacket inside top-left:(120,240) bottom-right:(520,880) in #1F4D3A, keep the face, hair and background unchanged",
    "referenceImages": [
      { "fileData": { "fileUri": "https://example.com/portrait.png", "mimeType": "image/png" } }
    ],
    "imageConfig": { "imageSize": "2K", "aspectRatio": "3:4" }
  }'

完整参数列表和带参考图的请求结构,见 图片生成总览。

本页内容