Wiro - Extract Text From Image icon

Wiro - Extract Text From Image

Extracts text from images using AI

Overview

This node extracts text from images using AI-powered OCR (Optical Character Recognition) technology provided by an external service. It is useful for automating the extraction of textual content from image URLs, such as scanned documents, screenshots, or photos containing text. Practical applications include digitizing printed materials, processing invoices or receipts, and enabling searchable content from images.

The node sends the image URL and selected language to the OCR API, then polls until the text extraction task completes, returning the result status and a URL to the extracted text.

Properties

Name Meaning
Enter Image URL The URL of the image from which to extract text.
Language The language used in the image text. Options: Arabic, Chinese, Czech, Dutch, English, French, German, Hindi, Hungarian, Italian, Japanese, Korean, Polish, Portuguese, Russian, Spanish, Turkish.

Output

The node outputs a JSON object with the following structure:

{
  "taskid": "string",       // The unique identifier of the OCR task.
  "url": "string",          // A URL pointing to the extracted text result (empty if failed).
  "status": "string"        // Status of the OCR task: "completed" or "failed".
}
  • If the OCR process succeeds, status is "completed" and url contains the link to the extracted text.
  • If it fails, status is "failed" and url is empty.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authentication with the external OCR service.
  • Uses an external OCR API endpoint at https://api.wiro.ai/v1/Run/wiro/easy_ocr.
  • The node internally uses helper functions to generate authentication headers and poll the OCR task status until completion.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will prevent successful requests.
    • Providing an invalid or inaccessible image URL may cause the OCR task to fail.
    • Selecting an unsupported language or incorrect language code might reduce accuracy or cause errors.
    • Network issues can interrupt communication with the OCR API.
  • Error messages:

    • If the API response lacks a valid task ID or socket access token, the node throws an error indicating the failure to start the OCR task. To resolve, verify that the API credentials are correct and the image URL is accessible.
    • Task polling may return failure statuses (-1, -2, -3, -4), resulting in a "failed" status output. Check the input parameters and retry.

Links and References

Discussion