Model endpoint paused

The model is paused right now

AffectLens runs on a dedicated GPU server (AWS SageMaker) that bills by the hour, so it’s switched off when it isn’t being demoed. Signing up and running analyses will be back as soon as the endpoint is turned on again.

In the meantime, everything on this page shows the real output format, and the full code is on GitHub.

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

POST /api/sentiment-inference
user_interview.mp4
00:00.0 / 00:24.0

Okay, so I tried the new onboarding last night.

neutralsurpriseangerfearjoy
utterance 01 / 060.0s – 3.4s

“Okay, so I tried the new onboarding last night.”

Emotion · top 3
😐 neutral
71%
😄 joy
18%
😲 surprise
6%
Sentiment · top 3
😐 neutral
64%
👍 positive
29%
👎 negative
7%
Under the hoodWhisperBERTR3D-18PyTorchAWS SageMaker
Why video

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.

Transcript only

“Great, that’s just great.”

👍 Reads as positive

Words alone miss sarcasm, hesitation and tone.

Words + voice + face

“Great, that’s just great.”

😠 Anger👎 Negative

Tone and expression get a vote. (Illustrative example.)

How it works

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.

Input
Your video
.mp4 · .mov · .avi
Split
Whisper
Transcribes and cuts the clip into timestamped lines
TextBERT base
What was saidtokens → 768 → 128
VideoR3D-18
How it looked30 frames → 128
Audio1D CNN
How it sounded64 mel bands → 128
Fuse
Fusion layer
3 × 128 → 256
Emotion
7 classes
Sentiment
3 classes
Output

Every line, scored.

No single score for a whole video. You get a timeline you can search, chart and jump through.

7 emotions
😄joy😲surprise😠anger🤢disgust😨fear😢sadness😐neutral
3 sentiments
👍positive😐neutral👎negative
  • 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.
sample · 24s clip
Emotion mix across the clip
joy 33%neutral 21%surprise 15%fear 11%
Sentiment mix across the clip
positive 47%negative 27%neutral 26%
  1. 0.0–3.4s

    Okay, so I tried the new onboarding last night.

    😐 neutral 71%😐 neutral
  2. 3.4–6.9s

    Honestly? It was way faster than I expected.

    😲 surprise 58%👍 positive
  3. 6.9–11.2s

    But then the import just… failed. Twice.

    😠 anger 47%👎 negative
  4. 11.2–15.0s

    I was worried I'd lost all my old projects.

    😨 fear 62%👎 negative
  5. 15.0–19.6s

    Support got back to me in like ten minutes, though.

    😄 joy 66%👍 positive
  6. 19.6–24.0s

    So yeah, I'd still recommend it.

    😄 joy 71%👍 positive
API

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. 1
    POST /api/upload-url

    Get a signed upload URL and a file key.

  2. 2
    PUT <signed url>

    Upload the .mp4, .mov or .avi directly.

  3. 3
    POST /api/sentiment-inference

    Send the key, get the utterances back.

Errors you can handle
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);
}
Use cases

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.

Pricing

Free while you build.

Hosted API
$0/ month
  • ✓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
Create an account
Self-host
$0+ your AWS costs
  • ✓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
View on GitHub
FAQ

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.