HERMES + RECRAFT

在 Hermes Agent 中使用 Recraft。

Recraft 提供清晰的神經網路圖片放大功能,能在不產生偽影的情況下恢復精細細節,以及精準的去背功能,能保留髮絲與透明邊緣。Hermes Agent 透過與聊天相同的 RunAPI custom provider 呼叫這兩個端點 — 傳送來源圖片 URL,選擇放大或去背,然後輪詢處理結果。

一個 API key · 放大 + 去背 · 非同步任務輪詢
Use RunAPI to upscale an image with Recraft crisp upscale.

Requirements:
- Use the RUNAPI_API_KEY environment variable for authentication.
- Use the custom:runapi provider with base_url https://runapi.ai/v1.
- Call the RunAPI upscale_image endpoint at https://runapi.ai/api/v1/recraft/upscale_image.
- Set model to "recraft-crisp-upscale".
- Pass the source image URL in source_image_url.
- The response returns a task_id. Poll the task status endpoint until the task completes, then retrieve the upscaled image URL from the result.
- For background removal, call /api/v1/recraft/remove_background with model "recraft-remove-background" instead.
curl -X POST https://runapi.ai/api/v1/recraft/upscale_image \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "recraft-crisp-upscale",
    "source_image_url": "https://example.com/product-photo.jpg"
  }'
{
  "task_id": "tsk_abc123",
  "status": "pending",
  "model": "recraft-crisp-upscale"
}
複製 curl 指令進行測試 recraft
運作原理

三步驟在 Hermes Agent 中使用 Recraft

1

設定 RunAPI

如果您尚未在 Hermes Agent 中設定 RunAPI,請依照 Hermes Agent 設定指南操作。新增名為 runapi 的 custom provider,base_url 設為 https://runapi.ai/v1,key_env 設為 RUNAPI_API_KEY,api_mode 設為 chat_completions。

export RUNAPI_API_KEY=runapi_xxx
2

呼叫 Recraft 放大或去背

向 upscale_image 端點發送 POST 請求,model 設為 recraft-crisp-upscale 並提供 source_image_url。若要去背,改為向 remove_background 端點發送 POST 請求,model 設為 recraft-remove-background。兩者都只需提供 source_image_url。

POST /api/v1/recraft/upscale_image
3

輪詢結果

兩個端點都會回傳帶有 pending 狀態的 task_id。輪詢任務狀態端點,直到狀態變為 completed,然後從回應中取得處理後的圖片 URL。RunAPI SDK 和 CLI 會自動處理輪詢。

GET /api/v1/recraft/upscale_image/tsk_abc123
參數

Recraft API 參數

參數 類型 說明
model string 必填。recraft-crisp-upscale 用於放大,recraft-remove-background 用於去背。
source_image_url string 必填。要處理的來源圖片 URL。
callback_url string 選填。用於非同步完成通知的 Webhook URL。

Hermes Agent 上的 Recraft 是什麼?

RunAPI 上的 Recraft 提供清晰的神經放大和精準的背景去除——兩個將原始 AI 生成圖像變為生產就緒資產的後處理步驟。Hermes Agent 通過與生成模型相同的 custom:runapi provider 呼叫兩個端點,便於在單一工作流中串聯生成和後處理。

Recraft 使用場景

生成轉生產就緒資產工作流程

先用 Flux 2 或 Imagen 4 生成圖像,再用 Recraft 放大到高分辨率、去除背景,在 Hermes Agent 的單一工作流中完成,無需桌面工具。

電商目錄的批量處理

以自動化方式對整個產品目錄應用背景去除和神經放大,Hermes Agent 並行調度各任務並收集結果。

面向設計交付物的標誌放大

對低分辨率標誌進行放大,用於大幅印刷、展示橫幅或影片疊加,通過 Recraft 的神經放大保留邊緣清晰度。

FAQ

Recraft + Hermes Agent 常見問題

Hermes Agent 通用設定

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

Hermes Agent 設定指南 →

Recraft 模型目錄

查看所有 Recraft 變體、定價與 API 文件。

Recraft 模型 →

立即在 Hermes Agent 中試用 Recraft。

取得免費的 RunAPI key,設定 custom provider,即可開始使用 Recraft 放大圖片和去背。