Emotion Detection API

Be able to detect any emotions in a given image. The model detects the following emotions on a human face: neutral, joy, sadness, surprise, anger, fear, and disgust.

About the API:

Emotion recognition is the process of detecting displayed human emotions using artificial intelligence-based technologies in order to evaluate non-verbal responses to products, services, or goods. Emotion analysis can be carried out using face detection or facial recognition technology which enables programs to “examine” the sentiments on a human face by utilizing sophisticated image dispensation. Facial expressions are generally analyzed by using cameras to detect faces and capture real-time human responses to real-world scenarios. Each facial expression that an individual display causes the facial muscles to move and contract differently, and this makes the process of determining an emotion easier for the deep learning AI algorithms.

 

What this API receives and what your API provides (input/output)?

You will be passing the image URL that you want to detect the emotions. The response will provide the location of the face that is being analyzed and an emotion percentage from 0.01 to 0.99, were closer to 0.99 means more accurate emotion. 

The API will compare between "happy", "sad", "angry", "disgust", "fear", "surprise", and "neutral". 

 

What are the most common uses cases of this API?

Emotion recognition for online admissions and interviews: 

Emotion recognition can be used to understand how candidates feel during interviews and to measure how they react to certain questions. This information can be used to optimize interview structure for future candidates and streamline the application process. Using Sightcorps technology you can also measure attention using head orientation/pose analysis. 

Emotion Analysis for A/B campaign testing:

Using emotion analysis technology it is possible to pre-evaluate remotely or on-site marketing campaigns, This helps to ensure that they are evoking the right reactions before launching to the market. Using facial expression recognition software, advertisers can see which ads are receiving high engagement and positive emotional responses from viewers and provides them with the tools to run tests at scale on different target audiences to ensure that the campaigns with the highest impact are selected.

Emotion analysis for online education:

Anonymous emotion detection for online education is an ideal way to analyze the online student journey and improve it where necessary. Assess the school's course materials, teaching styles, structure, and layout by way of emotional feedback as students go through each module in real-time. Use true facial responses and engagement levels to find points of interest or course stumbling blocks and make optimizations.  

Emotion recognition in health care:

An industry that’s taking advantage of this technology is health care, with AI-powered recognition software helping to decide when patients need medicine, assess their emotional response in clinical trials, or help physicians in deciding how to best triage their patients.  

Emotion analysis in video game testing:

Video games are designed with a specific target audience in mind and aim to evoke a particular behavior and set of emotions from the users. During the testing phase, users are asked to play the game for a given period and their feedback is incorporated to make the final product. Using facial emotion recognition can aid in understanding which emotions a user is experiencing in real-time. This is a great addition to verbal feedback as it provides a more complex review of the gaming experience.

Automotive industry and emotion analysis:

Car manufacturers all over the globe are focusing on manufacturing automobiles that are safe to drive and provide a personalized experience for users. Moreover, the use of AI, ML, and deep learning techniques in facial recognition systems understand human emotions. It ensures driver safety by analyzing their facial expressions to detect fatigue or drowsiness and send alerts. The system prompts the driver to stop for a while, take a coffee break, play music, or adjust the temperature if it detects an anomaly.

 

Are there any limitations with your plans?

Besides the number of API calls per month: 

  •  
  • Basic Plan: 40 requests per minute. 
  • Pro Plan: 60 requests per minute. 
  • Pro Plus: 100 requests per minute. 

API Documentation

Endpoints


Recognize any emotions in a given picture with ease. 

Just pass the image URL and receive the emotions detected there. 

 



                                                                            
POST https://zylalabs.com/api/116/emotion+detection+api/167/detect+emotion
                                                                            
                                                                        

Detect Emotion - Endpoint Features

Object Description
Request Body [Required] Json
Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            [{"probability":0.9990027546882629,"rectangle":{"left":177.9499181009829,"top":172.29898417647928,"right":454.37264498770236,"bottom":575.1455794876907},"emotion":{"value":"happy","probability":0.9984017014503479,"sentiments":{"angry":1.9045217413804494e-05,"disgust":6.086859866627492e-05,"fear":5.2635550673585385e-05,"happy":0.9984017014503479,"sad":0.00011563439329620451,"surprise":0.0011431719176471233,"neutral":0.00020686474454123527}}}]
                                                                                                                                                                                                                    
                                                                                                    

Detect Emotion - CODE SNIPPETS


curl --location --request POST 'https://zylalabs.com/api/116/emotion+detection+api/167/detect+emotion' --header 'Authorization: Bearer YOUR_API_KEY' 

