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

Open Platform API Signature

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

ParameterTypeMaximum LengthRequiredDescription
out_request_idstring64YesExternal request ID (unique)
alphaint32NoIntensity level. Default: 85. Value range: 0-100
img_urlstring200NoImage URL (full URL; URL encoding is required)
custom_watermarkstring200NoCustom portrait watermark identifier, applicable to ID photos (contact Meitu Business for configuration)
custom_watermark_transversestring200NoCustom landscape watermark identifier, applicable to typeset photos (contact Meitu Business for configuration)
mt_generate_idstring64NoMeitu ID Photo generation ID
mt_check_idstring64NoGeneration ID returned by the Meitu ID Photo detection API
Note: Exactly one of 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

FieldTypeExample ValueDescription
codeint100000Response status code
msgstringSuccessMessage
data.img_urlstringURL of the generated image
data.mt_generate_idstringMeitu generation ID
data.sd_photostringURL of the generated image (standard definition)
data.hd_photostringURL of the generated image (high definition)
data.typesetting_photostringURL of the generated image (typeset)

Failed Response

FieldTypeDescription
dataStringReturned content
messageStringError message
codeIntError 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 CodeDescription
100000Success
100001Invalid parameters