MinerU OCR Local API for Openclaw

A high-performance document parsing skill that converts complex PDFs and images into layout-aware Markdown using the MinerU engine.

focusshang
v1.1.4
Mar 17, 2026
1
1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install mineru-ocr-local-api

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install mineru-ocr-local-api using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is MinerU OCR Local API?

The MinerU OCR Local API skill is a robust document processing bridge for AI agents. It enables seamless conversion of complex PDF documents and images into structured Markdown, specifically designed to handle difficult elements like multi-column layouts, mathematical formulas, and embedded tables. By integrating this into your Openclaw Skills collection, you grant your AI agents the ability to 'read' technical papers and business reports with high precision.

This skill offers a dual-mode architecture: a hosted API mode for cloud-based processing and a local mode for users who prefer the open-source MinerU runtime for data privacy or specialized local compute. Whether you are using a hosted service or a local installation from the opendatalab repository, this skill ensures that your coding agents receive clean, actionable text data and organized artifacts.

MinerU OCR Local API Use Cases

  • Parsing academic papers with complex mathematical formulas into clean Markdown for LLM analysis.
  • Automated extraction of data from multi-column technical manuals or business reports.
  • Processing local document batches without sending data to the cloud using the local MinerU runtime.
  • Converting image-based PDFs into searchable, structured text via layout-aware OCR.
  • Integrating high-fidelity document parsing into automated Openclaw Skills workflows.

How MinerU OCR Local API Works

  1. The skill receives a request containing either a local file path or a remote URL and determines the execution mode (API, Local, or Auto).
  2. For API mode, the script uploads the file to the MinerU service, initiates a parsing task, and polls for completion.
  3. For local mode, the skill invokes the local MinerU CLI or Python module to process the file directly on the host machine.
  4. Upon completion, the system extracts the full Markdown content and organizes secondary artifacts like images and JSON metadata.
  5. The skill saves the results into a structured directory and returns a JSON envelope containing the extracted text and file paths to the agent.

MinerU OCR Local API Setup

To use this within your Openclaw Skills environment, ensure you have Python installed and the necessary environment variables configured.

Installation

pip install httpx>=0.27

Configuration

For hosted API access, set your API token:

# Windows PowerShell
$env:MINERU_API_TOKEN="YOUR_MINERU_TOKEN"

# Linux/macOS
export MINERU_API_TOKEN="YOUR_MINERU_TOKEN"

For local processing, ensure MinerU is installed and point the skill to your local binary:

export MINERU_LOCAL_CMD="/path/to/mineru"

MinerU OCR Local API Data Schema & Taxonomy

The skill organizes output into a predictable structure, ensuring Openclaw Skills can easily locate extracted data:

Field Description
text The primary source of truth; contains the complete extracted Markdown.
artifacts.full_md_path Absolute path to the generated .md file.
artifacts.local_parse_dir The directory containing images and intermediate files (Local mode).
artifacts.downloaded_zip The archive containing all results (API mode).
mode Indicates whether api or local was used for the execution.

MinerU OCR Local API Advanced Features

  • Smart Mode Selection: Automatically switches between API and local processing based on configuration and file location.
  • Formula Extraction: High-fidelity LaTeX extraction for mathematical content (can be disabled via flags).
  • Custom Device Support: Force local inference on CPU or specific backends for optimized performance.
  • Artifact Management: Automatic downloading and unzipping of remote API results into agent-accessible local directories.
  • Custom Language Hints: Improve OCR accuracy by providing specific language parameters to the MinerU engine.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*