在 OpenClaw 中使用 Seedream。
Seedream 是字节跳动的图像生成模型,具有强大的文字排版渲染能力和高达 4K 的输出。OpenClaw agent 通过与聊天相同的 RunAPI key 和端点调用它,无需额外技能或 provider 账户。
Generate a 4K product hero image using Seedream through RunAPI.
Requirements:
- Use the RunAPI text_to_image endpoint.
- Set model to seedream-4.5-text-to-image.
- Read the API key from RUNAPI_API_KEY. Do not hardcode the key.
- Poll the task status endpoint until the task completes.
- Return the generated image URL from the task response.
curl -X POST https://runapi.ai/api/v1/task/text_to_image \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedream-4.5-text-to-image",
"prompt": "A premium coffee bag on a marble countertop, warm morning light, bold serif text FRESH ROAST, 4K product photography"
}'
{
"task_id": "tsk_abc123",
"status": "pending",
"model": "seedream-4.5-text-to-image"
}
三步在 OpenClaw 中使用 Seedream
配置 RunAPI
如果你已经在 OpenClaw 中为聊天配置了 RunAPI,则无需额外操作。同一个 RUNAPI_API_KEY 和 /v1 端点也可以处理图像生成。否则,从 OpenClaw 指南粘贴配置 prompt,或在 shell 中导出 key。
export RUNAPI_API_KEY=runapi_xxx
调用 Seedream
向 text_to_image 端点发送请求,将 model 设为 seedream-4.5-text-to-image,并附上描述图像的文字 prompt。RunAPI 立即返回任务 ID。
text_to_image
获取结果
使用返回的任务 ID 轮询任务状态端点。当状态变为 completed 时,响应中包含生成的图像 URL。RunAPI SDK 会自动处理轮询。
task_id: tsk_abc123
Seedream API 参数
| 参数 | 类型 | 说明 |
|---|---|---|
model |
string |
必填。seedream-4.5-text-to-image、seedream-4.5-edit、seedream-5-lite-text-to-image。 |
prompt |
string |
对所需图像的文字描述。 |
size |
string |
可选。输出尺寸,最高支持 4K。 |
image_url |
string |
编辑模式的源图像。 |
OpenClaw 上的 Seedream 是什么?
Seedream 是字节跳动的图像模型,开箱即用达到 4K 画质和 94% 的文字准确率。它在复杂提示词下保持结构连贯——多个对象、特定空间关系、详细排版——不会失去整体一致性。OpenClaw agent 通过 RunAPI 的 text_to_image 端点调用它,使用与聊天相同的 API key。
Seedream 使用场景
电商产品目录
生成带有准确标签和价格文字的产品生活场景图,直接用于目录页面,无需后期添加文字叠加层。
排版密集的海报与活动设计
创作活动海报、标牌和广告牌,提示词中指定的文字内容以 94% 或更高的准确率渲染。
品牌活动批量生成
跨数十张图像生成一致的角色或产品系列,在整个批次中保持相同的品牌代言人形象和视觉风格。
Seedream + OpenClaw 常见问题
可以。在 OpenClaw 中将 RunAPI 配置为 OpenAI 兼容 provider,然后以 seedream-4.5-text-to-image 为 model 调用 text_to_image 端点。同一个 API key 同时处理聊天和图像生成。
不需要。为聊天配置的同一个 RUNAPI_API_KEY 也可以调用 Seedream 和 RunAPI 目录中的所有其他图像模型。一个 key,一个计费账户。
异步。RunAPI 在首次调用时返回任务 ID。轮询任务状态端点,直到状态为 completed,然后从响应中获取图像 URL。SDK 和 CLI 会自动处理轮询。
Seedream 按次计费。查看 RunAPI 定价页面获取最新价格。生成失败不收费。