Serverless AI Image Content Generation

AI powered image analysis service that extracts specific information and content from images based on the provided context and content keys.

Endpoint

Extract content from images based on specific keys

POSThttps://api.xtartapp.com/image/content-generation

*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.
languagestringYes-The language of the generated content. Supported languages: auto, en, es, fr, de, zh, ja, ko, pt, it, ru, ar, hi, auto (auto-detect).
contextstringNo200Optional context to help guide the image analysis. May provide helpful clues about what to look for in the image.
contentsarrayYes-Array of content keys and descriptions to extract from the image. Maximum 10 items.

Response

NameTypeDescription
dataobjectAn object containing all extracted content with keys matching the input content keys
metadataobjectMetadata about the image analysis process
metadata.costnumberThe cost of the image analysis request

Errors

{
   "error": "string", 
   "code": "string"
}
HTTP StatusError CodeMessage
400INVALID_PAYLOADOccurs when the payload is invalid.
400INVALID_REQUESTThe request is invalid.
400IMAGE_CONTENT_GENERATION_ERRORCould not generate content from image | parsing error.
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.