> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/tech/en/quickstart/tu-xiang-bian-shi-zhi-yuan.md).

# Image Recognition Support

The differences between vision language models (VLMs) and traditional OCR, and how MaiAgent handles images in conversation attachments, knowledge base documents, and knowledge base image files.

## What Is a VLM (Vision Language Model)? <a href="#what-is-vlm" id="what-is-vlm"></a>

A vision language model (VLM) can understand both images and text. It not only recognizes text in an image, but also understands objects, tables, charts, and the relationships between them, and can answer questions or generate descriptions based on the image content.

## VLMs Compared with Traditional OCR <a href="#vlm-vs-ocr" id="vlm-vs-ocr"></a>

Traditional optical character recognition (OCR) focuses on finding and extracting text from images. It provides limited help in understanding an image's overall meaning or non-text content.

| Feature                | Traditional OCR                       | VLM                                                                    |
| ---------------------- | ------------------------------------- | ---------------------------------------------------------------------- |
| Primary Function       | Extract text from images              | Understand image content and combine it with textual information       |
| Scope                  | Text only                             | Text, objects, charts, and layout                                      |
| Level of Understanding | Character recognition                 | Scene understanding, relationship inference, and context               |
| Common Uses            | Document scanning and text extraction | Image question answering, chart interpretation, and image descriptions |

## Where MaiAgent Handles Images <a href="#where-images-are-handled" id="where-images-are-handled"></a>

### Image Attachments in Conversations <a href="#chat-attachments" id="chat-attachments"></a>

When a user uploads an image in a conversation, the image is sent directly to the Agent's large language model for interpretation, so the Agent must use a model that supports multimodal input. If the model does not support it, the response displays “Your selected LLM does not support multimodal input.” For models that support multimodal input, see [Model Access Permissions](https://docs.maiagent.ai/org/model-access) in the user manual.

The number of images sent to the model in a single request is limited by the platform settings (20 by default). When uploading through the API, set the attachment's `type` to `image` to send the image to the model as visual input. Setting it to `other` sends it through the document parsing workflow instead. See [How Message Attachments Are Processed](/tech/en/api-integration/api_knowledge.md#attachment-processing).

### Images and Scanned Pages in Knowledge Base Documents <a href="#document-images" id="document-images"></a>

Images, charts, and scanned pages in documents such as PDF, Word, and PowerPoint require a parser to extract their content before it can be retrieved:

* **Vision Parser**: Uses a cloud multimodal model to read documents page by page and convert the content of images, charts, and scanned pages into text.
* **MaiAgent Parser (Offline)**: When a multimodal model is configured, it also performs OCR and generates image descriptions for PDFs, making it suitable for environments that require offline operation.
* **MaiAgent Parser**: Extracts embedded images but does not convert their content into text. When the knowledge base uses an Embedding model that supports multimodal input, the extracted images are also indexed as vectors using the images themselves.

When you select <mark style="color:blue;">Auto Detect (Default)</mark> during upload, the system switches to one of the parsers above that can handle images for scanned files and documents containing images. For parser differences and pricing, see [Parser Tools](/tech/en/quickstart/parser.md).

### Image Files in the Knowledge Base <a href="#image-files" id="image-files"></a>

Image files (`.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.tiff`) can be uploaded directly to the knowledge base and indexed as vectors using the images themselves. This requires the knowledge base to use an Embedding model that supports multimodal input (Cohere Embed V4.0 in MaiAgent Cloud); otherwise, parsing the file will fail. See [Embedding Models](/tech/en/quickstart/embedding.md).

{% hint style="info" %}
These three scenarios are independent. An Agent model's support for multimodal input does not mean the knowledge base can handle image files, and vice versa. When planning your setup, check the Agent's model, the knowledge base parser, and the Embedding model separately.
{% endhint %}


---

# 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.maiagent.ai/tech/en/quickstart/tu-xiang-bian-shi-zhi-yuan.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.
