mineru
Skill8 starsChanged 8 months agoMITView on GitHub
MinerU document parsing API - convert PDF/DOC/PPT/images to Markdown/JSON. Supports OCR, formula recognition, table extraction, and batch processing.
- Installs packages
- Sends data out
6 other projects use a version of this.
Adopted by
Most recently taken up by
- opendatalab/MinerUtheir own version, first seen Oct 8, 2026
- Nebutra/MinerU-Skilltheir own version, first seen Sep 24, 2026
- 2867203296/hermes-agenttheir own version, first seen Aug 19, 2026
- xjsongphy/skillstheir own version, first seen Aug 17, 2026
- walkingjohnny/ai-workbenchtheir own version, first seen May 5, 2026
- liangdabiao/fetch-everythingtheir own version, first seen Mar 30, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- opendatalab/MinerU★ 83ksame name
- Nebutra/MinerU-Skill★ 119same name
- liangdabiao/fetch-everything★ 47same name
- xjsongphy/skills★ 7same name
- walkingjohnny/ai-workbench★ 1same name
- 2867203296/hermes-agent★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- grimoireSkill
- grimoire-manageSkill
- kedou-media-workflowSkill
- mineru-localSkill
- youtube-clipperSkill
The file
Files
MinerU API Skill
Overview
MinerU converts PDF, DOC, DOCX, PPT, PPTX, PNG, JPG, JPEG, HTML into machine-readable Markdown/JSON. Supports OCR (109 languages), formula/table recognition, cross-page table merging, and batch processing.
Two modes:
- Cloud API —
https://mineru.net/api/v4(no GPU required, token-based) - Local API —
mineru-api --port 8000(self-hosted, requires GPU or CPU backend)
Authentication (Cloud API)
- Token file:
~/.config/mineru/token - Header:
Authorization: Bearer <token> - Get token: https://mineru.net/apiManage/token
mkdir -p ~/.config/mineru
echo "YOUR_TOKEN" > ~/.config/mineru/token
chmod 600 ~/.config/mineru/tokenLimits (Cloud API)
| Item | Limit |
| Single file size | 200MB max |
| Single file pages | 600 pages max |
| Daily priority pages | 2000 pages/account |
| Batch upload | 200 files/request |
| Token validity | 90 days |
Model Versions
| Model | Use Case | Speed | Notes |
hybrid | Default since v2.7.0 — best of pipeline + vlm | Medium | Recommended for most use |
pipeline | General documents, CPU-friendly | Fast | Pure CPU support |
vlm | Complex layouts, higher accuracy | Slower | Needs GPU (10GB+ VRAM) |
MinerU-HTML | HTML output, preserves formatting | Medium | For web content |
API Endpoints (Cloud)
Base URL: https://mineru.net/api/v4
1. Create Extraction Task (Single File)
POST /extract/task| Param | Type | Required | Default | Description |
| url | string | yes | - | File URL (no direct upload) |
| model_version | string | no | hybrid | hybrid / pipeline / vlm / MinerU-HTML |
| is_ocr | bool | no | false | Enable OCR |
| enable_formula | bool | no | true | Formula recognition |
| enable_table | bool | no | true | Table recognition |
| language | string | no | ch | Document language |
| data_id | string | no | - | Custom identifier |
| page_ranges | string | no | - | e.g. "2,4-6" |
| callback | string | no | - | Callback URL for async results |
| extra_formats | array | no | - | ["docx"], ["html"], ["latex"] |
Response:
{"code": 0, "data": {"task_id": "xxx"}, "msg": "ok"}2. Get Task Results
GET /extract/task/{task_id}States: pending → running → done / failed / converting
Done response: includes full_zip_url (download link)
3. Batch Upload Local Files
POST /file-urls/batchReturns presigned upload URLs (valid 24h). System auto-submits extraction after upload.
4. Batch URL Extraction
POST /extract/task/batchSubmit multiple URLs at once, returns batch_id.
5. Batch Results
GET /extract-results/batch/{batch_id}Local API (Self-Hosted)
Start Server
# FastAPI server
mineru-api --host 0.0.0.0 --port 8000
# Gradio WebUI
mineru-gradio --server-name 0.0.0.0 --server-port 7860
# OpenAI-compatible server (for remote VLM inference)
mineru-openai-server --port 30000Environment Variables
| Variable | Description | Default |
MINERU_MODEL_SOURCE | Model source: modelscope / huggingface | huggingface |
MINERU_API_MAX_CONCURRENT_REQUESTS | Max concurrent API requests | Unlimited |
MINERU_API_ENABLE_FASTAPI_DOCS | Enable /docs page | true |
Local API Docs
Access at http://127.0.0.1:8000/docs after starting.
Use CLI with Remote Server
mineru -p input.pdf -o output/ -b hybrid-http-client -u http://server:30000Error Codes
| Code | Issue | Fix |
| A0202 | Token invalid | Check Bearer prefix and token |
| A0211 | Token expired | Recreate at mineru.net |
| -60002 | Unrecognized format | Check file extension |
| -60005 | File too large | Max 200MB |
| -60006 | Too many pages | Max 600, split document |
| -60008 | URL timeout | Check URL accessibility |
| -60012 | Task not found | Verify task_id |
Helper Script
~/.claude/skills/mineru/scripts/mineru-parse.sh — full-featured CLI wrapper.
# URL mode
mineru-parse.sh https://example.com/doc.pdf
# Local file with options
mineru-parse.sh /path/to/file.pdf --model vlm --ocr --output /tmp/result
# Extra formats
mineru-parse.sh doc.pdf --format docx --format latex
# Page ranges
mineru-parse.sh doc.pdf --pages "1-5,8" --output ./results
# Auto-extract markdown from zip
mineru-parse.sh doc.pdf --output ./results --extractQuick Parse (Python)
import requests, time
TOKEN = open("~/.config/mineru/token").read().strip()
BASE = "https://mineru.net/api/v4"
HEADERS = {"Authorization": f"Bearer {TOKEN}"}
def parse_document(url, model="hybrid", ocr=False, extra_formats=None):
"""Parse a document from URL, return download link."""
body = {
"url": url, "model_version": model,
"is_ocr": ocr, "enable_formula": True, "enable_table": True,
}
if extra_formats:
body["extra_formats"] = extra_formats
resp = requests.post(f"{BASE}/extract/task", headers=HEADERS, json=body)
task_id = resp.json()["data"]["task_id"]
while True:
result = requests.get(f"{BASE}/extract/task/{task_id}", headers=HEADERS).json()
state = result["data"]["state"]
if state == "done":
return result["data"]["full_zip_url"]
elif state == "failed":
raise Exception(f"Task failed: {result}")
time.sleep(5)Quick Parse (curl)
TOKEN=$(cat ~/.config/mineru/token)
# Submit
curl -s -X POST "https://mineru.net/api/v4/extract/task" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/doc.pdf","model_version":"hybrid"}'
# Check result
curl -s "https://mineru.net/api/v4/extract/task/{task_id}" \
-H "Authorization: Bearer $TOKEN"Installation (Local Mode)
pip install uv
uv pip install -U "mineru[all]"Requirements: Python 3.10-3.13, 16GB+ RAM, 20GB+ SSD. GPU optional (Volta+ or Apple Silicon).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

