Mineru Custom Service icon

Mineru Custom Service

Use the Mineru API to customize the parsing of PDF documents, supporting local file path input.

Mineru Custom Service

AI-generated

Overview

This node integrates with the Mineru API to parse documents from a given file URL. It supports multiple file formats including PDF, DOC, DOCX, PPT, PPTX, PNG, JPG, and JPEG. Users can select between two API versions (v1 and v2) and configure various parsing options such as parsing method, language, backend engine, and output preferences. The node downloads the file from the specified URL, sends it to the Mineru API for processing, and returns the parsed results along with metadata about the request and file.

Use Case Examples

  1. Parsing a PDF document to extract text and layout information using Mineru API v1.
  2. Using Mineru API v2 to parse a DOCX file with OCR method and enabling formula and table recognition.
  3. Extracting images and content list from a PPTX file with custom output directory and backend engine selection.

Properties

Name Meaning
API Version Selects the Mineru API version to use for parsing (v1 or v2).
File URL The URL address of the file to be parsed. Supports PDF, DOC, DOCX, PPT, PPTX, PNG, JPG, and JPEG formats.
API Server Address The Mineru API server address to which the file will be sent for parsing.
Output Directory Directory path where the analysis results will be saved.
Analysis Method Parsing method to use (Automatic, OCR, or TXT). Only shown for API version v1.
Whether To Generate JSON And MD Files Whether to write parsed data to JSON and Markdown files. Only shown for API version v1.
Return Layout Information Whether to return parsed PDF layout information. Only shown for API version v1.
Return Document Information Whether to return parsed PDF document information. Only shown for API version v1.
Return Content List Whether to return parsed PDF content list. Only shown for API version v1.
Return Image Whether to return extracted images. Only shown for API version v1.
Document Language Document language setting (Chinese, English, or Automatic). Only shown for API version v2.
Backend Engine Select the backend engine to process the document. Only shown for API version v2.
Parsing Method Select parsing method (Automatic, OCR, or TXT). Only shown for API version v2.
Enable Formula Recognition Whether to enable formula recognition functionality. Only shown for API version v2.
Enable Table Recognition Whether to enable table recognition functionality. Only shown for API version v2.
Return Markdown Whether to return Markdown format results. Only shown for API version v2.
Return Middle JSON Whether to return intermediate processing JSON data. Only shown for API version v2.
Return Model Output Whether to return model raw output. Only shown for API version v2.
Return Content List Whether to return content list. Only shown for API version v2.
Return Image Whether to return extracted images. Only shown for API version v2.
Start Page ID Start page ID of the analysis (starting from 0). Only shown for API version v2.
End Page ID End page number of the analysis. Only shown for API version v2.

Output

JSON

  • apiVersion - The Mineru API version used for the request.
  • fileUrl - The URL of the file that was parsed.
  • fileName - The name of the file extracted from the URL or content disposition.
  • fileSize - The size of the downloaded file in bytes.
  • serverUrl - The Mineru API server address used for the request.
  • requestParams - The parameters sent to the Mineru API for parsing.
  • response - The parsed response data returned from the Mineru API.
  • timestamp - The ISO timestamp when the request was made.

Dependencies

  • Requires access to the Mineru API server specified by the user.
  • Needs internet access to download the file from the provided URL.
  • Uses an HTTP request helper to send files and parameters to the Mineru API.

Troubleshooting

  • Error: 'File URL cannot be empty' - Ensure the 'File URL' parameter is provided and not empty.
  • Error: 'API server address cannot be empty' - Ensure the 'API Server Address' parameter is provided and valid.
  • Error: 'Failed to download file' - Check the file URL is correct, accessible, and the server hosting the file is reachable.
  • Error: 'File is empty or cannot be downloaded' - Verify the file exists at the URL and is not empty.
  • Timeout errors - The node has a timeout of 1 hour for downloading and processing; ensure the server and file are responsive within this time.

Discussion