使用 MinerU API 解析 PDF 文件(会将你指定的文件上传到 https://mineru.net 进行解析)。
基于 MinerU 提供 PDF 解析能力。
使用本技能即表示:
MINERU_TOKEN)pip install requests
访问 https://mineru.net/ 注册并获取 API Token。
Windows (PowerShell):
$env:MINERU_TOKEN = "your-token-here"
macOS / Linux:
export MINERU_TOKEN=your-token-here
| 引擎 | 说明 |
|---|---|
| vlm | VLM 引擎(默认) |
| pipeline | 管道引擎 |
| MinerU-HTML | HTML 输出 |
# 解析 PDF (默认 vlm 引擎)
python scripts/mineru_api.py -f <pdf路径> --wait
# 指定引擎
python scripts/mineru_api.py -f <pdf路径> --engine pipeline --wait
| 参数 | 说明 | 默认值 |
|---|---|---|
| -f, --files | 本地 PDF 文件 | - |
| --engine | 解析引擎 | vlm |
| --lang | 语言 (ch/en/ja/ko) | ch |
| --wait | 等待解析完成 | 否 |
| 变量 | 必填 | 说明 |
|---|---|---|
| MINERU_TOKEN | 是 | MinerU API Token |
解析结果保存在 ~/.openclaw/MinerU_Results/ 目录下。
MINERU_TOKEN 环境变量ZIP package — ready to use