Analyze sentiment

    Analyze the overall sentiment and emotional tone of a transcript.

    Request Body

    ParameterTypeRequiredDescription
    modelvalsea-sentimentYes
    transcriptstringYesThe transcript to analyze.
    response_formatjson | verbose_jsonNoDefault: json
    semantic_tagsarrayNo
    semantic_tags[].tagstringNo
    semantic_tags[].phrasestringNo
    semantic_tags[].meaningstringNo

    Code Examples

    curl -X POST https://api.valsea.ai/v1/sentiment \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "valsea-sentiment",
        "transcript": "Your transcript text here..."
      }'
    

    Response

    Minimal (json)

    FieldTypeDescription
    sentimentpositive | neutral | negative
    confidencenumberConfidence score between 0 and 1.

    Verbose (verbose_json)

    FieldTypeDescription
    sentimentpositive | neutral | negative
    confidencenumber
    reasoningstring
    emotionsarrayDetected emotions (e.g. "happy", "frustrated").

    Errors

    StatusDescription
    401Missing or invalid API key
    402Insufficient credits

    Was this page helpful?