Face Analyzer API

Analyze facial features and quality metrics in images with our comprehensive Face Analyzer API, providing detailed face location, attributes, and quality scores.

Our Face Analyzer API delivers advanced facial analysis by detecting and evaluating faces in given images. The API provides precise face location coordinates (x, y, w, h) and comprehensive facial attributes, including gender, age, expression, beauty, glasses, hairstyle, mask, and pose (pitch, roll, yaw). Additionally, it offers detailed face quality metrics such as overall quality score, sharpness, brightness, and feature completeness. Ideal for applications in security, social media, digital marketing, and more, the Face Analyzer API ensures accurate and insightful facial data analysis, enhancing your application's capability to interpret and utilize facial information. With seamless integration, high performance, and scalability, our API is designed to meet the demands of modern digital solutions.

Application Scenarios

  • Security and Surveillance: Face Analyzer can enhance security systems by accurately identifying individuals in real-time, enabling efficient access control and threat detection in public spaces, airports, or corporate environments.
  • Social Media and Marketing: By analyzing faces in user-generated content, Face Analyzer helps businesses gain valuable insights into consumer behavior, sentiment analysis, and demographic profiling. This information can be leveraged for targeted marketing campaigns and personalized customer experiences.
  • Healthcare and Biometrics: Face Analyzer can be utilized in medical diagnostics, monitoring patient well-being, and assisting in facial recognition for identity verification in healthcare systems, improving patient safety and reducing administrative burdens.
  • Entertainment and Gaming: The entertainment industry can harness Face Analyzer for interactive experiences, such as augmented reality (AR) filters, virtual makeup applications, or personalized character creation in video games.

Featured Advantages

  • Real-Time Response: Facial recognition possesses characteristics like high concurrency, high throughput, and low latency. Each request can be processed in just a few hundred milliseconds, meeting your real-time usage requirements.
  • Accuracy: Face Analyzer leverages advanced neural networks and deep learning techniques to achieve exceptional accuracy in detecting faces. It can reliably identify faces even in challenging scenarios, such as low light conditions, partial occlusions, or varying angles.
  • Efficiency: Powered by highly optimized algorithms, Face Analyzer delivers impressive performance in terms of processing speed and resource utilization. It can rapidly analyze large volumes of images, making it suitable for real-time applications, such as video surveillance or live streaming platforms.
  • Scalability: Face Analyzer is designed to handle diverse use cases, ranging from individual image analysis to bulk processing of image datasets. Its scalability enables seamless integration with existing workflows, ensuring flexibility and adaptability across different projects and applications.
  • Multi-Face Detection: With the ability to detect and analyze multiple faces simultaneously, Face Analyzer proves invaluable in scenarios where identification or analysis of multiple individuals is crucial. This capability makes it ideal for crowd monitoring, security applications, or social media analytics.

API Documentation

Endpoints


Analyze facial features and quality metrics in images with our comprehensive Face Analyzer API, providing detailed face location, attributes, and quality scores.

Request

Image requirements

  • Image format: JPG JPEG PNG BMP
  • Image size: No more than 5 MB.
  • Image resolution: Less than 2000x2000px.

Body

Field Required Type Scope Default Example Description
image YES file        
max_face_num NO integer [1, 120] 1   The maximum number of faces processed. When set to 1, only the largest face in the image is detected. A smaller value leads to faster processing speed.
face_attributes_type NO string
  • None
  • Age
  • Beauty
  • Emotion
  • Eye
  • Eyebrow
  • Gender
  • Hair
  • Hat
  • Headpose
  • Mask
  • Mouth
  • Moustache
  • Nose
  • Shape
  • Skin
  • Smile
None Age,Beauty Whether to return attributes such as age, gender, mood, etc. AttributesInfo is returned for up to 5 faces with the largest area, and AttributesInfo for more than 5 faces (the 6th and later faces) are not referenced.
need_rotate_detection NO integer
  • 0
  • 1
0   Whether to enable image rotation recognition support. When the face in the picture is rotated and there is no exif information in the picture, if you don't turn on the picture rotation recognition support, you can't detect and recognize the face in the picture correctly. If you are sure that the picture contains exif information or you are sure that the face in the input picture will not be rotated, please do not turn on this parameter. If this parameter is turned on, the overall time required may increase by hundreds of milliseconds.
  • 0: Close.
  • 1: Open.

Response

Public Parameters

