
Image to Text (OCR) API
Extract text from photos, screenshots and scans with AI OCR. Read up to five images at once, as plain text or with the layout kept. Free, no sign-up needed.
All API requests require a valid API key passed in the Authorization header as a Bearer token.
10 requests per minute
1 endpoint available
Overview
Reads the printed text in one to five images (photos, screenshots, scans) with an AI vision model and returns the transcription of each image, plus all of it joined together.
Input
Send multipart/form-data. Put each image in a file field; repeat the field to send up to five. Each image can be up to 12 MB. JPEG, PNG, WebP, GIF, AVIF and TIFF are read; other formats return 400.
Behavior
- Text is transcribed as written, in its own language. It is never translated or corrected.
- Words the model cannot read are written as
[illegible], andillegibleCountcounts them per image. truncated: truemeans the reply hit the length limit and the end of that image's text may be missing.- If no image has any readable text, the response is 422.
- Images are sent to the model inline and are not stored.
Limits
10 requests per minute and 200 requests per day per API key. AI tools share these limits.
Endpoints
https://opentools.ca/api/v1/tools/image-to-textRequest Body
Content-Type: multipart/form-data
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | Required | Image to read. Repeat the field for up to 5 images, 12 MB each. Results keep upload order. |
| layout | string Enum: plain, layout | Optional | "plain" rejoins lines that only wrap inside a paragraph. "layout" keeps line breaks, blank lines and spacing as they appear.Default: plain |
Response Example
{
"success": true,
"layout": "plain",
"pages": [
{
"text": "OPEN HOURS\n\nMonday to Friday 9 am - 6 pm. Saturday 10 am - 4 pm. Closed Sundays and holidays.",
"empty": false,
"truncated": false,
"illegibleCount": 0
}
],
"text": "OPEN HOURS\n\nMonday to Friday 9 am - 6 pm. Saturday 10 am - 4 pm. Closed Sundays and holidays."
}Error Codes
Code Examples
curl -X POST https://opentools.ca/api/v1/tools/image-to-text \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@receipt.jpg" \
-F "file=@page2.png" \
-F "layout=layout"Rather use it in your browser? Open the Image to Text (OCR)