byted-seedream-image-generate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

byted-seedream-image-generate

byted-seedream-image-generate

Description

功能描述

Generate high-quality images from text prompts using Volcano Engine Seedream models. This skill provides access to three powerful Seedream model versions (4.0, 4.5, and 5.0-lite), each offering unique capabilities for different use cases.
使用火山引擎Seedream模型从文本提示生成高质量图像。本工具支持接入三个强大的Seedream模型版本(4.0、4.5和5.0-lite),每个版本针对不同使用场景提供独特能力。

When to Use This Skill

适用场景

Use this skill when:
  • Users want to create images from text descriptions
  • Users need to generate artwork in various artistic styles
  • Users want to create visual content for creative projects
  • Users need AI-powered image generation capabilities
  • Users want to convert reference images to different styles
  • Users need to generate multiple images in batch
  • Users require high-quality, professional-looking images
当出现以下需求时可使用本工具:
  • 用户需要从文本描述创建图像
  • 用户需要生成多种艺术风格的作品
  • 用户需要为创意项目制作视觉内容
  • 用户需要AI驱动的图像生成能力
  • 用户需要将参考图像转换为其他风格
  • 用户需要批量生成多张图像
  • 用户需要高质量、具备专业观感的图像

Model Versions

模型版本

VersionModel NameRelease DateRecommendationBest For
4.0doubao-seedream-4-0-250828August 2025⭐⭐⭐Daily use, quick generation
4.5doubao-seedream-4-5-251128November 2025⭐⭐⭐⭐Detail-oriented work, complex scenes
5.0doubao-seedream-5-0-2601282026⭐⭐⭐⭐⭐Highest quality, best creativity, tools support
版本模型名发布日期推荐指数适用场景
4.0doubao-seedream-4-0-2508282025年8月⭐⭐⭐日常使用,快速生成
4.5doubao-seedream-4-5-2511282025年11月⭐⭐⭐⭐注重细节的工作,复杂场景
5.0doubao-seedream-5-0-2601282026年⭐⭐⭐⭐⭐最高画质,最佳创意,工具支持

Features

功能特性

  • Text-to-Image: Generate images from detailed text descriptions
  • Image-to-Image: Transform reference images into different styles
  • Batch Generation: Create multiple images in a single request
  • Multiple Versions: Choose from 4.0, 4.5, or 5.0-lite models
  • Watermark Control: Option to disable watermarks
  • Custom Sizes: Support for various image dimensions
  • Output Formats: PNG and JPEG formats (5.0-lite only)
  • Web Search Tools: Internet search integration (5.0-lite only)
  • 文生图:通过详细的文本描述生成图像
  • 图生图:将参考图像转换为不同风格
  • 批量生成:单次请求可生成多张图像
  • 多版本可选:可选择4.0、4.5或5.0-lite模型
  • 水印控制:支持关闭水印选项
  • 自定义尺寸:支持多种图像尺寸
  • 输出格式:支持PNG和JPEG格式(仅5.0-lite支持)
  • 网页搜索工具:集成互联网搜索能力(仅5.0-lite支持)

Installation & Setup

安装与配置

Prerequisites

前置要求

bash
undefined
bash
undefined

Required: API Key configuration

Required: API Key configuration

export MODEL_IMAGE_API_KEY="your-api-key-here"
export MODEL_IMAGE_API_KEY="your-api-key-here"

or

or

export MODEL_AGENT_API_KEY="your-api-key-here"
export MODEL_AGENT_API_KEY="your-api-key-here"

or

or

export ARK_API_KEY="your-api-key-here"
export ARK_API_KEY="your-api-key-here"

Optional: API Base URL (default already configured)

Optional: API Base URL (default already configured)

export MODEL_IMAGE_API_BASE="https://ark.cn-beijing.volces.com/api/v3"
export MODEL_IMAGE_API_BASE="https://ark.cn-beijing.volces.com/api/v3"

or

or


The script will prioritize:
1. Environment variables (`ARK_API_KEY`, `MODEL_IMAGE_API_KEY`, `MODEL_AGENT_API_KEY`)
2. Environment variables (`ARK_BASE_URL`, `MODEL_IMAGE_API_BASE`)
3. Default values

