Image to Text (OCR)

Image to Text (OCR) API

Content

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.

Authentication

All API requests require a valid API key passed in the Authorization header as a Bearer token.

Rate Limit

10 requests per minute

Endpoints

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], and illegibleCount counts them per image.
  • truncated: true means 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

POST
https://opentools.ca/api/v1/tools/image-to-text
Extract the printed text from one to five images

Request Body

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
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

400
Bad Request - Invalid layout, no file, more than 5 files, or an image that could not be decoded
401
Unauthorized - Invalid or missing API key
403
Forbidden - API key inactive or expired, or IP not allowed for this key
413
Payload Too Large - An image is over 12 MB
415
Unsupported Media Type - A file is not an image
422
Unprocessable Entity - No readable text was found in any image
429
Too Many Requests - Per-minute or daily limit reached
500
Internal Server Error

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"

Ready to get started?

Create an API key to start using the Image to Text (OCR) API.

Rather use it in your browser? Open the Image to Text (OCR)