--data-raw '{
    "url": "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=668&q=80"
}'

    

Recognize any emotions in a given picture with ease. 

Just pass the image URL and receive the emotions detected there. 



                                                                            
POST https://zylalabs.com/api/116/emotion+detection+api/1061/detection+emotion
                                                                            
                                                                        

Detection Emotion - Endpoint Features

Object Description
img_url [Required]
Test Endpoint

API EXAMPLE RESPONSE

       
                                                                                                        
                                                                                                                                                                                                                            {"detections": [{"emotions": {"angry": 7.662818825338036e-05, "sad": 0.021542243659496307, "neutral": 0.957449734210968, "happy": 0.016172140836715698, "disgust": 0.004556640051305294, "surprise": 0.00012322478869464248, "fear": 7.933358574518934e-05}, "crop": {"x1": 0.0921177864074707, "x2": 0.18895521759986877, "y1": 0.5598205327987671, "y2": 0.7282398343086243, "score": 0.9986979961395264}}, {"emotions": {"angry": 0.008768733590841293, "sad": 0.9830912947654724, "neutral": 0.0009531059768050909, "happy": 0.000608281057793647, "disgust": 0.004676091019064188, "surprise": 8.760637865634635e-05, "fear": 0.0018148914678022265}, "crop": {"x1": 0.3410644829273224, "x2": 0.436722069978714, "y1": 0.28650331497192383, "y2": 0.4500385820865631, "score": 0.9986734390258789}}, {"emotions": {"angry": 0.014718671329319477, "sad": 0.9766198396682739, "neutral": 0.0009200209169648588, "happy": 0.0010258188704028726, "disgust": 0.004693961702287197, "surprise": 9.432777005713433e-05, "fear": 0.0019272681092843413}, "crop": {"x1": 0.8457512259483337, "x2": 0.9436366558074951, "y1": 0.027923330664634705, "y2": 0.19752132892608643, "score": 0.9986612796783447}}, {"emotions": {"angry": 0.003244522027671337, "sad": 0.6852898001670837, "neutral": 0.26349785923957825, "happy": 0.0005783516680821776, "disgust": 0.03780462592840195, "surprise": 0.004389339592307806, "fear": 0.005195499397814274}, "crop": {"x1": 0.08541946858167648, "x2": 0.18252816796302795, "y1": 0.04651014506816864, "y2": 0.21034161746501923, "score": 0.9986293315887451}}, {"emotions": {"angry": 0.08581036329269409, "sad": 0.13828475773334503, "neutral": 0.0945696160197258, "happy": 0.005091093946248293, "disgust": 0.10978526622056961, "surprise": 0.45284950733184814, "fear": 0.11360930651426315}, "crop": {"x1": 0.835882306098938, "x2": 0.9317261576652527, "y1": 0.8022559285163879, "y2": 0.9593812227249146, "score": 0.9986283779144287}}, {"emotions": {"angry": 0.00016641912225168198, "sad": 0.059466417878866196, "neutral": 0.006035596132278442, "happy": 0.8828521966934204, "disgust": 0.0043478612788021564, "surprise": 0.038554538041353226, "fear": 0.008577035740017891}, "crop": {"x1": 0.34556856751441956, "x2": 0.4407889246940613, "y1": 0.7927536964416504, "y2": 0.9540935158729553, "score": 0.9986225366592407}}, {"emotions": {"angry": 0.006066858768463135, "sad": 0.0010704046580940485, "neutral": 0.0011955015361309052, "happy": 0.0002654368872754276, "disgust": 6.579285400221124e-05, "surprise": 0.8807215094566345, "fear": 0.11061449348926544}, "crop": {"x1": 0.10050337016582489, "x2": 0.2042362540960312, "y1": 0.7964820861816406, "y2": 0.9794591665267944, "score": 0.9984971284866333}}, {"emotions": {"angry": 0.0005037524970248342, "sad": 0.0010864059440791607, "neutral": 1.2292537576286122e-05, "happy": 0.008865888230502605, "disgust": 2.719100120884832e-05, "surprise": 0.7165583968162537, "fear": 0.2729460299015045}, "crop": {"x1": 0.8345211744308472, "x2": 0.9299759268760681, "y1": 0.5601410865783691, "y2": 0.7390761375427246, "score": 0.9982064962387085}}, {"emotions": {"angry": 1.1968873877776787e-05, "sad": 0.0001657660905038938, "neutral": 0.00530551141127944, "happy": 0.990391731262207, "disgust": 0.00013892872084397823, "surprise": 0.0038504975382238626, "fear": 0.00013559116632677615}, "crop": {"x1": 0.08888475596904755, "x2": 0.19110727310180664, "y1": 0.2875526547431946, "y2": 0.4622143507003784, "score": 0.9978984594345093}}, {"emotions": {"angry": 0.0006629154086112976, "sad": 0.13283638656139374, "neutral": 0.5676032304763794, "happy": 0.27378737926483154, "disgust": 0.018750181421637535, "surprise": 0.002474874025210738, "fear": 0.003885033307597041}, "crop": {"x1": 0.6062652468681335, "x2": 0.7021478414535522, "y1": 0.7975308895111084, "y2": 0.9439920783042908, "score": 0.997859537601471}}, {"emotions": {"angry": 0.021045776084065437, "sad": 0.7185375094413757, "neutral": 0.09105641394853592, "happy": 0.0004497228073887527, "disgust": 0.1577453315258026, "surprise": 0.003328491933643818, "fear": 0.007836729288101196}, "crop": {"x1": 0.8368862867355347, "x2": 0.9428989291191101, "y1": 0.29540950059890747, "y2": 0.46619051694869995, "score": 0.9977903366088867}}, {"emotions": {"angry": 0.00011164861643919721, "sad": 0.847297191619873, "neutral": 0.09995566308498383, "happy": 0.004591424483805895, "disgust": 0.012901201844215393, "surprise": 0.0035157944075763226, "fear": 0.03162722289562225}, "crop": {"x1": 0.5817064642906189, "x2": 0.6886800527572632, "y1": 0.03191874176263809, "y2": 0.20072537660598755, "score": 0.997465968132019}}, {"emotions": {"angry": 3.947097866330296e-07, "sad": 1.248280477739172e-05, "neutral": 6.534343265229836e-05, "happy": 1.1869508398376638e-06, "disgust": 4.858913484895311e-07, "surprise": 0.9998743534088135, "fear": 4.573437763610855e-05}, "crop": {"x1": 0.5817520022392273, "x2": 0.6791829466819763, "y1": 0.5405747294425964, "y2": 0.7361804246902466, "score": 0.9973610043525696}}, {"emotions": {"angry": 4.863930371357128e-05, "sad": 0.00011764073860831559, "neutral": 0.002871865639463067, "happy": 0.08315121382474899, "disgust": 2.382390812272206e-05, "surprise": 0.913644552230835, "fear": 0.00014227187784854323}, "crop": {"x1": 0.3302620053291321, "x2": 0.42947137355804443, "y1": 0.5605955123901367, "y2": 0.7391798496246338, "score": 0.9973570704460144}}, {"emotions": {"angry": 0.0004575720231514424, "sad": 0.6707291603088379, "neutral": 0.2812739908695221, "happy": 5.2161609346512705e-05, "disgust": 0.03971533849835396, "surprise": 0.006140395998954773, "fear": 0.0016313801752403378}, "crop": {"x1": 0.33696746826171875, "x2": 0.4358404278755188, "y1": 0.042578451335430145, "y2": 0.20695656538009644, "score": 0.9970537424087524}}, {"emotions": {"angry": 0.0009728102013468742, "sad": 0.035279739648103714, "neutral": 0.9530791640281677, "happy": 0.0011411933228373528, "disgust": 0.009296112693846226, "surprise": 0.00018096856365446, "fear": 5.00130518048536e-05}, "crop": {"x1": 0.5824314951896667, "x2": 0.6878113746643066, "y1": 0.2827398478984833, "y2": 0.44106823205947876, "score": 0.9947507977485657}}]}
                                                                                                                                                                                                                    
                                                                                                    

Detection Emotion - CODE SNIPPETS


curl --location --request POST 'https://zylalabs.com/api/116/emotion+detection+api/1061/detection+emotion?img_url=https://eldiariony.com/wp-content/uploads/sites/2/2021/08/Lionel-Messi-3.jpg?quality=75&strip=all&w=1200' --header 'Authorization: Bearer YOUR_API_KEY' 


    

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 Emotion Detection 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

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, refer to the β€˜X-Zyla-API-Calls-Monthly-Remaining’ field in the response header. For example, if your plan allows 1000 requests per month and you've used 100, this field in the response header will indicate 900 remaining calls.

To see the maximum number of API requests your plan allows, check the β€˜X-Zyla-RateLimit-Limit’ response 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.

 Service Level
100%
 Response Time
1,333ms

Category:


Related APIs