Analyze sentiment
Analyze the overall sentiment and emotional tone of a transcript.
This endpoint requires authentication. Include your API key in the Authorization header.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | valsea-sentiment | Yes | |
transcript | string | Yes | The transcript to analyze. |
response_format | json | verbose_json | No | Default: json |
semantic_tags | array | No | |
semantic_tags[].tag | string | No | |
semantic_tags[].phrase | string | No | |
semantic_tags[].meaning | string | No |
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)
| Field | Type | Description |
|---|---|---|
sentiment | positive | neutral | negative | |
confidence | number | Confidence score between 0 and 1. |
Verbose (verbose_json)
| Field | Type | Description |
|---|---|---|
sentiment | positive | neutral | negative | |
confidence | number | |
reasoning | string | |
emotions | array | Detected emotions (e.g. "happy", "frustrated"). |
Errors
| Status | Description |
|---|---|
401 | Missing or invalid API key |
402 | Insufficient credits |