Clay cafe conversation示例 01Seedream 5.0 Flash
Seedream 5.0 Flash 支持文生图、参考图创作和编辑,可提交异步任务,按张固定计费。
更新于:
Clay cafe conversation示例 01
Four-style portrait transfer示例 02
Flower arrangement composite示例 03
Sixteen puppy scenes示例 04Seedream 官方成图示例
Place two people at a café table, chatting and laughing in a charming clay-animation advertisement style.
Create a single 4×4 panel image of one puppy across sixteen scenes, changing style while preserving the same subject.
Create an elegant close portrait of a pale-brown deer against a dark background with soft natural expression.
Design a minimalist Plant Killer emblem with white circular radial linework against a solid black field.
Apply four contrasting reference-image styles to one male subject while keeping his recognizable appearance.
Design a trendy blind-box app screen with violet gradients, a clean search bar, commerce icons and playful cards.
Design an upscale travel-resort flyer on deep teal with a subtle diamond grid and thin flowing white lines.
Arrange flowers from the supplied references in the provided vase, then place it on the reference table.
Compose a warm overhead scene around an oversized white round table with blue central ornament and scattered objects.
Seedream 5.0 Flash 能做什么
文生图
用提示词制作高信息密度的图片、海报、插画和写实照片。
图像编辑
用自然语言修改一张参考图,并保留原有结构。
多图融合
将两到十张参考图组合成同一画面。
图层拆分与交互编辑
将图像拆分为图层,或通过坐标和标注修改指定区域。
按操作计费,单位为 quota
按模型、操作和输出设置扣除 quota。
请求头与提交参数
使用 TTAPI 密钥,按下方字段向接口发送请求。
/sd/api/v3/images/generations/tasks提交 Seedream 文生图、参考图、多图融合、拆分图层或交互编辑任务。
查看接口文档/sd/api/v3/images/generations/tasks/{id}用返回的 id 查询 Seedream 异步任务。
查看接口文档/sd/api/v3/images/generations根据文字同步生成 Seedream 图像。
查看接口文档请求头
TT-API-KEYstring必填在请求头中发送 TTAPI API 密钥。
Content-Typestring必填内容类型为 application/json。
请求体
modelenum必填Seedream 模型 ID,选择 doubao-seedream-5-0-pro-260628 或 doubao-seedream-5-0-flash-260915。
promptstring必填描述要生成的图像或要进行的修改。
imagestring | string[]按条件填写涉及输入图像的操作必填。图生图、交互式编辑和图层拆分传一个 URL,多图融合传 2 至 10 个 URL。图生图支持 jpeg、png、webp、bmp、tiff、gif、heic、heif,宽高比 1:16 至 16:1,文件最大 30 MB。
sizestring选填生成支持 1K、1.5K、2K(默认)或像素尺寸,如 2048x1024。图层拆分支持 1K、1.5K、2K 或 auto(默认,保留输入尺寸),不接受像素值。
output_formatenum选填可选 png 或 jpeg,默认 jpeg。
response_formatenum选填可选 url 或 b64_json,默认 url,下载链接有效期为 24 小时。
backgroundenum选填可选 transparent 或 opaque(默认)。透明背景用于输入图含 Alpha 通道的图生图,输出默认 png。文生图、多图输入、交互编辑和图层拆分的 schema 未列出此选项。
watermarkboolean选填是否添加 AI Generated 水印,默认 true。
optimize_prompt_optionsobject选填mode 默认 standard。fast 可减少生成时间,但 Seedream 5.0 Flash 不支持。
layer_decompositionboolean按条件填写默认 false。拆分图层时设为 true,传入 image,并在提示词中用 <bbox> 坐标标记区域,最多拆分 16 层。Pro 和 Flash 均有列出。output_format 控制基础图像,图层始终为 png。
execution_expires_afterinteger选填任务超时时间,单位为秒,范围 3600 至 259200,默认 172800。
priorityinteger选填执行优先级,范围 0 至 9,默认 0。
safety_identifierstring选填哈希后的终端用户标识,最多 64 字符。
发送请求并获取结果
复制当前模型的请求地址、鉴权请求头和请求体。
curl --request POST \
--url https://api.ttapi.io/sd/api/v3/images/generations/tasks \
--header "TT-API-KEY: $TTAPI_KEY" \
--header 'Content-Type: application/json' \
--data '{"model":"doubao-seedream-5-0-flash-260915","prompt":"A high-density infographic explaining the six major types of tea, with a watercolor flavor wheel and labeled brewing temperatures.","size":"2K","output_format":"jpeg","response_format":"url","watermark":false}'