Serverless AI Image to Text Conversion
Powerful image to text conversion service that extracts all text content from images while preserving formatting and structure. Perfect for document digitization, content extraction, and text analysis of visual materials.
Endpoint
Extract all text from images with preserved structure
POSThttps://api.xtartapp.com/image/to-text
*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. |
Response
Name | Type | Description |
---|---|---|
data | object | The extracted text data from the image |
data.text | string | The full text extracted from the image with preserved formatting |
metadata | object | Metadata about the image to text conversion process |
metadata.cost | number | The cost of the image to text conversion 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_TO_TEXT_ERROR | Could not extract text 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. |