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
Name | Type | Required | Max | Description |
---|---|---|---|---|
image | string | Yes | - | Filename of the optimized .ximage file previously uploaded to the platform. |
classifications | array | Yes | - | Array of classification objects containing key and context. |
classifications[].key | string | Yes | - | Unique identifier for the classification category. Must contain only letters and numbers and be less than 50 characters. |
classifications[].context | string | Yes | - | Description of what this classification category represents. Must be less than 100 characters. |
Response
Name | Type | Description |
---|---|---|
data | array | Array of classification results |
data[].key | string | The classification category key |
data[].confidence | number | The confidence score for the classification (0-1) |
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 or required parameters are missing. |
400 | INVALID_REQUEST | The request is invalid. |
400 | INVALID_IMAGE | The image was not found or is invalid. |
400 | HARM_CONTENT | The content is harmful and cannot be processed. |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance. |
401 | UNAUTHORIZED | The token is invalid. |
429 | TOO_MANY_REQUESTS | The request limit has been reached. |