1. Skin API
EvelabInsight
  • Signature Generation
  • EveLab Insight - Skin Analysis API for All Ethnicities
    • Facial attribute analysis
      POST
    • Facial pose analysis
      POST
    • Skin analysis
      POST
  • EveLab Insight - Basic Data API
    • Basic Data API (Universal Edition) v1.6
  • EveLab Insight - Report API
    • Push Data API
      POST
    • Pull Data API
      GET
  • EveLab Insight - CRM API
    • Search customers
      GET
  • Skin API
    • Get Access Token
      GET
    • Get File Upload Policy
      POST
    • Create Analysis Task
      POST
    • Get Analysis Result
      GET
  1. Skin API

Get File Upload Policy

Overseas
https://gapi.evelabinsight.com
Overseas
https://gapi.evelabinsight.com
POST
https://gapi.evelabinsight.com
/skin_api/file/upload_policy

Purpose#

Returns a temporary policy for uploading one input file. Request a policy first, then upload the file to response.upload.url using the method specified by response.upload.method. After the upload succeeds, use response.resource_url as the relevant entry in resources when creating an analysis task.
Always check meta.code: 0 indicates business success. The upload policy remains valid for the number of seconds specified by ttl; request a new policy after it expires. Do not save or submit the temporary signed upload.url as the resource URL.

Request fields#

FieldTypeRequiredDescription
file_namestringConditionalOriginal file name, for example front.jpg. It is used to determine the file type and allocate a resource identifier; do not pass a client-side directory path.
suffixstringConditionalFile extension without the leading dot, for example jpg. When only this field is provided, the service generates a file name.
Provide at least one of file_name and suffix. If only file_name is supplied, its extension is used. ZIP files are currently not supported.

Response fields#

FieldTypeDescription
meta.codeintegerBusiness status code. 0 indicates success.
meta.msgstringBusiness message.
meta.errorstringError details; empty on success.
meta.req_idstringRequest identifier for troubleshooting.
meta.request_uristringCurrent request path.
response.resource_keystringAllocated file resource identifier.
response.resource_urlstringResource URL to use after the upload succeeds. Submit this URL when creating an analysis task.
response.ttlintegerUpload policy validity period in seconds.
response.upload.methodstringUpload method. The current values are PUT and POST.
response.upload.urlstringDestination for this upload; use it only while the policy is valid.
response.upload.form_dataobjectForm fields that must be sent unchanged for a POST multipart/form-data upload.
response.providerstringUpload service identifier, when returned.
response.tokenstringUpload credential, when returned.
response.hostsobjectAvailable upload host information, when returned.
response.mimestringFile MIME type, when returned.

Upload flow#

1.
Call this endpoint and confirm that meta.code = 0.
2.
Branch on response.upload.method; clients must not assume a single upload method.
3.
Upload the file before response.ttl expires.
4.
After the upload request succeeds, retain response.resource_url.
5.
When creating an analysis task, put that URL in the appropriate image or file entry under resources.

PUT upload#

Send the raw file bytes as the request body. Do not wrap them in multipart form data. Example:

POST multipart/form-data upload#

Add every field from response.upload.form_data to the form unchanged, then add the file itself as a form field named file. Example:
Use the form field names and values exactly as returned; do not rename, omit, or recalculate them.

Create an analysis task after upload#

{
  "api_code": "online_skin",
  "algorithm_variant": "standard",
  "resources": {
    "front_image": "https://storage.example.com/files/6d83a0f1-front.jpg"
  }
}

Common business error codes#

meta.codeMeaningResolution
44007File name is missingProvide file_name or suffix.
44008The file extension cannot be determinedProvide suffix, or supply file_name with an extension.
44053Unsupported file typeUse a supported file type. ZIP is currently not supported.
44098Invalid merchant informationCheck the calling credential and merchant configuration.
44099The request region does not match the merchant regionRetry through the API base URL for the merchant's region.

Request

Authorization
API Key
Add parameter in header
Access-Token
Example:
Access-Token: ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
The HTTP request was processed. Check meta.code; 0 indicates business success.
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://gapi.evelabinsight.com/skin_api/file/upload_policy' \
--header 'Access-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
  "file_name": "front.jpg"
}'
Response Response Example
Policy Returned - PUT Upload
Upload the file to upload.url, then retain resource_url.
{
  "meta": {
    "code": 0,
    "msg": "",
    "error": "",
    "req_id": "4826bbfa2ab1db905e6ac2909682746a",
    "request_uri": "/skin_api/file/upload_policy"
  },
  "response": {
    "resource_key": "6d83a0f1-1f6c-4e1a-a5ba-3fb8f4fb8350.jpg",
    "resource_url": "https://storage.example.com/files/6d83a0f1-1f6c-4e1a-a5ba-3fb8f4fb8350.jpg",
    "ttl": 3600,
    "upload": {
      "method": "PUT",
      "url": "https://storage.example.com/files/6d83a0f1-1f6c-4e1a-a5ba-3fb8f4fb8350.jpg?temporary-signature=REDACTED"
    }
  }
}
Previous
Get Access Token
Next
Create Analysis Task
Built with