Viewing Public Parameters and Error Codes

Business Parameters

Field Type Scope Description
image_width integer   Image width.
image_height integer   Image height.
face_detail_infos array   List of face information.
+face_rect object   Face frame position.
++x integer   The horizontal coordinate of the upper left corner of the face frame.The face frame contains the positions of the five senses of the face and expands on them, if the face frame is out of the range of the picture, it will lead to negative coordinates.If you need to intercept the complete face, you can take the negative coordinate to 0 if the complete subcompletess meets the demand.
++y integer   The vertical coordinate of the upper left corner of the face frame. The face frame contains the positions of the five senses of the face and expands them to a certain extent. If the face frame exceeds the range of the picture, it will lead to negative coordinates. If you need to intercept the complete face, you can take the negative coordinate to 0 if the complete subcompletess meets the demand.
++width integer   Face width.
++height integer   Face height.
+face_detail_attributes_info object   Face attribute information.
++age integer [0, 65] Age. 65: 65 years old and above. When face_attributes_type does not contain Age or when more than 5 faces are detected, this parameter is still returned but is not informative.
++beauty integer [0, 100] Beauty Score. When face_attributes_type does not contain Beauty or when more than 5 faces are detected, this parameter is still returned but is not informative.
++emotion object   Emotional information. When face_attributes_type does not contain Emotion or when more than 5 faces are detected, this parameter is still returned but is not informative.
+++type integer
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 0: Neutral.
  • 1: Happy.
  • 2: Surprised.
  • 3: Angry.
  • 4: Sad.
  • 5: Disgusted.
  • 6: Fearful.
+++probability float [0, 1] Probability of being correct.
++eye object   Eye-related information. face_attributes_type does not contain Eye or when more than 5 faces are detected, this parameter is still returned but is not informative.
+++glass object   Wearing glasses.
++++type integer
  • 0
  • 1
  • 2
  • 0: No glasses.
  • 1: Regular glasses.
  • 2: Sunglasses.
++++probability float [0, 1] Probability of being correct.
+++eye_open object   Closed eyes.
++++type integer
  • 0
  • 1
  • 0: No.
  • 1: Yes.
++++probability float [0, 1] Probability of being correct.
+++eyelid_type object   Double eyelids.
++++type integer
  • 0
  • 1
  • 0: No.
  • 1: Yes.
++++probability float [0, 1] Probability of being correct.
+++eye_size object   Eye size.
++++type integer
  • 0
  • 1
  • 2
  • 0: Small eyes.
  • 1: Regular eyes.
  • 2: Large eyes.
++++probability float [0, 1] Probability of being correct.
++eyebrow object   Eyebrow information. face_attributes_type does not contain Eyebrow or when more than 5 faces are detected, this parameter is still returned but is not informative.
+++eyebrow_density object   Thick eyebrows.
++++type integer
  • 0
  • 1
  • 0: Sparse eyebrows.
  • 1: Thick eyebrows.
++++probability float [0, 1] Probability of being correct.
+++eyebrow_curve object   Curved eyebrows.
++++type integer
  • 0
  • 1
  • 0: Not curved.
  • 1: Curved eyebrows.
++++probability float [0, 1] Probability of being correct.
+++eyebrow_length object   Eyebrow length.
++++type integer
  • 0
  • 1
  • 0: Short eyebrows.
  • 1: Long eyebrows.
++++probability float [0, 1] Probability of being correct.
++gender object   Gender information. face_attributes_type does not contain Gender or when more than 5 faces are detected, this parameter is still returned but is not informative.
+++type integer
  • 0
  • 1
  • 0: Male.
  • 1: Female.
+++probability float [0, 1] Probability of being correct.
++hair object   Hair information. face_attributes_type does not contain Hair or when more than 5 faces are detected, this parameter is still returned but is not informative.
+++length object   Hair length information.
++++type integer
  • 0
  • 1
  • 2
  • 3
  • 4
  • 0: Bald.
  • 1: Short hair.
  • 2: Medium-length hair.
  • 3: Long hair.
  • 4: Tied hair.
++++probability float [0, 1] Probability of being correct.
+++bang object   Fringe (bangs) information.
++++type integer
  • 0
  • 1
  • 0: No fringe (bangs).
  • 1: Has fringe (bangs).
