mineru
使用 MinerU API 将 PDF/Word/PPT/图片解析为结构化 Markdown,公式保留为 LaTeX,表格保留结构,支持 OCR。适合论文解析、教材提取、扫描件文字识别等场景。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
使用 MinerU API 将 PDF/Word/PPT/图片解析为结构化 Markdown,公式保留为 LaTeX,表格保留结构,支持 OCR。适合论文解析、教材提取、扫描件文字识别等场景。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when writing a Chinese physics, optics, or electronics lab report from local experiment materials, generating a XeLaTeX source file, extracting data from images, inserting figures, answering thinking questions, and compiling a GB/T 7713.1 style PDF.
Use when:drafting, polishing, restructuring, translating, or formatting STEM academic writing such as physics, optics, electronics, computer science notes, abstracts, paper sections, literature summaries, or formal Chinese/English academic prose.
Use when: 需要将 Obsidian Excalidraw 文件(.excalidraw.md)导出为 PNG 或 SVG 图片。支持批量导出、嵌入图片自动注入、嵌入 MD 笔记渲染(含 KaTeX 数学公式)、配对语法为每个文件单独指定输出路径。关键词:excalidraw 导出、Obsidian 画图导出、excalidraw to png、excalidraw to svg。
Use when:packaging Obsidian homework notes by finding linked Excalidraw handwritten notes, exporting them to PNG, generating a watermarked XeLaTeX document, and compiling a PDF for examples, exercises, or chapter homework.
Use when:preparing for a physics, optics, or electronics experiment by reading local materials and generating an experiment interpretation document, an operation guide, and a blank XeLaTeX data-record PDF.
Use when: 需要用 LaTeX 写作、排版文档(含中文支持、公式、三线表、插图、章节格式)。涵盖常用宏包用法、表格防溢出、图表编号、XeLaTeX 编译与常见错误修复。关键词:LaTeX 排版、中文 LaTeX、XeLaTeX、三线表、数学公式、插图、编译报错。
| name | mineru |
| description | 使用 MinerU API 将 PDF/Word/PPT/图片解析为结构化 Markdown,公式保留为 LaTeX,表格保留结构,支持 OCR。适合论文解析、教材提取、扫描件文字识别等场景。 |
通过 MinerU API(v4)将文档解析为 Markdown。调用前确认环境变量 MINERU_TOKEN 已设置。
| 类型 | 格式 |
|---|---|
| 论文、书籍、扫描件 | |
| Word | .docx |
| PPT | .pptx |
| 图片 | .jpg、.png(OCR) |
# Windows(PowerShell)
echo $env:MINERU_TOKEN
# 若为空,设置 Token
$env:MINERU_TOKEN = "your_api_key_here"
# Linux/macOS
echo $MINERU_TOKEN
export MINERU_TOKEN="your_api_key_here"
curl -X POST "https://mineru.net/api/v4/extract/task" \
-H "Authorization: Bearer $MINERU_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "<文件URL>",
"enable_formula": true,
"enable_table": true,
"layout_model": "doclayout_yolo",
"language": "auto"
}'
# 返回 task_id
参数选择指南:
| 场景 | 推荐配置 |
|---|---|
| 英文论文(arXiv) | language: en, layout_model: doclayout_yolo |
| 中文论文/教材 | language: ch, layout_model: doclayout_yolo |
| 复杂表格/特殊版面 | model_version: vlm(较慢但更准确) |
| 快速预览 | model_version: pipeline(默认) |
curl "https://mineru.net/api/v4/extract/task/<task_id>" \
-H "Authorization: Bearer $MINERU_TOKEN"
# status: pending → running → done
重复调用直到 "status": "done",然后从返回的 result.zip_url 下载。
# PowerShell
Invoke-WebRequest -Uri "<zip_url>" -OutFile "result.zip"
Expand-Archive -Path "result.zip" -DestinationPath "./output"
# bash
curl -o result.zip "<zip_url>"
unzip result.zip -d ./output
解压后结构:
output/
├── full.md # 完整 Markdown(主要使用此文件)
├── content_list.json # 结构化内容列表
├── images/ # 提取的图片
└── layout.json # 版面分析结果
# 1. 获取预签名上传 URL
curl -X POST "https://mineru.net/api/v4/file-urls/batch" \
-H "Authorization: Bearer $MINERU_TOKEN" \
-H "Content-Type: application/json" \
-d '{"file_names": ["paper1.pdf", "paper2.pdf"]}'
# 2. 将文件 PUT 到返回的 presigned URL
# 3. 批量提交
curl -X POST "https://mineru.net/api/v4/extract/task/batch" \
-H "Authorization: Bearer $MINERU_TOKEN" \
-H "Content-Type: application/json" \
-d '{"files": [{"url": "...", "name": "paper1.pdf"}, ...]}'
| 项目 | 限制 |
|---|---|
| 单文件大小 | 200 MB |
| 单文件页数 | 600 页 |