[Yandex Cloud documentation](../../../../index.md) > [Yandex Serverless Integrations](../../../index.md) > [Step-by-step guides](../../index.md) > Workflows > [Workflow step constructor](index.md) > Integration steps > OCR

# Text recognition in images

{% note tip %}

There is an ![image](../../../../_assets/console-icons/curly-brackets.svg) icon next to some fields in the Yandex AI Studio UI. These fields support [templates](../../../concepts/workflows/templating.md) for dynamic data retrieval from previous workflow steps. To avoid typing a template manually, click ![image](../../../../_assets/console-icons/curly-brackets.svg) and enter `{{` in the field.

{% endnote %}

{% list tabs %}

- Management console {#console}

  1. When [creating](../workflow/create-constructor.md) a new workflow or [editing](../workflow/update.md) an existing one, in the management console, under **Create workflow** / **Edit workflow**, select `Constructor`. 
  1. From the **AI Studio** section on the left side of the screen, drag the **OCR** element to relevant workflow location in the constructor window.

      You can drag and drop steps into areas marked by the dotted line in the workflow schema, such as **Add a step**, etc.
  1. In the workflow schema window, click the new **OCR** section to select it.
  1. At the right of the window, on the **Settings** tab.

      1. In the **Step name** field, enter a name for the workflow step.
      1. In the **File format** field, select the format of the image file you want to recognize text from.
      1. In the **Languages** field, select the languages for text recognition.
      1. In the **Model** field, select a recognition model.
      1. Under **Source**, select:

          * `URL` to specify the image file public URL.
          * `Object Storage` to specify an Object Storage [bucket](../../../../storage/concepts/bucket.md) storing the image file and the file object's name, e.g., `prefix/subprefix/data.png`.
          * `Yandex Disk` to specify a path to an image file on Yandex Disk and, optionally, a shared disk [label](https://yandex.ru/dev/disk-api/doc/en/reference/content_shd#query).

              To authenticate in Yandex Disk, under **OAuth token**, specify the [app OAUth token](https://yandex.ru/dev/disk-api/doc/en/concepts/quickstart#oauth) or Yandex Lockbox [secret](../../../../lockbox/concepts/secret.md) that stores the token. Select:

              * `Lockbox` to store the OAuth token in a secret; in the **Secret** section, select the secret, its [version](../../../../lockbox/concepts/secret.md#version), and the key used to store the OAuth token.

                  If you do not have a Yandex Lockbox secret, click **Create** to create it.
                
              * `Text` to store the OAuth token in the specification as text; enter the OAuth token in the **Value** field.

                  {% note warning %}

                  It is not safe to store your OAuth token in the specification in plain text.

                  {% endnote %}

          * `Base64` to specify a Base64-encoded image.

      1. Optionally, in the **Timeout, ms** field, set the maximum execution time for the current step.
      1. Optionally, to set a custom retry policy for a step, expand the **Retry policy** section and click ![plus](../../../../_assets/console-icons/plus.svg) **Retry policy**. In the form that appears:
         
         1. Optionally, in the **Initial delay, ms** field, set the initial value for a delay between step retries.
         1. Optionally, in the **Backoff rate** field, set the multiplication factor for delay before each step retry.
         1. Optionally, in the **Maximum delay, ms** field, set the value for a maximum delay between step retries.
         1. In the **Errors** field, select the errors for which the step will or will not be retried.
         
             For detailed information about possible errors, see [this section](../../../concepts/workflows/execution.md#errors).
         1. Optionally, in the **Maximum number of retries** field, set the maximum number of step retry attempts.
         1. In the **Error selection mode** field, select:
         
             * `INCLUDE`: Retry executing a step when errors specified in the **Errors** field occur.
             * `EXCLUDE`: To retry executing the step on any errors other than those specified in the **Errors** field.
         
         If you want to delete a retry policy you created for the step earlier, click ![ellipsis](../../../../_assets/console-icons/ellipsis.svg) and select **Delete** in the **Retry policy** row.
         
         If no custom retry policy is configured for a step, the retry policy [set for the whole workflow](setup-restart-policy.md) will apply.
  1. Optionally, navigate to the **Input** tab and set a [jq template](../../../concepts/workflows/templating.md) to filter the [workflow state](../../../concepts/workflows/workflow.md#state) fed into the step.
  1. Optionally, navigate to the **Output** tab and set a [jq template](../../../concepts/workflows/templating.md) to filter the step outputs added into the [workflow state](../../../concepts/workflows/workflow.md#state).
  1. Optionally, [add](setup-catch-rule.md) an [error transition rule](../../../concepts/workflows/yawl/index.md#catchrule) for the step you are creating to handle errors you may get during this step.

{% endlist %}

## Useful links {#see-also}

* [YaWL specification](../../../concepts/workflows/yawl/integration/ocr.md)
* [Creating a workflow using the constructor](../workflow/create-constructor.md)
* [Updating a workflow](../workflow/update.md)