Serverless AI Image Classification

Advanced image classification service that analyzes images and classifies them into predefined categories with confidence scores. Perfect for content moderation, image categorization, and visual content understanding.

Endpoint

Classify images into predefined categories with confidence scores

POSThttps://api.xtartapp.com/image/classification

*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
imagestringYes-Filename of the optimized .ximage file previously uploaded to the platform.
classificationsarrayYes-Array of classification objects containing key and context.
classifications[].keystringYes-Unique identifier for the classification category. Must contain only letters and numbers and be less than 50 characters.
classifications[].contextstringYes-Description of what this classification category represents. Must be less than 100 characters.

Response

NameTypeDescription
dataarrayArray of classification results
data[].keystringThe classification category key
data[].confidencenumberThe confidence score for the classification (0-1)
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 or required parameters are missing.
400INVALID_REQUESTThe request is invalid.
400INVALID_IMAGEThe image was not found or is invalid.
400HARM_CONTENTThe content is harmful and cannot be processed.
400INSUFFICIENT_BALANCEThe user has insufficient balance.
401UNAUTHORIZEDThe token is invalid.
429TOO_MANY_REQUESTSThe request limit has been reached.