API 文档
将 RmWatermark AI 图像处理集成到您的应用中。
身份验证
所有 API 请求需要在 Authorization 头中包含 Bearer token。从 控制台.
curl -H "Authorization: Bearer sk_live_xxxx" -H "Content-Type: application/json" https://rmwatermark.net/api/v1/balance
工具与定价
| 类型 | 积分 | 描述 |
|---|---|---|
remove-bg | 1 | 去除图片背景 |
remove-watermark | 1 | 去除水印 |
POST /api/v1/jobs
创建新的图像处理任务
请求体
{
"type": "remove-watermark",
"image_url": "https://example.com/photo.jpg",
"options": {
"mode": "pro",
"prompt": "去除图片中的所有水印文字和 LOGO,其余内容保持不变"
}
}
// mode: "auto" 本地检测修复 1 积分 | "pro" 大模型编辑 3 积分(可自定义 prompt) | "manual" 需传 mask_url响应
{
"data": {
"id": "uuid",
"type": "remove-watermark",
"status": "processing",
"result_urls": null,
"credits_used": 0,
"processing_ms": null
}
}GET /api/v1/jobs/{id}
获取任务状态和结果
响应
{
"data": {
"id": "uuid",
"type": "remove-bg",
"status": "completed",
"result_urls": ["https://..."],
"error_message": null,
"credits_used": 1,
"processing_ms": 1234,
"created_at": "2026-06-04T00:00:00Z"
}
}GET /api/v1/balance
获取剩余积分余额
响应
{
"data": {
"balance": 497,
"total_earned": 1000,
"total_spent": 503
}
}错误代码
| 代码 | 描述 |
|---|---|
400 | 请求参数无效 |
401 | 缺少或无效的 API 密钥 |
402 | 积分不足 |
404 | 任务未找到 |
500 | 服务器内部错误 |