OPENCLAW + Z IMAGE

在 OpenClaw 中使用 Z Image。

Z Image 是 Alibaba 的快速圖像生成模型,具備中英文雙語文字渲染能力。OpenClaw agent 透過與聊天相同的 RunAPI 端點和 API key 呼叫它——無需額外 skills 或 provider 帳戶。

一個 API key · 文字轉圖片端點 · 非同步任務輪詢
Use the RunAPI text_to_image endpoint to generate an image with Z Image.

Requirements:
- Use the RUNAPI_API_KEY environment variable for authentication.
- Send a POST request to https://runapi.ai/v1/text_to_image.
- Set model to "z-image".
- Write a descriptive prompt for the image you want to generate.
- The response returns a task_id. Poll the task status endpoint until the task completes, then retrieve the image URL from the output.
curl -X POST https://runapi.ai/v1/text_to_image \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-image",
    "prompt": "A neon-lit Tokyo street at night with Japanese shop signs, cinematic lighting, 8K detail"
  }'
{
  "task_id": "tsk_abc123",
  "status": "pending",
  "model": "z-image"
}
複製 curl 指令測試 z-image
操作步驟

三步驟在 OpenClaw 中使用 Z Image

1

設定 RunAPI

將 RunAPI API key 設定為環境變數。如果你已在 OpenClaw 中為聊天設定了 RunAPI,同一個 key 亦適用於圖像生成。

export RUNAPI_API_KEY=runapi_xxx
2

呼叫 Z Image

向 text_to_image 端點發送 POST 請求,將 model 設為 z-image,並附上文字 prompt。Z Image 支援中文和英文 prompt,文字渲染準確。

text_to_image
3

取得結果

API 立即返回 task_id。輪詢 task status 端點直到狀態變為 completed,然後從回應輸出中取得生成的圖像 URL。

task_id: tsk_abc123
參數

Z Image API 參數

參數 類型 說明
model string 必填。使用 z-image。
prompt string 文字描述。支援中文和英文。
negative_prompt string 可選。在圖像中需要避免的內容。
size string 可選。輸出尺寸,例如 1024x1024。

OpenClaw 上的 Z Image 是什麼?

Z Image 是速度優化型圖像模型,基於 Apache 2.0 開源授權,支持中英雙語文字渲染,通過 RunAPI 每張約 $0.004,是價格最低的選擇之一。OpenClaw agent 使用與聊天相同的 API key 呼叫它。

Z Image 使用場景

概念探索與快速原型

以每分錢幾十張的速度生成視覺概念,適合在使用更昂貴的模型完成最終輸出前先探索多個方向。

雙語營銷活動

在單張圖像中準確渲染中英文文字,製作跨境電商和多語言社交媒體所需的營銷視覺內容。

時尚與產品攝影效果圖

以準確的材質紋理和光線效果生成寫實產品攝影效果圖,速度足夠快到可在實時創作討論中迭代構圖。

FAQ

Z Image + OpenClaw 常見問題

OpenClaw 一般設定

尚未設定?從 OpenClaw 的 RunAPI 設定指南開始。

OpenClaw 設定指南 →

Z Image 模型目錄

查看所有 Z Image 版本、收費及 API 文件。

Z Image 模型 →

立即在 OpenClaw 中試用 Z Image。

取得免費 RunAPI key,將 prompt 貼入 OpenClaw,開始使用雙語文字渲染生成圖像。