1. 照片美化任务 API
花容AI
  • 默认模块
    • 花容AI-产品说明
    • 花容AI-使用说明
  • 添加任务接口说明
    • 标准照片美化任务 API说明
  • 照片美化任务 API
    • 提交标准照片美化任务
      POST
  1. 照片美化任务 API

提交标准照片美化任务

POST
/api/v1/task/add
FPix 自有标准任务入口。请求通过校验后会先扣减所属门店 1 个片量。Authorization 由 Collection Pre-request Script 自动生成。默认 storage_provider=4(预签名上传 URL)。

请求参数

Header 参数

Body 参数application/json

示例
{
  "url": "{{input_image_url}}",
  "auth": {
    "provider": {{storage_provider}},
    "preUrl": "{{result_upload_url}}",
    "bucket": "{{storage_bucket}}",
    "endpoint": "{{storage_endpoint}}",
    "regionId": "{{storage_region_id}}",
    "token": "{{storage_token}}",
    "accessKey": "{{storage_access_key}}",
    "accessSecret": "{{storage_access_secret}}",
    "uploadKey": "{{result_key}}",
    "options": {
      "domain": "{{storage_domain}}",
      "ssl": "on",
      "s3ForcePathStyle": "off"
    }
  },
  "parameter": {
    "version": 1,
    "output": {
      "quality": 95,
      "maxSize": 0,
      "waterMark": "",
      "ppi": 0,
      "keepOriginalSize": 0
    },
    "params": {
      "intellectColorAdjust": 0,
      "autoExposure": 0,
      "temperature": 0,
      "tint": 0,
      "saturation": 0,
      "vibrance": 0,
      "exposure": 0,
      "brightness": 0,
      "contrast": 0,
      "faceDefectRemove": [40, 40, 40, 40],
      "faceNeutralGrey": [30, 30, 30, 30],
      "faceAutoBeauty": [20, 20, 20, 20],
      "eyeBright": [20, 20, 20, 20]
    },
    "ageRange": [12, 60]
  },
  "notifyUrl": "{{notify_url}}",
  "notifyAttach": "{\"source\":\"postman\",\"traceId\":\"{{trace_id}}\"}",
  "options": {
    "xiutuCompat": false
  }
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://api.hrlj.cn/api/v1/task/add' \
--header 'Content-Type: application/json' \
--data '{
  "url": "{{input_image_url}}",
  "auth": {
    "provider": {{storage_provider}},
    "preUrl": "{{result_upload_url}}",
    "bucket": "{{storage_bucket}}",
    "endpoint": "{{storage_endpoint}}",
    "regionId": "{{storage_region_id}}",
    "token": "{{storage_token}}",
    "accessKey": "{{storage_access_key}}",
    "accessSecret": "{{storage_access_secret}}",
    "uploadKey": "{{result_key}}",
    "options": {
      "domain": "{{storage_domain}}",
      "ssl": "on",
      "s3ForcePathStyle": "off"
    }
  },
  "parameter": {
    "version": 1,
    "output": {
      "quality": 95,
      "maxSize": 0,
      "waterMark": "",
      "ppi": 0,
      "keepOriginalSize": 0
    },
    "params": {
      "intellectColorAdjust": 0,
      "autoExposure": 0,
      "temperature": 0,
      "tint": 0,
      "saturation": 0,
      "vibrance": 0,
      "exposure": 0,
      "brightness": 0,
      "contrast": 0,
      "faceDefectRemove": [40, 40, 40, 40],
      "faceNeutralGrey": [30, 30, 30, 30],
      "faceAutoBeauty": [20, 20, 20, 20],
      "eyeBright": [20, 20, 20, 20]
    },
    "ageRange": [12, 60]
  },
  "notifyUrl": "{{notify_url}}",
  "notifyAttach": "{\"source\":\"postman\",\"traceId\":\"{{trace_id}}\"}",
  "options": {
    "xiutuCompat": false
  }
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
  "code": 200,
  "message": "success",
  "data": {
    "id": "66bf1234567890abcdef1234"
  }
}
修改于 2026-08-18 08:43:50
上一页
标准照片美化任务 API说明
Built with