脚本将按以下优先级读取配置:
1. 环境变量(`ARK_API_KEY`、`MODEL_IMAGE_API_KEY`、`MODEL_AGENT_API_KEY`)
2. 环境变量(`ARK_BASE_URL`、`MODEL_IMAGE_API_BASE`)
3. 默认值

Usage

使用方法

Basic Usage (5.0-lite version recommended)

基础使用(推荐使用5.0-lite版本)

bash
cd scripts
python seedream_image_generate.py -p "A cute kitten playing in a garden"
bash
cd scripts
python seedream_image_generate.py -p "A cute kitten playing in a garden"

Specify Version

指定版本

bash
undefined
bash
undefined

Use 4.0 version

Use 4.0 version

python seedream_image_generate.py -p "A cute kitten" --version 4.0
python seedream_image_generate.py -p "A cute kitten" --version 4.0

Use 4.5 version

Use 4.5 version

python seedream_image_generate.py -p "A cute kitten" --version 4.5
python seedream_image_generate.py -p "A cute kitten" --version 4.5

Use 5.0-lite version (recommended)

Use 5.0-lite version (recommended)

python seedream_image_generate.py -p "A cute kitten" --version 5.0
undefined
python seedream_image_generate.py -p "A cute kitten" --version 5.0
undefined

Advanced Options

高级选项

bash
undefined
bash
undefined

Custom size without watermark

Custom size without watermark

python seedream_image_generate.py -p "Beautiful sunset" -s 2048x2048 --no-watermark --version 5.0
python seedream_image_generate.py -p "Beautiful sunset" -s 2048x2048 --no-watermark --version 5.0

Batch generation

Batch generation

python seedream_image_generate.py -p "Generate 3 cute dog pictures" -g --max-images 3 --version 4.5
python seedream_image_generate.py -p "Generate 3 cute dog pictures" -g --max-images 3 --version 4.5

Image-to-image

Image-to-image

python seedream_image_generate.py -p "Convert this image to anime style" -i "https://example.com/image.jpg" --version 5.0
python seedream_image_generate.py -p "Convert this image to anime style" -i "https://example.com/image.jpg" --version 5.0

Web search tool (5.0-lite only)

Web search tool (5.0-lite only)

python seedream_image_generate.py -p "Latest 2026 smartphone" --web-search --version 5.0
python seedream_image_generate.py -p "Latest 2026 smartphone" --web-search --version 5.0

Custom output format (5.0-lite only)

Custom output format (5.0-lite only)

python seedream_image_generate.py -p "A beautiful landscape" --output-format png --version 5.0
python seedream_image_generate.py -p "A beautiful landscape" --output-format png --version 5.0

List all supported versions

List all supported versions

python seedream_image_generate.py --list-versions
undefined
python seedream_image_generate.py --list-versions
undefined

Command Line Options

命令行选项

OptionShortcutDescriptionDefault
--prompt
-p
Image description text (required)-
--version
-v
Version selection:
4.0
,
4.5
,
5.0
5.0
--size
-s
Image dimensions
2048x2048
--image
-i
Single reference image URL-
--images
-Multiple reference image URLs (space separated)-
--group
-g
Enable batch image generation
false
--max-images
-Maximum images for batch generation
15
--output-format
-Output format:
png
or
jpeg
(5.0 only)
jpeg
--response-format
-Response format:
url
or
b64_json
url
--stream
-Enable streaming output
false
--web-search
-Enable web search tool (5.0 only)
false
--optimize-prompt-mode
-Prompt optimization mode:
standard
or
fast
-
--timeout
-t
Timeout in seconds
1200
--no-watermark
-Disable watermark
false
--list-versions
-List all supported versions-
选项简写说明默认值
--prompt
-p
图像描述文本(必填)-
--version
-v
版本选择:
4.0
,
4.5
,
5.0
5.0
--size
-s
图像尺寸
2048x2048
--image
-i
单张参考图像URL-
--images
-多张参考图像URL(空格分隔)-
--group
-g
开启批量图像生成
false
--max-images
-批量生成最大图像数量
15
--output-format
-输出格式:
png
jpeg
(仅5.0支持)
jpeg
--response-format
-响应格式:
url
b64_json
url
--stream
-开启流式输出
false
--web-search
-开启网页搜索工具(仅5.0支持)
false
--optimize-prompt-mode
-Prompt优化模式:
standard
fast
-
--timeout
-t
超时时间(秒)
1200
--no-watermark
-关闭水印
false
--list-versions
-列出所有支持的版本-

