# OCR Processing Module

### Definition

The **OCR Processing** **module** utilizes artificial intelligence to perform optical character recognition on image and PDF files. It extracts and structures document data, returning the content in various formats such as JSON and Markdown.

{% hint style="warning" %}
To use this module, you must enable the Artificial Intelligence feature in **Skyone Studio**. Please contact the sales team at <comercial@skyone.solutions>.
{% endhint %}

### Adding the "OCR Processing” module

The "**OCR Processing**" module appears under the Tools option within the flow editor. After clicking to add it, the initial configuration modal will be displayed.

<figure><img src="/files/yUiK4H59bQj3cOd0Pddk" alt=""><figcaption></figcaption></figure>

Complete or select the following items to use the module:

* **File in base64:** Insert the file content (PDF or image) encoded in Base64 format, previously registered as a variable. Refer to the "Variables" section for more details.
* **Model:** Select the AI model to be used for OCR processing.
* **Return type (optional):** Choose the output format for the extracted text. Options include JSON (module default), Markdown, or Raw Text.
* **Prompt:** Enter the instruction to guide the data extraction and reading behavior.
* **Parse type (optional):** Defines how the system should interpret the extracted data:
  * **Auto parsing:** The API attempts to convert the response into JSON. If unsuccessful, it returns the original string.
  * **JSON Schema:** Defines a JSON schema to structure the response consistently.
* **Schema in JSON Schema:** Insert the schema definition (available only when the JSON Schema option is active).
* **Split into pages? (optional):** Enable this option to have the processing handle each page of the document individually.
* **Maintain context? (optional):** If enabled, the AI will use information from previous pages to improve understanding of the content on subsequent pages.

Click "**Next**". You will be redirected to the test screen.

Click "**Test**" to verify the module.&#x20;

<figure><img src="/files/bKycWNBVrp72lntBzHUu" alt=""><figcaption></figcaption></figure>

To finish, simply click "**Save**".

{% hint style="info" %}
[Learn more about the Module Header here](/english/skyone-studio/integrations/flows/module-header.md).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.skyone.cloud/english/skyone-studio/integrations/flows/tool-modules/ocr-processing-module.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
