Beauty Enhancement
Description
This API is used for ID Photo - Beauty Enhancement 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/beauty
Request Method
POST
The request header type should include: Content-Type:application/json
Permission
Request Parameters
| Parameter Name | Type | Maximum Length | Required | Remarks |
|---|---|---|---|---|
| out_request_id | string | 64 | Yes | External request ID (unique) |
| mt_generate_id | string | 19 | Yes | Meitu ID photo generation ID |
| custom_watermark_vertical | string | 200 | No | Custom vertical watermark identifier, applicable to ID photos (contact Meitu Business for configuration) |
| custom_watermark_transverse | string | 200 | No | Custom horizontal watermark identifier, applicable to ID photos (contact Meitu Business for configuration) |
Request Example
{
"mt_generate_id":"1712652640552366000",
"out_request_id":"36936"
}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.mt_generate_id | string | Meitu ID photo generation ID | |
| data.sd_photo | string | http://biz-res-pre.zone1.meitudata.com/idphoto-private/1646220627569878737-460912.jpg?xxxxxxxxx | Standard-definition photo |
| data.hd_photo | string | http://biz-res-pre.zone1.meitudata.com/idphoto-private/1646220627569878737-460912.jpg?xxxxxxxxx | High-definition photo |
| data.typesetting_photo | string | http://biz-res-pre.zone1.meitudata.com/idphoto-private/1646220627569878737-460912.jpg?xxxxxxxxx | Typesetting photo |
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
{
"code": 100000,
"data": {
"mt_generate_id": "6917420196238201568",
"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/1646220627569878737-460912.jpg"
},
"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