OPENCLAW + RECRAFT

在 OpenClaw 中使用 Recraft。

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

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

要求:
- 使用 RUNAPI_API_KEY 环境变量进行身份验证。
- 调用位于 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
工作原理

三步在 OpenClaw 中使用 Recraft

1

Configure RunAPI

If you have not set up RunAPI in OpenClaw yet, follow the OpenClaw setup guide. Set the RUNAPI_API_KEY environment variable and add RunAPI as an OpenAI-compatible provider with baseUrl https://runapi.ai/v1.

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.

OpenClaw 上的 Recraft 是什么?

Recraft 在 RunAPI 上提供两种后期处理能力——能恢复精细细节的清晰神经放大,以及能干净处理发丝和透明边缘的背景去除功能。OpenClaw agent 通过同一个 RunAPI key 调用两个端点。

Recraft 使用场景

设计资产的神经放大

对产品图片、标志和设计资产进行放大处理,恢复精细细节,成本低于 Topaz——适合对价格敏感的后期制作工作流。

电商产品的背景去除

去除产品照片的背景,用于白底电商列表或合成应用。Recraft 处理细微边缘,包括发丝、透明材质和细小物件。

批量图像后期处理

在 OpenClaw agent 工作流中串联 Recraft 与生成步骤,自动完成大批量产品图像的放大和背景去除。

常见问题

Recraft + OpenClaw 常见问题

OpenClaw 通用配置

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

OpenClaw 配置指南 →

Recraft 模型目录

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

Recraft 模型 →

立即在 OpenClaw 中试用 Recraft。

免费获取 RunAPI 密钥,将提示词粘贴到 OpenClaw,开始使用 Recraft 放大图像和移除背景。