Even Skin Tone
Description
This API is used for ID Photo - Even Skin Tone requests. For specific effects, please refer to the details in the following documentation.
Version
1.0
Image Requirements
Image formats: JPG, PNG
Changelog
Request URL
Production environment: https://openapi.meitu.com/idphoto/business/v1/even_skin
Request Method
POST
The request header type should include: Content-Type:application/json
Permission
Credits cannot be used to pay for API calls. Please visit the MV console to activate this API and purchase or manage resource packages.
Request Parameters
| Parameter Name | Type | Maximum Length | Required | Remarks |
|---|---|---|---|---|
| out_request_id | string | 64 | Yes | External request ID (unique) |
| img_url | string | 200 | No | Image URL (complete URL address, requires urlencode processing) |
| mt_generate_id | string | 64 | No | Meitu ID photo generation ID |
| custom_watermark | string | 200 | No | Custom vertical watermark identifier (contact Meitu Business for configuration) |
| custom_watermark_transverse | string | 200 | No | Custom horizontal watermark identifier (contact Meitu Business for configuration) |
| mt_check_id | string | 64 | No | If the partner integrates the detection API /idphoto/business/check, the detection identifier returned by this API will be obtained; this identifier can be used in other image creation APIs to skip image upload and detection |
Note:
- One and only one of img_url, mt_generate_id, and mt_check_id must be provided. The API will select the image to be created based on the parameter provided;
- This API has built-in basic image detection capabilities. If the partner has more detailed detection requirements, the detection API /idphoto/business/check can be integrated;
Request Example
{
"out_request_id":"36936",
"img_url":"https://258817.png"
}Return Value Description
Successful Return Value Description
| Field Name | Type | Example Value | Description |
|---|---|---|---|
| code | int | 100000 | Response status code |
| msg | string | Operation successful | Prompt |
| data | object | Data | |
| data.img_url | string | Generated image URL | |
| data.mt_generate_id | string | Meitu generation ID | |
| data.sd_photo | string | Generated image URL (standard definition) | |
| data.hd_photo | string | Generated image URL (high definition) | |
| data.typesetting_photo | string | Generated image URL (typesetting) |
Failed Return Value Description
| Field | Type | Description |
|---|---|---|
| data | String | Returned content |
| message | String | Error message |
| code | Int | Error code |
Return Value Example
Successful Request Return Example
Response Status: 200
content-type is application/json; charset=utf-8
# When the input parameter mt_generate_id has a value 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 the input parameter mt_generate_id is empty and img_url has a value:
{
"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"
}Return Status Codes
| Status Code | Description |
|---|---|
| 100000 | Success |
| 100001 | Parameter error |
Error Codes and Information
- For descriptions of billing rules, error codes, msg, and other content related to this API, please refer to Billing & Status Code Description