cURL
curl --request POST \ --url https://www.norns.ai/api/v0/sentiment \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "text": "<string>" } '
{ "success": true, "data": { "sentiment": "positive", "score": 0, "emotions": [ "<string>" ], "dominantEmotion": "<string>", "confidence": 0.5, "usage": 123, "tokenCount": 123 } }
Analyzes sentiment and emotions in text. Costs 1 credit per request.
API key authentication
Text to analyze for sentiment
Successful sentiment analysis response
Show child attributes
Overall sentiment (positive, negative, or neutral)
positive
negative
neutral
Sentiment score from -1.0 (very negative) to 1.0 (very positive)
-1 <= x <= 1
Array of detected emotions
The strongest emotion detected
Confidence score of the analysis (0.0 to 1.0)
0 <= x <= 1
Number of credits consumed
Number of tokens processed