Python API Usage

Python API 使用方式

python
import asyncio
import sys

sys.path.append("scripts")
from seedream_image_generate import seedream_generate

async def main():
    # Use 5.0-lite version (default)
    result = await seedream_generate([
        {
            "prompt": "A cute kitten",
            "size": "2048x2048",
            "watermark": False,
            "output_format": "png"  # 5.0-lite only
        }
    ], version="5.0")
    
    print(result)

asyncio.run(main())
python
import asyncio
import sys

sys.path.append("scripts")
from seedream_image_generate import seedream_generate

async def main():
    # Use 5.0-lite version (default)
    result = await seedream_generate([
        {
            "prompt": "A cute kitten",
            "size": "2048x2048",
            "watermark": False,
            "output_format": "png"  # 5.0-lite only
        }
    ], version="5.0")
    
    print(result)

asyncio.run(main())

Version Selection Guide

版本选择指南

Choose 4.0 if:

以下场景选择4.0:

  • You need quick daily generation
  • Quality requirements are not extremely high
  • You need faster generation speed
  • Simple scenes and styles
  • 你需要快速日常生成
  • 对画质要求不是极高
  • 需要更快的生成速度
  • 简单场景和风格

Choose 4.5 if:

以下场景选择4.5:

  • You want richer details
  • You're working with complex scenes
  • You need better style reproduction
  • You have moderate quality requirements
  • 你需要更丰富的细节
  • 你正在处理复杂场景
  • 你需要更好的风格还原度
  • 对画质有中等要求

Choose 5.0-lite (Recommended) if:

以下场景选择5.0-lite(推荐):

  • You want the highest quality
  • You need breakthrough creative expression
  • You have extreme detail requirements
  • You need tools parameter (like web search)
  • You need custom output format (png/jpeg)
  • Important projects and work
When in doubt, use 5.0-lite!
  • 你需要最高画质
  • 你需要突破性的创意表达
  • 你对细节有极致要求
  • 你需要工具参数(如网页搜索)
  • 你需要自定义输出格式(png/jpeg)
  • 重要项目和工作
如有疑问,直接使用5.0-lite!

Prompt Engineering Tips

Prompt 优化技巧

Basic Prompt Structure

基础Prompt结构

[Subject Description] + [Style/Art Movement] + [Lighting/Atmosphere] + [Quality/Resolution]
[主体描述] + [风格/艺术流派] + [光线/氛围] + [画质/分辨率]

Advanced Prompts (Optimized for 5.0-lite)

高级Prompt(针对5.0-lite优化)

[Subject Description], [Creative Style/Art Movement], [Unique Perspective/Composition], [Special Lighting/Atmosphere], [Emphasizing 5.0-lite creative expression]
[主体描述], [创意风格/艺术流派], [独特视角/构图], [特殊光线/氛围], [强调5.0-lite创意表达]

Parameter Support by Version

各版本参数支持情况

ParameterSeedream 4.0Seedream 4.5Seedream 5.0-liteDescription
modelModel name
promptPrompt (required)
imageReference image(s)
sizeImage dimensions
sequential_image_generationBatch generation control
sequential_image_generation_optionsBatch generation config
response_formatResponse format (url/b64_json)
watermarkWatermark (true/false)
streamStreaming output
optimize_prompt_optionsPrompt optimization config
toolsTool configuration (5.0-lite only)
output_formatOutput format (png/jpeg, 5.0-lite only)
参数Seedream 4.0Seedream 4.5Seedream 5.0-lite说明
model模型名
promptPrompt(必填)
image参考图像
size图像尺寸
sequential_image_generation批量生成控制
sequential_image_generation_options批量生成配置
response_format响应格式(url/b64_json)
watermark水印开关(true/false)
stream流式输出
optimize_prompt_optionsPrompt优化配置
tools工具配置(仅5.0-lite支持)
output_format输出格式(png/jpeg,仅5.0-lite支持)

