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

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

Parameter NameTypeMaximum LengthRequiredRemarks
out_request_idstring64YesExternal request ID (unique)
img_urlstring200NoImage URL (complete URL address, requires urlencode processing)
mt_generate_idstring64NoMeitu ID photo generation ID
custom_watermarkstring200NoCustom vertical watermark identifier (contact Meitu Business for configuration)
custom_watermark_transversestring200NoCustom horizontal watermark identifier (contact Meitu Business for configuration)
mt_check_idstring64NoIf 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:

  1. 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;
  2. 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 NameTypeExample ValueDescription
codeint100000Response status code
msgstringOperation successfulPrompt
dataobjectData
data.img_urlstringGenerated image URL
data.mt_generate_idstringMeitu generation ID
data.sd_photostringGenerated image URL (standard definition)
data.hd_photostringGenerated image URL (high definition)
data.typesetting_photostringGenerated image URL (typesetting)

Failed Return Value Description

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

Error Codes and Information

  1. For descriptions of billing rules, error codes, msg, and other content related to this API, please refer to Billing & Status Code Description