---
title: "Convert a photo of a document into text"
method: POST
path: "/ocr/photo/toText"
tags: ["ImageOcr"]
---

# Convert a photo of a document into text

`POST /ocr/photo/toText`

Converts an uploaded photo of a document in common formats such as JPEG, PNG into text via Optical Character Recognition.  This API is intended to be run on photos of documents, e.g. taken with a smartphone and supports cases where other content, such as a desk, are in the frame and the camera is crooked.  If you want to OCR a scanned image, use the image/toText API call instead as it is designed for scanned images.  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

## 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)
