HERMES + Z IMAGE

在 Hermes Agent 中使用 Z Image。

Z Image 是阿里巴巴的快速圖像生成模型,支援中英文雙語文字渲染。Hermes Agent 透過 RunAPI custom provider 端點呼叫它——與聊天使用相同的 base_url 和 API key,無需額外外掛或 GPU 租用。

一個 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.
- Use the custom:runapi provider configured in your Hermes Agent config.yaml.
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
運作原理

三步在 Hermes Agent 中使用 Z Image

1

設定 RunAPI

將 RunAPI API key 設定為環境變數。若已在 Hermes Agent 中將 RunAPI 設定為 custom provider,同一個 key 和 base_url 也適用於圖像生成。

export RUNAPI_API_KEY=runapi_xxx
2

呼叫 Z Image

向 text_to_image 端點發送 POST 請求,將 model 設為 z-image,並附上文字提示詞。Z Image 支援中英文雙語提示詞,並能精準渲染文字。

text_to_image
3

取得結果

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

task_id: tsk_abc123
參數

Z Image API 參數

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

Hermes Agent 上的 Z Image 是什麼?

Z Image 帶來使用者所描述的「驚人速度與真實感」——在一秒內生成逼真圖像,具備強大的提示詞遵循能力和精確的面部細節。基於 Apache 2.0 開源權重構建,透過 RunAPI 每張約 $0.004,是速度最快、價格最低的圖像模型。Hermes Agent 透過與聊天相同的 custom provider 呼叫它。

Z Image 使用情境

電影與動畫分鏡繪製

以次秒速度生成分鏡格,快速迭代構圖和攝影機角度,足以跟上即時的創意討論節奏。

電商商品視覺化

以 RunAPI 上每張圖像最低成本,生成具備逼真材質和光線的商品列表圖像,適合大量型錄生成。

教育插圖

創建附有雙語文字標籤的教育圖表和插圖,適用於以中英文讀者為目標的教科書、課程教材和培訓內容。

FAQ

Z Image + Hermes Agent 常見問題

Hermes Agent 通用設定

尚未設定?請從 Hermes Agent 的 RunAPI 設定指南開始。

Hermes Agent 設定指南 →

Z Image 模型目錄

查看所有 Z Image 變體、價格和 API 文件。

Z Image 模型 →

立即在 Hermes Agent 中試用 Z Image。

取得免費 RunAPI key,設定 custom provider,開始生成支援雙語文字渲染的圖像。