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

NameTypeRequiredMaxDescription
textstringYes2000The user input text to classify
intentsarray of objectsYes10The predefined intents for classification
intents[].namestringYes50The name of the intent
intents[].descriptionstringYes200The description of the intent

Response

NameTypeDescription
dataarrayArray of classified intents with confidence scores
data[].namestringThe name of the intent
data[].descriptionstringThe description of the intent
data[].confidencenumberThe confidence score of the classification
metadataobjectMetadata about the classification process
metadata.costnumberThe cost of the classification request

Errors

{
   "error": "string", 
   "code": "string"
}
HTTP StatusError CodeMessage
400INVALID_PAYLOADOccurs when the payload is invalid.
400INVALID_REQUESTEx.: The request is invalid.
400BOT_INTENT_ERROREx: could not classify the intent | parsing error
400HARM_CONTENTEx.: The content is harmful and cannot be processed.
400INSUFFICIENT_BALANCEThe user has insufficient balance
400INPUT_TOO_LONGThe input text exceeds the maximum length
401UNAUTHORIZEDEx.: The token is invalid.
429TOO_MANY_REQUESTSEx.: The request limit has been reached.