plemeo OCR icon

plemeo OCR

Process images with Plemeo OCR

Overview

This node integrates with the Plemeo OCR API to process images and extract text content using Optical Character Recognition (OCR). It is designed to send one or more images to the Plemeo OCR service and receive the recognized text data in response.

Common scenarios where this node is beneficial include:

  • Automating data extraction from scanned documents, receipts, invoices, or forms.
  • Digitizing printed or handwritten text for further processing or storage.
  • Integrating OCR capabilities into workflows that require text recognition from images.

For example, a user can upload multiple images of receipts, and the node will return the extracted text for each image, enabling automated expense tracking.

Properties

Name Meaning
API Hostname The hostname of the Plemeo OCR API server (e.g., tenant.plemeo.ai).
API Port The port number on which the Plemeo OCR API listens (default is 8000).
API Path The specific API endpoint path for OCR processing (default is /process_ocr).
API Key The API key used for authenticating requests to the Plemeo OCR API.
Use HTTP Boolean flag to use HTTP instead of HTTPS; useful if there are SSL certificate issues.
Images A collection of one or more images to process. Each image requires:
   Image Data The image data itself, which can be raw base64 or a data URI (PNG, JPG, or TIFF format).

Output

The node outputs an array of JSON objects, each corresponding to one input item processed. Each output object contains the parsed JSON response from the Plemeo OCR API, which includes the OCR results for the submitted images.

  • The exact structure of the JSON depends on the Plemeo OCR API response but typically includes recognized text and possibly metadata about the OCR process.
  • The node does not output binary data.

Example output snippet (conceptual):

{
  "json": {
    "results": [
      {
        "text": "Extracted text from image 1",
        "confidence": 0.98
      },
      {
        "text": "Extracted text from image 2",
        "confidence": 0.95
      }
    ]
  }
}

Dependencies

  • Requires access to the Plemeo OCR API endpoint specified by hostname, port, and path.
  • Needs a valid API key for authentication.
  • Uses either HTTPS or HTTP Node.js modules depending on configuration.
  • The node disables TLS certificate validation (rejectUnauthorized: false) internally, which may have security implications.

Troubleshooting

  • Missing Required Parameters: Errors will occur if the API Hostname, API Key, or at least one image is not provided. Ensure these fields are correctly filled.
  • SSL Certificate Issues: If you encounter SSL errors, try enabling the "Use HTTP" option to switch from HTTPS to HTTP.
  • API Request Failures: Network issues, incorrect hostname/port/path, or invalid API keys can cause request failures. Check logs for HTTP status codes and error messages.
  • Response Parsing Errors: If the API returns malformed JSON, the node will throw a parsing error. Verify the API endpoint and payload correctness.
  • Large Image Data: Sending very large images might cause performance issues or timeouts. Consider resizing or compressing images before sending.

Links and References

Discussion