Serverless AI Zero-Shot Classification

AI powered zero-shot text classification service that classifies text into multiple labels with confidence scores.

Endpoint

Zero-shot text classification with label confidence scoring

POSThttps://api.xtartapp.com/text/classification/zero-shot

*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
textstringYes2500The text to classify
labelsarray of stringsYes25The candidate labels for classification

Response

NameTypeDescription
dataarrayArray of classification objects
data[].labelstringThe classified label
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.
400TEXT_ZERO_SHOT_CLASSIFICATION_ERROREx: could not classify the text | parsing error
400HARM_CONTENTEx.: The content is harmful and cannot be processed.
400INSUFFICIENT_BALANCEThe user has insufficient balance
401UNAUTHORIZEDEx.: The token is invalid.
429TOO_MANY_REQUESTSEx.: The request limit has been reached.