在 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 指南貼上設定提示詞,或在 shell 中匯出 key。
export RUNAPI_API_KEY=runapi_xxx
呼叫 Seedream
向 text_to_image 端點發送請求,將 model 設為 seedream-4.5-text-to-image,並附上描述圖像的文字提示詞。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 是 ByteDance 的圖像模型,使用者描述其提供「無與倫比的性價比」,具備 4K 品質輸出和 94% 開箱即用的文字準確率。它能在複雜提示詞中保持結構——多個物件、特定空間關係、詳細排版——不失去連貫性。OpenClaw 代理透過 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 定價頁面取得最新價格。生成失敗不收費。