> For the complete documentation index, see [llms.txt](https://docs.aimlapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aimlapi.com/api-references/vision-models/ocr-optical-character-recognition.md).

# OCR: Optical Character Recognition

Optical Character Recognition (OCR) technology enables the extraction of text from images, scanned documents, and PDFs, transforming them into machine-readable formats. Modern OCR systems go beyond simple text recognition, interpreting complex layouts, tables, and even handwritten notes with high accuracy. This technology is widely used in document automation, digital archiving, and accessibility tools, making information more searchable and editable.

Advanced OCR models leverage deep learning to enhance recognition capabilities, accurately distinguishing between different fonts, languages, and structures. Some solutions also integrate natural language processing (NLP) to improve contextual understanding, ensuring better accuracy in document digitization. As OCR technology evolves, it continues to bridge the gap between physical and digital content, streamlining workflows across industries.

We provide APIs from two providers: **Google** and **Mistral AI**. Test both options by making several trial requests and determine which one best suits your needs.

### Supported Models

<table data-full-width="true"><thead><tr><th width="266.20001220703125">Model ID + API Reference link</th><th width="132.79998779296875">Developer</th><th width="103.5999755859375">Context</th><th>Model Card</th></tr></thead><tbody><tr><td><a href="/api-references/vision-models/ocr-optical-character-recognition/google/google-ocr.md">google/gc-document-ai</a></td><td>Google</td><td></td><td>-</td></tr><tr><td><a href="/api-references/vision-models/ocr-optical-character-recognition/mistral-ai/mistral-ocr.md">mistral/mistral-ocr-latest</a></td><td>Mistral AI</td><td></td><td><a href="https://aimlapi.com/models/mistral-ocr-latest-api">Mistral OCR Latest</a></td></tr><tr><td><a href="/api-references/vision-models/ocr-optical-character-recognition/zhipu/glm-ocr.md">zhipu/glm-ocr</a></td><td>Zhipu</td><td></td><td><a href="https://aimlapi.com/models/glm-ocr">GLM-OCR</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aimlapi.com/api-references/vision-models/ocr-optical-character-recognition.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
