Serverless AI Image Color Extraction

Advanced image color analysis service that extracts dominant colors from images with detailed color information including names, hex codes, and dominance scores. Perfect for color palette generation, design analysis, and visual content understanding.

Endpoint

Extract dominant colors from images with detailed color information

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

*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.
limitnumberNo-Maximum number of dominant colors to extract (1-5). Defaults to 5 if not specified.

Response

NameTypeDescription
dataarrayArray of dominant colors extracted from the image
data[].namestringThe descriptive name of the color
data[].hexstringThe hex code of the color in standard 6-digit format
data[].scorenumberThe dominance score of the color (sum of all scores equals 1)
metadataobjectMetadata about the color extraction process
metadata.costnumberThe cost of the color extraction 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.