Sentiment Analysis API
POST
https://api.figolabs.ai/api/v1/sentiment/anaylze
Apis
Maintainer:Figo AI Labs
It evaluates user input against a predefined list of sentiments and returns 1 if a match is found, or 0 otherwise.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.figolabs.ai/api/v1/sentiment/anaylze' \
--header 'Authorization: Bearer {Your-API-Key}' \
--header 'Content-Type: application/json' \
--data-raw '{
"inputExpressions": ["I am happy", "I am sad"],
"sentimentInstruction" : "happy"
}'
Response Response Example
200 - Success
{
"responseCode": "00",
"responseMessage": "Successful",
"responseData": {
"summary": "50% passed, 50% failed",
"results": [
{
"comment": "I am happy.",
"score": "1",
"reason": "The comment directly expresses happiness, which aligns with the context sentiment."
},
{
"comment": "I am sad.",
"score": "0",
"reason": "The comment expresses sadness, which does not align with the context sentiment of happiness."
}
]
}
}
Request
Header Params
Content-Type
string
required
Example:
application/json
Authorization
string
required
Example:
Bearer {Your-API-Key}
Body Params application/json
Responses
Modified at 2025-04-22 18:50:07