在 Hermes Agent 中使用 Topaz。
Topaz 由 Topaz Labs 出品,使用神經網路將圖像超解析度至最高 8 倍,無偽影地恢復細節。Hermes Agent 透過與聊天和圖像生成相同的 RunAPI custom provider 呼叫它——發送圖像 URL,選擇縮放倍數,輪詢取得增強結果。
Use RunAPI to upscale an image with Topaz.
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/topaz/upscale_image.
- Set model to "topaz-upscale-image".
- Pass the image URL in image_url.
- Optionally set scale to 2, 4, or 8 (default is 2).
- The response returns a task_id. Poll the task status endpoint until the task completes, then retrieve the upscaled image URL from the result.
curl -X POST https://runapi.ai/api/v1/topaz/upscale_image \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "topaz-upscale-image",
"image_url": "https://example.com/photo.jpg",
"scale": 4
}'
{
"task_id": "tsk_abc123",
"status": "pending",
"model": "topaz-upscale-image"
}
三步在 Hermes Agent 中使用 Topaz
設定 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
呼叫 Topaz upscale_image
向 upscale_image 端點發送 POST 請求,將 model 設為 topaz-upscale-image,提供來源圖像的 image_url,以及可選的 2、4 或 8 倍縮放因子。同一個 RunAPI key 處理身份驗證。
POST /api/v1/topaz/upscale_image
輪詢結果
端點傳回狀態為 pending 的 task_id。輪詢任務狀態端點,直到狀態變為 completed,然後從回應中取得超解析度後的圖像 URL。RunAPI SDK 和 CLI 會自動處理輪詢。
GET /api/v1/topaz/upscale_image/tsk_abc123
Topaz upscale_image API 參數
| 參數 | 類型 | 說明 |
|---|---|---|
model |
string |
必填。topaz-upscale-image 或 topaz-upscale-video。 |
image_url |
string |
需要超解析度的圖像 URL。 |
scale |
integer |
選填。超解析度倍數:2、4 或 8,預設為 2。 |
callback_url |
string |
選填。用於非同步完成通知的 webhook URL。 |
Hermes Agent 上的 Topaz 是什麼?
Topaz 是 AI 圖像工作流程中不可或缺的後期製作工具——它能接收任何模型生成的圖像,並將其提升至專業品質。與生成模型不同,Topaz 不創建新圖像;它讓現有圖像更清晰、更大、更乾淨。透過 RunAPI,Hermes Agent 可在任何生成步驟後串接 Topaz,無需桌面軟體,即可將標準 1K 輸出轉換為可印刷的 8K 素材。
Topaz 使用情境
生成到印刷流程
在單一 Hermes Agent 工作流程中,用 Flux 2 或 Imagen 4 生成圖像,再用 Topaz 放大至 8K——讓 AI 輸出從螢幕解析度提升至可印刷品質。
AI 偽影清除
修復 AI 生成圖像中的壓縮偽影、雜訊和模糊,讓圖像在商業使用或交付給客戶前達到完善品質。
舊照片修復
將掃描照片、存檔圖像和歷史文件提升至現代顯示標準,從低解析度或劣化的來源中找回細節。
Topaz + Hermes Agent 常見問題
可以。在 Hermes Agent 中將 RunAPI 設定為 custom provider,設定 base_url 為 https://runapi.ai/v1,key_env 為 RUNAPI_API_KEY,然後指示 agent 呼叫 Topaz upscale_image 端點。用於聊天的同一個 custom:runapi provider 也可以處理超解析度請求。
不需要。用於聊天、圖像生成和其他模型的同一個 RUNAPI_API_KEY 也適用於 Topaz 超解析度。所有 RunAPI 模型共享一個 API key 和一個點數餘額。
非同步。端點立即傳回 task_id。Hermes Agent 輪詢任務狀態端點,直到超解析度圖像就緒。RunAPI SDK 和 CLI 會自動處理輪詢。
Topaz 透過 RunAPI 按任務按用量計費。請查看 RunAPI 定價頁面取得最新價格。沒有月度訂閱或最低消費。