Skip to content

Emotion Analysis

Submit text for batch emotion analysis using the Expression Measurement API.

This example assumes using HumeAI; is in scope and apiKey contains your HumeAI API key.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
// Create an authenticated client
using var client = new HumeAIClient(apiKey);

// Start a batch inference job with text analysis
var jobResult = await client.Batch.StartBatchInferenceJobAsync(
    request: new InferenceBaseRequest
    {
        Text = ["I am so happy to see you! This is wonderful news."],
        Models = new ModelsConfig
        {
            Language = new LanguageModelConfig(),
        },
    });

// The job ID can be used to check status and retrieve predictions