Intelligent Skin Quality Enhancement
Description
This API is used for ID Photo - Intelligent Skin Quality Enhancement requests. For details on the specific effects, please refer to the documentation below.
Version
1.0
Image Requirements
Image formats: JPG, PNG
Changelog
Request URL
Production environment: https://openapi.meitu.com/idphoto/business/v1/ai_idphotoface
Request Method
POST
The request header must include:
Content-Type: application/json
Authorization
Request Parameters
| Parameter | Type | Maximum Length | Required | Description |
|---|---|---|---|---|
| out_request_id | string | 64 | Yes | External request ID (unique) |
| alpha | int | 32 | No | Intensity level. Default: 85. Value range: 0-100 |
| img_url | string | 200 | No | Image URL (full URL; URL encoding is required) |
| custom_watermark | string | 200 | No | Custom portrait watermark identifier, applicable to ID photos (contact Meitu Business for configuration) |
| custom_watermark_transverse | string | 200 | No | Custom landscape watermark identifier, applicable to typeset photos (contact Meitu Business for configuration) |
| mt_generate_id | string | 64 | No | Meitu ID Photo generation ID |
| mt_check_id | string | 64 | No | Generation ID returned by the Meitu ID Photo detection API |
img_url, mt_generate_id, and mt_check_id must be provided. The API will determine which image to process based on the provided parameter.
Request Example
{
"out_request_id": "36936",
"img_url": "https://258817.png"
}Response Description
Successful Response
| Field | Type | Example Value | Description |
|---|---|---|---|
| code | int | 100000 | Response status code |
| msg | string | Success | Message |
| data.img_url | string | URL of the generated image | |
| data.mt_generate_id | string | Meitu generation ID | |
| data.sd_photo | string | URL of the generated image (standard definition) | |
| data.hd_photo | string | URL of the generated image (high definition) | |
| data.typesetting_photo | string | URL of the generated image (typeset) |
Failed Response
| Field | Type | Description |
|---|---|---|
| data | String | Returned content |
| message | String | Error message |
| code | Int | Error code |
Response Examples
Successful Response Example
Response Status: 200
Content-Type: application/json; charset=utf-8
# When mt_generate_id is provided and img_url is empty:
{
"code": 100000,
"data": {
"mt_generate_id": "6917420196238201561",
"img_url": "http://biz-res-pre.zone1.meitudata.com/idphoto-private/1646220627572213824-781934.jpg",
"sd_photo": "http://biz-res-pre.zone1.meitudata.com/idphoto-private/1646220627572213824-781934.jpg",
"hd_photo": "http://biz-res-pre.zone1.meitudata.com/idphoto-private/1646220627572213824-781934.jpg",
"typesetting_photo": "http://biz-res-pre.zone1.meitudata.com/idphoto-private/1646220627572213824-781934.jpg"
},
"msg": "success"
}
# When mt_generate_id is empty and img_url is provided:
{
"code": 100000,
"data": {
"mt_generate_id": "6917420196238201561",
"img_url": "http://biz-res-pre.zone1.meitudata.com/idphoto-private/1646220627572213824-781934.jpg",
"sd_photo": "",
"hd_photo": "",
"typesetting_photo": ""
},
"msg": "success"
}Response Status Codes
| Status Code | Description |
|---|---|
| 100000 | Success |
| 100001 | Invalid parameters |