++++probability float [0, 1] Probability of being correct.
+++color object   Hair color information.
++++type integer
  • 0
  • 1
  • 2
  • 3
  • 0: Black.
  • 1: Blonde.
  • 2: Brown.
  • 3: Gray/White.
++++probability float [0, 1] Probability of being correct.
++hat object   Hat information. face_attributes_type does not contain Hat or when more than 5 faces are detected, this parameter is still returned but is not informative.
+++style object   Hat wearing status information.
++++type integer
  • 0
  • 1
  • 2
  • 3
  • 0: No hat.
  • 1: Regular hat.
  • 2: Helmet.
  • 3: Security hat.
++++probability float [0, 1] Probability of being correct.
+++color object   Hat color.
++++type integer
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 0: No hat.
  • 1: Red shades.
  • 2: Yellow shades.
  • 3: Blue shades.
  • 4: Black shades.
  • 5: Gray/White shades.
  • 6: Mixed colors.
++++probability float [0, 1] Probability of being correct.
++head_pose object   Face offset information. face_attributes_type does not contain HeadPose or when more than 5 faces are detected, this parameter is still returned but is not informative.
+++pitch integer [-30, 30] Vertical Offset.
+++yaw integer [-30, 30] Horizontal Offset.
+++pitch integer [-180, 180] Planar Rotation.
++mask object   Mask wearing information. face_attributes_type does not contain Mask or when more than 5 faces are detected, this parameter is still returned but is not informative.
+++type integer
  • 0
  • 1
  • 2
  • 3
  • 4
  • 0: No mask.
  • 1: Mask without covering face.
  • 2: Mask covering chin.
  • 3: Mask covering mouth.
  • 4: Correctly worn mask.
+++probability float [0, 1] Probability of being correct.
++mouth object   Mouth information. face_attributes_type does not contain Mouth or when more than 5 faces are detected, this parameter is still returned but is not informative.
+++mouth_open object   Mouth open.
++++type integer
  • 0
  • 1
  • 0: No.
  • 1: Yes.
++++probability float [0, 1] Probability of being correct.
++moustache object   Facial hair information. face_attributes_type does not contain Moustache or when more than 5 faces are detected, this parameter is still returned but is not informative.
+++type integer
  • 0
  • 1
  • 0: No facial hair.
  • 1: Facial hair.
+++probability float [0, 1] Probability of being correct.
++nose object   Nose information. face_attributes_type does not contain Nose or when more than 5 faces are detected, this parameter is still returned but is not informative.
+++type integer
  • 0
  • 1
  • 2
  • 3
  • 0: Upturned nose.
  • 1: Hooked nose.
  • 2: Normal.
  • 3: Round-tipped nose.
+++probability float [0, 1] Probability of being correct.
++shape object   Face shape information. face_attributes_type does not contain Shape or when more than 5 faces are detected, this parameter is still returned but is not informative.
+++type integer
  • 0
  • 1
  • 2
  • 3
  • 4
  • 0: Square face.
  • 1: Triangular face.
  • 2: Oval face.
  • 3: Heart-shaped face.
  • 4: Round face.
+++probability float [0, 1] Probability of being correct.
++skin object   Skin color information. face_attributes_type does not contain Skin or when more than 5 faces are detected, this parameter is still returned but is not informative.
+++type integer
  • 0
  • 1
  • 2
  • 3
  • 0: Yellow skin.
  • 1: Brown skin.
  • 2: Black skin.
  • 3: White skin.
+++probability float [0, 1] Probability of being correct.
++smile integer [0,100] Smile Rating. face_attributes_type does not contain Smile or when more than 5 faces are detected, this parameter is still returned but is not informative.


                                                                            
POST https://zylalabs.com/api/4443/face+analyzer+api/5456/face+analyzer
                                                                            
                                                                        

Face Analyzer - Endpoint Features

