超分辨率增强器
AI驱动的图像放大功能,可选人脸增强
功能特性
- 最高可放大4倍
- 人脸增强选项
- 保持图像质量
- 快速处理
定价
2 (~$0.02)2 credits per image (any scale/face_enhance setting)
端点
POST
/api/v1/images/generate参数
| 参数 | 类型 | 必需 | 描述 |
|---|---|---|---|
| model | string | 必需 | Must be "upscaler" |
| type | string | 必需 | Must be "upscale" |
| image_urls | string[] | 必需 | Input image URL or base64 (single item) to upscale |
| input_image | string | 可选 | Deprecated. Alias for image_urls[0] |
| scale | number | 可选 | Upscale factor: 1, 2, 3, or 4 (default: 2) |
| face_enhance | boolean | 可选 | Enable face enhancement (default: false) |
请求示例
{
"model": "upscaler",
"type": "upscale",
"image_urls": ["https://tempfile.aiquickdraw.com/workers/nano/image_1772780968156_ygk0zm.png"],
"scale": 4,
"face_enhance": true
}响应示例
{
"success": true,
"data": {
"task_id": "task_up123",
"credits_used": 2,
"remaining_credits": 498
}
}代码示例
curl -X POST https://gateway.bananapro.site/api/v1/images/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "upscaler",
"type": "upscale",
"image_urls": ["https://tempfile.aiquickdraw.com/workers/nano/image_1772780968156_ygk0zm.png"],
"scale": 4,
"face_enhance": true
}'