Hear what they say.
See how they feel.
AffectLens is a video emotion API. Send a clip and get back every spoken line with its emotion and sentiment, read from the words, the voice and the face at once.
10,000 requests a month free · no card needed
Okay, so I tried the new onboarding last night.
“Okay, so I tried the new onboarding last night.”
A transcript only tells you half of it.
“Great, that’s just great” reads as positive on paper. Said through clenched teeth, it isn’t. AffectLens looks at how a line sounded and how the speaker looked before it decides.
“Great, that’s just great.”
Words alone miss sarcasm, hesitation and tone.
“Great, that’s just great.”
Tone and expression get a vote. (Illustrative example.)
Three signals, one reading per line.
Whisper splits the video into spoken lines. For each line, three encoders read the transcript, the frames and the audio. A fusion layer combines them, and two heads predict emotion and sentiment.
Every line, scored.
No single score for a whole video. You get a timeline you can search, chart and jump through.
- Per line, not per file. Each utterance gets its own reading, with start and end times.
- Top 3, with confidence. You see how sure the model is, not just one label.
- The transcript comes free. Every line includes the text Whisper heard.
- 0.0–3.4s
Okay, so I tried the new onboarding last night.
😐 neutral 71%😐 neutral - 3.4–6.9s
Honestly? It was way faster than I expected.
😲 surprise 58%👍 positive - 6.9–11.2s
But then the import just… failed. Twice.
😠 anger 47%👎 negative - 11.2–15.0s
I was worried I'd lost all my old projects.
😨 fear 62%👎 negative - 15.0–19.6s
Support got back to me in like ten minutes, though.
😄 joy 66%👍 positive - 19.6–24.0s
So yeah, I'd still recommend it.
😄 joy 71%👍 positive
Three requests. That’s the integration.
Authenticate with your secret key as a Bearer token. Videos go straight to storage through a signed URL, then one call returns the analysis.
- 1
POST /api/upload-urlGet a signed upload URL and a file key.
- 2
PUT <signed url>Upload the .mp4, .mov or .avi directly.
- 3
POST /api/sentiment-inferenceSend the key, get the utterances back.
- 401
- Missing or invalid API key
- 400
- Unsupported file type, or file already analyzed
- 403
- File was uploaded with a different key
- 404
- No upload found for that key
- 429
- Monthly quota used up
const API = "http://localhost:3000";
const headers = {
Authorization: `Bearer ${process.env.AFFECTLENS_KEY}`,
"Content-Type": "application/json",
};
// 1. Ask for a signed upload URL
const { url, key } = await fetch(`${API}/api/upload-url`, {
method: "POST",
headers,
body: JSON.stringify({ fileType: ".mp4" }),
}).then((r) => r.json());
// 2. Upload the video straight to storage
await fetch(url, {
method: "PUT",
headers: { "Content-Type": "video/mp4" },
body: file,
});
// 3. Analyze it
const { analysis } = await fetch(`${API}/api/sentiment-inference`, {
method: "POST",
headers,
body: JSON.stringify({ key }),
}).then((r) => r.json());
for (const line of analysis.utterances) {
console.log(line.start_time, line.text, line.emotions[0].label);
}Wherever people talk on camera.
User research
Find the moment an interview turned. Jump straight to the lines where frustration, worry or delight showed up.
Customer & sales calls
Score recorded video calls line by line and surface the conversations that slid negative.
Podcasts & creator video
Map the emotional arc of an episode and pull the most expressive moments for clips.
Research & teaching
A working multimodal baseline for affective-computing projects, with open-source training code behind it.
Free while you build.
- ✓10,000 analysis requests every month
- ✓Personal secret API key
- ✓Dashboard to upload and inspect videos
- ✓Quota meter, resets every 30 days
- ✓.mp4, .mov and .avi
- ✓PyTorch training code for the multimodal model
- ✓SageMaker training and endpoint scripts
- ✓Next.js app with auth, API keys and quotas
- ✓Run it in your own AWS account
Questions, answered.
What exactly does AffectLens return?
A list of utterances. Each one has a start time, an end time, the transcribed text, the top 3 emotions and the top 3 sentiments, each with a confidence between 0 and 1.
Which emotions can it detect?
Seven: anger, disgust, fear, joy, neutral, sadness and surprise. Sentiment is positive, neutral or negative.
Why use video instead of just the transcript?
The same words can carry very different feelings. AffectLens encodes the text, the audio and the video frames of every line separately, then fuses them, so tone of voice and facial expression count too.
What was the model trained on?
MELD, a public dataset of about 13,000 labelled lines of English multi-speaker TV dialogue. It works best on English conversation with visible speakers; expect lower accuracy on other languages, music, or footage without faces. Always read the confidence scores.
Which video formats are supported?
.mp4, .mov and .avi. You upload directly to storage with a signed URL, so the file never has to pass through your own server.
How does the quota work?
Each account gets 10,000 analysis requests per month. The counter resets 30 days after the last reset. When it runs out the API answers with HTTP 429.
Can I run it myself?
Yes. The model training and SageMaker deployment code (MIT licensed) and the Next.js app are both public on GitHub, so you can run the whole thing in your own AWS account.
Point it at a video. See what it feels.
Get a key in under a minute and run your first analysis today.