Object Description
Request Body [Required] File Binary
Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {
  "request_id":        "",
  "log_id":            "",
  "error_code":        0,
  "error_code_str":    "",
  "error_msg":         "",
  "error_detail":      {
    "status_code":  200,
    "code":         "",
    "code_message": "",
    "message":      ""
  },
  "image_width":       0,
  "image_height":      0,
  "face_detail_infos": [
    {
      "face_rect":                   {
        "x":      0,
        "y":      0,
        "width":  0,
        "height": 0
      },
      "face_detail_attributes_info": {
        "age":       0,
        "beauty":    0,
        "emotion":   {
          "type":        0,
          "probability": 0
        },
        "eye":       {
          "glass":       {
            "type":        0,
            "probability": 0.99936753511429
          },
          "eye_open":    {
            "type":        0,
            "probability": 0.99949336051941
          },
          "eyelid_type": {
            "type":        1,
            "probability": 0.75467920303345
          },
          "eye_size":    {
            "type":        2,
            "probability": 0.59152442216873
          }
        },
        "eyebrow":   {
          "eyebrow_density": {
            "type":        0,
            "probability": 0
          },
          "eyebrow_curve":   {
            "type":        0,
            "probability": 0
          },
          "eyebrow_length":  {
            "type":        0,
            "probability": 0
          }
        },
        "gender":    {
          "type":        0,
          "probability": 0
        },
        "hair":      {
          "length": {
            "type":        0,
            "probability": 0
          },
          "bang":   {
            "type":        0,
            "probability": 0
          },
          "color":  {
            "type":        0,
            "probability": 0
          }
        },
        "hat":       {
          "style": {
            "type":        0,
            "probability": 0
          },
          "color": {
            "type":        0,
            "probability": 0
          }
        },
        "head_pose": {
          "pitch": 0,
          "yaw":   0,
          "roll":  0
        },
        "mask":      {
          "type":        0,
          "probability": 0
        },
        "mouth":     {
          "mouth_open": {
            "type":        0,
            "probability": 0
          }
        },
        "moustache": {
          "type":        0,
          "probability": 0
        },
        "nose":      {
          "type":        2,
          "probability": 0.75233882665634
        },
        "shape":     {
          "type":        0,
          "probability": 0
        },
        "skin":      {
          "type":        0,
          "probability": 0
        },
        "smile":     0
      }
    }
  ]
}
                                                                                                                                                                                                                    
                                                                                                    

Face Analyzer - CODE SNIPPETS


    curl --location 'https://zylalabs.com/api/4443/face+analyzer+api/5456/face+analyzer' \
    --header 'Content-Type: application/json' \ 
    --form 'image=@"FILE_PATH"'


API Access Key & Authentication

After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Face Analyzer API REST API, simply include your bearer token in the Authorization header.
Headers
Header Description
Authorization [Required] Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.

Simple Transparent Pricing

No long term commitments. One click upgrade/downgrade or cancellation. No questions asked.

πŸš€ Enterprise

Starts at
$ 10,000/Year


  • Custom Volume
  • Specialized Customer Support
  • Real-Time API Monitoring

Customer favorite features

  • βœ”οΈŽ Only Pay for Successful Requests
  • βœ”οΈŽ Free 7-Day Trial
  • βœ”οΈŽ Multi-Language Support
  • βœ”οΈŽ One API Key, All APIs.
  • βœ”οΈŽ Intuitive Dashboard
  • βœ”οΈŽ Comprehensive Error Handling
  • βœ”οΈŽ Developer-Friendly Docs
  • βœ”οΈŽ Postman Integration
  • βœ”οΈŽ Secure HTTPS Connections
  • βœ”οΈŽ Reliable Uptime

Our Face Analyzer API delivers advanced facial analysis by detecting and evaluating faces in given images. The API provides precise face location coordinates (x, y, w, h) and comprehensive facial attributes, including gender, age, expression, beauty, glasses, hairstyle, mask, and pose (pitch, roll, yaw). Additionally, it offers detailed face quality metrics such as overall quality score, sharpness, brightness, and feature completeness. Ideal for applications in security, social media, digital marketing, and more, the Face Analyzer API ensures accurate and insightful facial data analysis, enhancing your application's capability to interpret and utilize facial information.

Security and Surveillance: Identifying individuals in security footage and monitoring crowds for security purposes. Emotion Recognition: Analyzing facial expressions to gauge emotions for applications in human-computer interaction and market research. Marketing and Advertising: Analyzing facial reactions to advertisements and marketing campaigns to gauge effectiveness and consumer response. Entertainment: Creating personalized experiences in gaming and virtual reality by analyzing facial expressions and movements. Customer Service: Improving customer service interactions by analyzing customer emotions and reactions in real time.

High Accuracy: Utilizes advanced algorithms to accurately analyze facial features and expressions, leading to reliable results. Real-Time Analysis: Capable of analyzing facial data in real time, enabling applications such as emotion recognition and security monitoring. Versatility: Applicable to a wide range of fields, including security, healthcare, marketing, entertainment, customer service, and education. Customization: Provides options for customization to adapt to specific application requirements and user preferences. Scalability: Can analyze large volumes of facial data efficiently, making it suitable for deployment in various settings and scales.

