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
Name | Type | Required | Max | Description |
---|---|---|---|---|
image | string | Yes | - | Filename of the optimized .ximage file previously uploaded to the platform. |
language | string | Yes | - | The language of the generated content. Supported languages: auto, en, es, fr, de, zh, ja, ko, pt, it, ru, ar, hi, auto (auto-detect). |
context | string | No | 200 | Optional context to help guide the image analysis. May provide helpful clues about what to look for in the image. |
contents | array | Yes | - | Array of content keys and descriptions to extract from the image. Maximum 10 items. |
Response
Name | Type | Description |
---|---|---|
data | object | An object containing all extracted content with keys matching the input content keys |
metadata | object | Metadata about the image analysis process |
metadata.cost | number | The cost of the image analysis request |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | Occurs when the payload is invalid. |
400 | INVALID_REQUEST | The request is invalid. |
400 | IMAGE_CONTENT_GENERATION_ERROR | Could not generate content from image | parsing error. |
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. |