Final Return Info

返回结果说明

For OpenClaw

针对OpenClaw场景

  1. First, save/download the generated image to an allowed directory:
    • Recommended:
      ~/.openclaw/workspace/
  2. Use the
    message tool
    to send the image
    with these parameters:
    json
    {
      "action": "send",
      "message": "Optional text description",
      "media": "/root/.openclaw/workspace/generated-image.jpg"
    }
    • The tool will automatically: read the local file, upload to the channel server as a web URL, and send as an image message
  3. Verify success: Check that the tool returns
    {"ok": true}
    to confirm the image was sent successfully
  4. Normal Text not message tool: After generation, show list of images with Markdown format, for example: generated-image-1 Very important: The image URL must be an original online resource link starting with
    https://
    , not a local image address you have downloaded.
  1. 首先,将生成的图像保存/下载到允许的目录
    • 推荐目录:
      ~/.openclaw/workspace/
  2. 使用
    message tool
    发送图像
    ,参数如下:
    json
    {
      "action": "send",
      "message": "Optional text description",
      "media": "/root/.openclaw/workspace/generated-image.jpg"
    }
    • 工具将自动执行:读取本地文件,上传到频道服务器生成网页URL,然后作为图像消息发送
  3. 验证成功:检查工具返回
    {"ok": true}
    即可确认图像发送成功
  4. 不使用message tool的普通文本场景:生成完成后,用Markdown格式展示图像列表,例如: generated-image-1 非常重要: 图像URL必须是
    https://
    开头的原始线上资源链接不能是你下载的本地图像地址。

For Normal

针对普通场景

You should return three types of information:
  1. File format, return the image file (if you have some other methods to send the image file) and the local path of the image, for example: local_path: /root/.openclaw/workspace/skills/image-generate/xxx.png
  2. After generation, show list of images with Markdown format, for example:
      ![generated-image-1](https://example.com/image1.png)
      ![generated-image-2](https://example.com/image2.png)
你需要返回三类信息:
  1. 文件格式:返回图像文件(如果你有其他发送图像文件的方式)和图像的本地路径,例如: local_path: /root/.openclaw/workspace/skills/image-generate/xxx.png
  2. 生成完成后,用Markdown格式展示图像列表,例如:
      ![generated-image-1](https://example.com/image1.png)
      ![generated-image-2](https://example.com/image2.png)

FAQ

常见问题

Q: What's the difference between the versions?

Q: 不同版本之间有什么区别?

A: 4.0 is for quick daily use, 4.5 offers better details for complex scenes, and 5.0-lite provides the highest quality with unique tools support.
A: 4.0适用于快速日常使用,4.5针对复杂场景提供更好的细节表现,5.0-lite提供最高画质,同时支持独有的工具能力。

Q: How long are generated URLs valid?

Q: 生成的URL有效期是多久?

A: URLs are valid for 24 hours. Please download and save your images promptly.
A: URL有效期为24小时,请及时下载保存你的图像。

Q: What image formats are supported for references?

Q: 参考图像支持哪些格式?

A: Common formats like JPG and PNG are supported, provided via URL or Base64.
A: 支持JPG、PNG等常见格式,可通过URL或Base64提供。

Q: Can I use multiple versions in one call?

Q: 我可以在单次调用中使用多个版本吗?

A: Currently, only one version per call. For comparisons, make separate calls for different versions.
A: 目前单次调用仅支持一个版本。如果需要对比效果,请针对不同版本分别发起调用。

License

许可证

This skill is licensed under the Apache License 2.0. See the LICENSE file for details.
本工具采用Apache License 2.0许可证,详情请查看LICENSE文件。

Notice

注意事项

Please comply with Volcano Engine's terms of service and relevant laws and regulations when using this skill.
使用本工具时请遵守火山引擎服务条款及相关法律法规。