{
  "tool": "图片格式转换器",
  "description": "将图片转换为指定格式（PNG、JPEG、WebP），保持原图尺寸和画质",
  "usage": {
    "endpoint": "POST /api/image-format-converter",
    "method": "POST",
    "contentType": "application/json"
  },
  "parameters": {
    "imageUrl": {
      "type": "string",
      "required": true,
      "description": "要转换的图片URL"
    },
    "targetFormat": {
      "type": "string",
      "required": true,
      "description": "目标格式",
      "options": [
        "png",
        "jpeg",
        "webp"
      ]
    },
    "bucketType": {
      "type": "string",
      "required": false,
      "default": "tempfile",
      "description": "R2存储桶类型",
      "options": [
        "file",
        "tempfile",
        "static"
      ]
    }
  },
  "features": [
    "支持多种图片格式转换（PNG、JPEG、WebP）",
    "保持原图尺寸不变",
    "高质量转换（质量 100）",
    "三级回退策略确保转换成功",
    "自动上传到指定的R2存储桶",
    "智能判断是否需要转换"
  ],
  "conversionStrategy": [
    "1. @cf-wasm/photon - 本地处理，速度快",
    "2. weserv.nl - 在线服务，兼容性好",
    "3. Cloudflare Images - Cloudflare 官方服务"
  ],
  "examples": {
    "requestParams": {
      "imageUrl": "https://example.com/image.png",
      "targetFormat": "webp",
      "bucketType": "tempfile"
    },
    "responseSuccess": {
      "success": true,
      "code": 200,
      "msg": "success",
      "data": {
        "originalUrl": "https://example.com/image.png",
        "convertedUrl": "https://tempfile.aiquickdraw.com/image-format-converter/1234567890-abc123.webp",
        "originalFormat": "png",
        "targetFormat": "webp",
        "converted": true,
        "fileInfo": {
          "fileName": "1234567890-abc123.webp",
          "fileSize": 184320,
          "mimeType": "image/webp",
          "uploadedAt": "2023-12-07T10:30:00.000Z",
          "bucketType": "tempfile"
        },
        "message": "图片格式转换成功"
      }
    },
    "curl": "curl -X POST https://your-domain.com/api/image-format-converter \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"imageUrl\": \"https://example.com/image.png\",\n    \"targetFormat\": \"webp\",\n    \"bucketType\": \"tempfile\"\n  }'"
  }
}