Serverless AI Image Content Extraction
AI powered OCR service that extracts specific text content from images based on the provided content keys.
Endpoint
Extract text content from images based on specific keys
POSThttps://api.xtartapp.com/image/content-extraction
*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. |
contents | array | Yes | - | Array of content keys and descriptions to extract from the image. Maximum 25 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 extraction 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_EXTRACTION_ERROR | Could not extract 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. |