HERMES + RECRAFT

在 Hermes Agent 中使用 Recraft。

Recraft 提供清晰的神经网络图像超分,可在无伪影的情况下恢复精细细节,并提供精确的背景移除,保留发丝和透明边缘。Hermes Agent 通过与聊天相同的 RunAPI custom 提供商调用这两个端点——发送源图像 URL,选择超分或背景移除,然后轮询获取处理后的结果。

一个 API 密钥 · 超分 + 背景移除 · 异步任务轮询
使用 RunAPI 通过 Recraft crisp upscale 放大图像。

要求:
- 使用 RUNAPI_API_KEY 环境变量进行身份验证。
- 使用 custom:runapi 提供商,base_url 为 https://runapi.ai/v1。
- 调用位于 https://runapi.ai/api/v1/recraft/upscale_image 的 RunAPI upscale_image 端点。
- 将 model 设置为 "recraft-crisp-upscale"。
- 在 source_image_url 中传入源图像 URL。
- 响应会返回一个 task_id。轮询任务状态端点直到任务完成,然后从结果中获取放大后的图像 URL。
- 如需背景移除,请改为调用 /api/v1/recraft/remove_background 并将 model 设为 "recraft-remove-background"。
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

Configure RunAPI

If you have not set up RunAPI in Hermes Agent yet, follow the Hermes Agent setup guide. Add a custom provider named runapi with base_url https://runapi.ai/v1, key_env RUNAPI_API_KEY, and api_mode chat_completions.

export RUNAPI_API_KEY=runapi_xxx
2

Call Recraft upscale or remove background

Send a POST request to the upscale_image endpoint with model set to recraft-crisp-upscale and provide the source_image_url. For background removal, POST to the remove_background endpoint with model recraft-remove-background instead. Both require only source_image_url.

POST /api/v1/recraft/upscale_image
3

Poll for the result

Both endpoints return a task_id with status pending. Poll the task status endpoint until the status changes to completed, then retrieve the processed image URL from the response. RunAPI SDKs and the CLI handle polling automatically.

GET /api/v1/recraft/upscale_image/tsk_abc123
参数

Recraft API 参数

参数 类型 说明
model string Required. recraft-crisp-upscale for upscaling, recraft-remove-background for background removal.
source_image_url string Required. URL of the source image to process.
callback_url string Optional. Webhook URL for async completion notification.

Hermes Agent 上的 Recraft 是什么?

RunAPI 上的 Recraft 提供清晰的神经放大和精准的背景去除——两个将原始 AI 生成图像变为生产就绪资产的后处理步骤。Hermes Agent 通过与生成模型相同的 custom:runapi provider 调用两个端点,便于在单一工作流中串联生成和后处理。

Recraft 使用场景

生成转生产就绪资产流水线

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

电商目录的批量处理

以自动化方式对整个产品目录应用背景去除和神经放大,Hermes Agent 并行调度各任务并收集结果。

面向设计交付物的标志放大

对低分辨率标志进行放大,用于大幅印刷、展示横幅或视频叠加,通过 Recraft 的神经放大保留边缘清晰度。

常见问题

Recraft + Hermes Agent 常见问题

Hermes Agent 通用配置

尚未配置?请从 Hermes Agent 的 RunAPI 配置指南开始。

Hermes Agent 配置指南 →

Recraft 模型目录

查看所有 Recraft 版本、定价和 API 文档。

Recraft 模型 →

立即在 Hermes Agent 中试用 Recraft。

免费获取 RunAPI 密钥,配置 custom 提供商,开始使用 Recraft 放大图像和移除背景。