Emotion Detection API: How to Choose One (Options Compared)

Updated · 9 min read

The best emotion detection API depends on three things: whether you need named emotions or just positive/negative, which languages your text is in, and how you want to pay. For text, the options are dedicated emotion APIs (such as Sentiment, which returns 28 GoEmotions scores per message in six languages for $0.00089 each), multimodal emotion AI such as Hume, cloud polarity APIs from Google, AWS and Azure, self-hosted open models, and prompting an LLM. This page compares them on what they return and how they bill, without made-up benchmarks.

What an emotion detection API returns

"Emotion detection" is used for two different outputs, and mixing them up is the most common reason teams pick the wrong API:

  • Polarity: positive, negative, neutral, sometimes mixed, with a confidence or a score. Good for trend lines.
  • Named emotions: scores for discrete emotions such as anger, gratitude, confusion or fear. Needed when the next step depends on the emotion, for example routing a confused customer to documentation and an angry one to a senior agent.

The difference is explained in depth in emotion detection vs. sentiment analysis.

The main options

Sentiment API (ours)

Returns scores for all 28 GoEmotions labels, the top emotion and a valence score in [-1, 1] for each message. Works in Arabic, English, French, Spanish, German and Turkish without a language parameter, and accepts batches of up to 10,000 texts. Billed per message from prepaid credit with no subscription; scripts and AI agents use an API key. Limits: jobs are asynchronous, six languages only, prepaid only, and text only. Details: GoEmotions API.

Hume Expression Measurement API

Hume focuses on emotional expression across modalities: face, voice (speech prosody) and language. If your input is audio or video, or you want one vendor across modalities, it is the obvious one to evaluate. It uses its own, larger set of emotion dimensions rather than GoEmotions. Check Hume's site for current pricing and language coverage.

Google Cloud Natural Language, Amazon Comprehend, Azure AI Language

Managed, many languages, enterprise billing and compliance. Their sentiment output is polarity: a score and magnitude (Google), four labels with confidences (Comprehend), or three labels with confidences plus opinion mining (Azure). None of them returns named emotions. A good choice if polarity is enough and you already use that cloud. See Comprehend vs. Google vs. Azure.

Self-hosted open models

Hugging Face has many emotion classifiers, including GoEmotions checkpoints (often English-only) and models trained on smaller taxonomies. The weights are free; you run the inference. The cheapest option at steady high volume, and the only one with full control, but you own serving, scaling and monitoring.

Other text emotion APIs and LLMs

API marketplaces list smaller emotion analysis APIs (Twinword is one often mentioned) with their own label sets, usually a handful of basic emotions. General-purpose LLMs can also label emotions from a prompt with any label set you like, at a higher cost per text and with less consistent scores from run to run.

Comparison table

OptionOutputInputLanguagesBilling
Sentiment API28 named emotions + valenceTextar, en, fr, es, de, trPer message, prepaid credit, no subscription
Hume Expression MeasurementMany emotion dimensionsFace, voice, textSee Hume docsUsage-based; see Hume
Google Cloud Natural LanguagePolarity score + magnitudeTextManyPer 1,000-character unit; free tier
Amazon Comprehend4 polarity labels + confidencesTextManyPer 100-character unit; free tier
Azure AI Language3 polarity labels + opinion miningTextManyPer text record; free tier
Self-hosted modelDepends on modelTextDepends on modelYour compute
LLM promptingAny labels you defineText (and more)ManyPer token

Competitor details reflect public documentation at the time of writing and may have changed. We don't quote their prices; check each provider.

How to choose

  1. Polarity or named emotions? If polarity is enough, use the cloud API you already have. If the action depends on the emotion, you need named emotions.
  2. Text only, or voice and video too? Multimodal input points to Hume. Text points to a text classifier.
  3. Which languages? If you need Arabic or Turkish alongside European languages with the same labels, check that the API covers all of them. See Arabic and Turkish.
  4. Volume and payment? Steady millions per month favour self-hosting. Low, bursty or agent-driven volume favours pay per request with no subscription.

Test before you commit

Published accuracy numbers rarely transfer to your data. Take 200 to 500 real texts, label them yourself with the emotions you care about, run them through two or three candidates, and compare. Look at the confident errors, not just the overall agreement. With Sentiment, a 200-text test costs about $0.178 at the current price.

Frequently asked questions

What is the best emotion detection API?

There is no single best one; it depends on your input and constraints. For text with named emotions in several languages and pay-per-message billing, the Sentiment API returns 28 GoEmotions scores. For multimodal input (voice, face and language), Hume's Expression Measurement API is built for that. If you only need positive/negative, the Google, AWS and Azure language APIs are enough. At high steady volume, self-hosting an open GoEmotions model is cheapest.

Do Google Cloud Natural Language, AWS Comprehend or Azure detect emotions?

Their sentiment features return polarity, not named emotions. Google returns a score and magnitude, Amazon Comprehend returns POSITIVE, NEGATIVE, NEUTRAL or MIXED with confidences, and Azure AI Language returns positive, neutral or negative with confidences plus optional opinion mining.

How many emotions can an API detect from text?

It depends on the taxonomy. Ekman-style models use six or seven basic emotions. GoEmotions-based APIs, including Sentiment, return 28 labels (27 emotions plus neutral). Some research and commercial models use larger sets of emotional dimensions.

Can I use an LLM for emotion detection instead?

Yes, a general-purpose LLM can label emotions from a prompt and is flexible about the label set. The trade-offs are higher cost and latency per text and less consistent scores between runs, so a dedicated classifier is usually better for large volumes or for tracking trends over time.

Try it on your own text

Sentiment is a pay-per-request API that returns all 28 GoEmotions scores plus a valence score for text in Arabic, English, French, Spanish, German and Turkish. No subscription — pay a fraction of a cent per message from prepaid credit.

Related guides