About this endpoint
What it does
Classifies an input text as positive or negative and returns the text, the predicted label, and a confidence score.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| text | String | Yes | Input text. Maximum length: 512 characters. The schema description says it is truncated to 512 tokens. |
Response
Returns a JSON object with text, label, and score fields. text is a string, label is a string enum with positive or negative, and score is a number between 0 and 1.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| text | String | No | The text that was classified. |
| label | ENUM | No | The predicted sentiment label: positive or negative. |
| score | Number | No | Confidence score between 0 and 1. |