Serverless AI Bot Intent Classifier
AI powered intent classification service that identifies user intents from a set of predefined intents with confidence scores.
Endpoint
Bot intent classification with confidence scoring
POSThttps://api.xtartapp.com/bot/intent
*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 | 2000 | The user input text to classify |
intents | array of objects | Yes | 10 | The predefined intents for classification |
intents[].name | string | Yes | 50 | The name of the intent |
intents[].description | string | Yes | 200 | The description of the intent |
Response
Name | Type | Description |
---|---|---|
data | array | Array of classified intents with confidence scores |
data[].name | string | The name of the intent |
data[].description | string | The description of the intent |
data[].confidence | number | The confidence score of the classification |
metadata | object | Metadata about the classification process |
metadata.cost | number | The cost of the classification 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 | BOT_INTENT_ERROR | Ex: could not classify the intent | parsing error |
400 | HARM_CONTENT | Ex.: The content is harmful and cannot be processed. |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance |
400 | INPUT_TOO_LONG | The input text exceeds the maximum length |
401 | UNAUTHORIZED | Ex.: The token is invalid. |
429 | TOO_MANY_REQUESTS | Ex.: The request limit has been reached. |