> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unstructured.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Generative OCR task

> The Generative OCR task uses a vision language model to improve the fidelity of text blocks that Unstructured initially processed during partitioning.

*Type*: `prompter`

*Subtype*: see [Settings](#settings)

<Warning>
  Unstructured can produce generative OCR optimizations for workflows that are configured as follows:

  * With a **Partitioner** node set to use the **Auto** or **High Res** partitioning strategy, and a generative OCR optimizations node is added.
  * With a **Partitioner** node set to use the **VLM** partitioning strategy. No generative OCR optimization node is needed (or allowed).

  Unstructured never produces generative OCR optimizations for workflows with a **Partitioner** node set to use the **Fast** partitioning strategy.
</Warning>

<Warning>
  Generative OCR does not process any text blocks by default. You must also explicitly specify which document element
  types containing text that you want generative OCR to process.

  To do this, in a workflow's [High Res](/api-reference/workflow/nodes/partitioner/partitioner-high-res) partitioner node,
  add each [document element type](/concepts/document-elements#element-type) that you want generative OCR to process to the
  `extract_image_block_types` list within the partitioner node's `settings` field definition.

  Generative OCR does not process the text of any `Image` or `Table` elements if they have already been processed by
  [image description](/api-reference/workflow/nodes/enrichment/enrichment-image-description) or [table description](/api-reference/workflow/nodes/enrichment/enrichment-table-description) enrichments, respectively.
</Warning>

## Settings

<ParamField body="subtype" type="string" required>
  Enrichment algorithm and provider. Set at the `WorkflowNode` level, outside of `settings`. Allowed values:

  * `anthropic_ocr`
  * `bedrock_ocr`
  * `openai_ocr`

  <Note>
    The preceding list applies only to Unstructured **Let's Go** and **Pay-As-You-Go** accounts.

    For Unstructured **Business** accounts, to get your current list of available values, contact your
    Unstructured account administrator or Unstructured sales representative, or email Unstructured Support at
    [support@unstructured.io](mailto:support@unstructured.io).
  </Note>
</ParamField>

<ParamField body="provider_type" type="string" required>
  Provider that matches the prefix of `subtype`. Allowed values: `anthropic`, `bedrock`, `openai`.
</ParamField>

<ParamField body="model" type="string" required>
  Model to use for generative OCR. For a full list of the models available in Unstructured, see [Available models](/api-reference/workflow/models).
</ParamField>

<RequestExample>
  ```python Python SDK theme={null}
  generative_ocr_enrichment_workflow_node = WorkflowNode(
      name="Enrichment",
      subtype="<subtype>",
      type="prompter",
      settings={
          "provider_type": "<provider-type>",
          "model": "<model>"
      }
  )
  ```

  ```json cURL theme={null}
  {
      "name": "Enrichment",
      "type": "prompter",
      "subtype": "<subtype>",
      "settings": {
          "provider_type": "<provider-type>",
          "model": "<model>"
      }
  }
  ```
</RequestExample>
