在 OpenClaw 中使用 Seedream。
Seedream 是 Bytedance 的圖像生成模型,具備強大的排版渲染能力,輸出最高可達 4K。OpenClaw agent 透過與聊天相同的 RunAPI key 和端點呼叫它——無需額外 skills 或 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 立即返回 task ID。
text_to_image
取得結果
使用返回的 task ID 輪詢 task status 端點。當狀態變為 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,然後以 model 設為 seedream-4.5-text-to-image 呼叫 text_to_image 端點。同一個 API key 同時處理聊天和圖像生成。
不需要。用於聊天的同一個 RUNAPI_API_KEY 亦可呼叫 Seedream 及 RunAPI 目錄中的所有其他圖像模型。一個 key,一個計費帳戶。
非同步。RunAPI 在第一次呼叫時返回 task ID。輪詢 task status 端點直到狀態為 completed,然後從回應中取得圖像 URL。SDK 和 CLI 會自動處理輪詢。
Seedream 按每次生成計費。請查看 RunAPI 收費頁面了解最新價格。生成失敗不收費。