Yes, we do have more detailed [API documentation](https://www.ailabtools.com/doc/ai-portrait/analysis/face-analyzer/api-marketplace) available. You can access it on our website or by contacting our support team for assistance.

Software Developers and AI Engineers: Professionals developing applications that require facial feature analysis, including those in security, entertainment, and social media. Market Researchers and Analysts: Individuals analyzing consumer data and trends using facial attributes to gather insights for targeted marketing and product development. Security and Surveillance Experts: Organizations requiring accurate face location and quality metrics for identity verification and monitoring purposes.

Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.

Prices are listed in USD (United States Dollar), EUR (Euro), CAD (Canadian Dollar), AUD (Australian Dollar), and GBP (British Pound). We accept all major debit and credit cards. Our payment system uses the latest security technology and is powered by Stripe, one of the world’s most reliable payment companies. If you have any trouble paying by card, just contact us at [email protected]

Additionally, if you already have an active subscription in any of these currencies (USD, EUR, CAD, AUD, GBP), that currency will remain for subsequent subscriptions. You can change the currency at any time as long as you don't have any active subscriptions.

The local currency shown on the pricing page is based on the country of your IP address and is provided for reference only. The actual prices are in USD (United States Dollar). When you make a payment, the charge will appear on your card statement in USD, even if you see the equivalent amount in your local currency on our website. This means you cannot pay directly with your local currency.

Occasionally, a bank may decline the charge due to its fraud protection settings. We suggest reaching out to your bank initially to check if they are blocking our charges. Also, you can access the Billing Portal and change the card associated to make the payment. If these does not work and you need further assistance, please contact our team at [email protected]

Prices are determined by a recurring monthly or yearly subscription, depending on the chosen plan.

API calls are deducted from your plan based on successful requests. Each plan comes with a specific number of calls that you can make per month. Only successful calls, indicated by a Status 200 response, will be counted against your total. This ensures that failed or incomplete requests do not impact your monthly quota.

Zyla API Hub works on a recurring monthly subscription system. Your billing cycle will start the day you purchase one of the paid plans, and it will renew the same day of the next month. So be aware to cancel your subscription beforehand if you want to avoid future charges.

To upgrade your current subscription plan, simply go to the pricing page of the API and select the plan you want to upgrade to. The upgrade will be instant, allowing you to immediately enjoy the features of the new plan. Please note that any remaining calls from your previous plan will not be carried over to the new plan, so be aware of this when upgrading. You will be charged the full amount of the new plan.

To check how many API calls you have left for the current month, look at the β€˜X-Zyla-API-Calls-Monthly-Remaining’ header. For example, if your plan allows 1000 requests per month and you've used 100, this header will show 900.

To see the maximum number of API requests your plan allows, check the β€˜X-Zyla-RateLimit-Limit’ header. For instance, if your plan includes 1000 requests per month, this header will display 1000.

The β€˜X-Zyla-RateLimit-Reset’ header shows the number of seconds until your rate limit resets. This tells you when your request count will start fresh. For example, if it displays 3600, it means 3600 seconds are left until the limit resets.

Yes, you can cancel your plan anytime by going to your account and selecting the cancellation option on the Billing page. Please note that upgrades, downgrades, and cancellations take effect immediately. Additionally, upon cancellation, you will no longer have access to the service, even if you have remaining calls left in your quota.

You can contact us through our chat channel to receive immediate assistance. We are always online from 8 am to 5 pm (EST). If you reach us after that time, we will get back to you as soon as possible. Additionally, you can contact us via email at [email protected]

To let you experience our APIs without any commitment, we offer a 7-day free trial that allows you to make API calls at no cost during this period. Please note that you can only use this trial once, so make sure to use it with the API that interests you the most. Most of our APIs provide a free trial, but some may not support it.

After 7 days, you will be charged the full amount for the plan you were subscribed to during the trial. Therefore, it’s important to cancel before the trial period ends. Refund requests for forgetting to cancel on time are not accepted.

When you subscribe to an API trial, you can make only 25% of the calls allowed by that plan. For example, if the API plan offers 1000 calls, you can make only 250 during the trial. To access the full number of calls offered by the plan, you will need to subscribe to the full plan.


Related APIs