---
title: "Convert a scanned image into text"
method: POST
path: "/ocr/image/toText"
tags: ["ImageOcr"]
---

# Convert a scanned image into text

`POST /ocr/image/toText`

Converts an uploaded image in common formats such as JPEG, PNG into text via Optical Character Recognition.  This API is intended to be run on scanned documents.  If you want to OCR photos (e.g. taken with a smart phone camera), be sure to use the photo/toText API instead, as it is designed to unskew the image first.  Note: for free tier API keys, it is required to add a credit card to your account for security reasons, to use the free tier key with this API.

## Headers

- `recognitionMode` string
- `language` string
- `preprocessing` string

## Response `200`

OK

- ImageToTextResponse — Response from an OCR to text operation. Includes the confience rating and converted text result.
  - `MeanConfidenceLevel` number, float — Confidence level rating of the OCR operation; ratings above 80% are strong.
  - `TextResult` string — Converted text string from the image input.

---

[API](https://skmtc.net/cloudmersive/apis/ocrapi.md) · [All operations](https://skmtc.net/cloudmersive/apis/ocrapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cloudmersive/ocrapi/versions/809f1a173306/schema)
