Serverless AI Feedback Rating
AI powered feedback rating service that evaluates feedback based on quality, relevance, clarity, constructiveness, and overall sentiment.
Endpoint
Feedback rating with multiple evaluation dimensions and sentiment analysis
POSThttps://api.xtartapp.com/text/rating
*Authentication
You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.
Request body
Name | Type | Required | Max | Description |
---|---|---|---|---|
text | string | Yes | 2500 | The text feedback to rate |
Response
Name | Type | Description |
---|---|---|
data | object | Object containing the rating scores and sentiment |
data.quality | number | Score for writing style, grammar, and professionalism (0-10) |
data.relevance | number | Score for focus and topic adherence (0-10) |
data.clarity | number | Score for text understandability (0-10) |
data.constructiveness | number | Score for helpfulness, value and clarity (0-10) |
data.rating | number | Overall rating based on sentiment and context (0-10) |
data.sentiment | string | Sentiment classification (Positive, Negative, or Neutral) |
metadata | object | Metadata about the rating process |
metadata.cost | number | The cost of the rating request |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | Occurs when the payload is invalid. |
400 | INVALID_REQUEST | Ex.: The request is invalid. |
400 | TEXT_RATING_ERROR | Ex: could not rate the text | parsing error |
400 | HARM_CONTENT | Ex.: The content is harmful and cannot be processed. |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance |
401 | UNAUTHORIZED | Ex.: The token is invalid. |
429 | TOO_MANY_REQUESTS | Ex.: The request limit has been reached. |