Loading...
Loading...
Compare original and translation side by side
| Resource | Link |
|---|---|
| Get API Key | 智谱开放平台 API Keys |
| API Docs | Layout Parsing / 版面解析 |
| 资源 | 链接 |
|---|---|
| 获取API Key | 智谱开放平台 API Keys |
| API文档 | 版面解析 |
ZHIPU_API_KEYZHIPU_API_KEYopenclaw.jsonenv.vars{
"env": {
"vars": {
"ZHIPU_API_KEY": "你的密钥"
}
}
}openclaw.json{
"skills": {
"entries": {
"glmocr-handwriting": {
"env": {
"ZHIPU_API_KEY": "你的密钥"
}
}
}
}
}~/.zshrcexport ZHIPU_API_KEY="你的密钥"💡 如果你已为其他智谱 skill(如、glmocr、glmv-caption)配置过 key,它们共享同一个glm-image-generation,无需重复配置。ZHIPU_API_KEY
ZHIPU_API_KEYZHIPU_API_KEYopenclaw.jsonenv.vars{
"env": {
"vars": {
"ZHIPU_API_KEY": "你的密钥"
}
}
}openclaw.json{
"skills": {
"entries": {
"glmocr-handwriting": {
"env": {
"ZHIPU_API_KEY": "你的密钥"
}
}
}
}
}~/.zshrcexport ZHIPU_API_KEY="你的密钥"💡 如果你已为其他智谱skill(如、glmocr、glmv-caption)配置过key,它们共享同一个glm-image-generation,无需重复配置。ZHIPU_API_KEY
ZHIPU_API_KEYGLM_OCR_TIMEOUThttps://open.bigmodel.cn/api/paas/v4/layout_parsing--include-rawpython scripts/glm_ocr_cli.pyZHIPU_API_KEYGLM_OCR_TIMEOUThttps://open.bigmodel.cn/api/paas/v4/layout_parsing--include-rawpython scripts/glm_ocr_cli.pytext--include-rawtext--include-rawpython scripts/glm_ocr_cli.py --file-url "https://example.com/handwriting.jpg"python scripts/glm_ocr_cli.py --file-url "https://example.com/handwriting.jpg"python scripts/glm_ocr_cli.py --file /path/to/notes.pngpython scripts/glm_ocr_cli.py --file /path/to/notes.pngpython scripts/glm_ocr_cli.py --file notes.png --output result.json --prettypython scripts/glm_ocr_cli.py --file notes.png --output result.json --prettypython scripts/glm_ocr_cli.py --file notes.png --output result.json --include-rawpython scripts/glm_ocr_cli.py --file notes.png --output result.json --include-rawpython {baseDir}/scripts/glm_ocr_cli.py (--file-url URL | --file PATH) [--output FILE] [--pretty] [--include-raw]| Parameter | Required | Description |
|---|---|---|
| One of | URL to image/PDF |
| One of | Local file path to image/PDF |
| No | Save result JSON to file |
| No | Pretty-print JSON output |
| No | Include raw upstream API response in |
python {baseDir}/scripts/glm_ocr_cli.py (--file-url URL | --file PATH) [--output FILE] [--pretty] [--include-raw]| 参数 | 是否必填 | 说明 |
|---|---|---|
| 二选一 | 图片/PDF的URL地址 |
| 二选一 | 图片/PDF的本地文件路径 |
| 否 | 将结果JSON保存到文件 |
| 否 | 格式化JSON输出 |
| 否 | 在 |
{
"ok": true,
"text": "Recognized handwritten text in Markdown...",
"layout_details": [...],
"result": null,
"error": null,
"source": "/path/to/file",
"source_type": "file",
"raw_result_included": false
}oktextlayout_detailserror{
"ok": true,
"text": "Recognized handwritten text in Markdown...",
"layout_details": [...],
"result": null,
"error": null,
"source": "/path/to/file",
"source_type": "file",
"raw_result_included": false
}oktextlayout_detailserrorZHIPU_API_KEY not configured. Get your API key at: https://bigmodel.cn/usercenter/proj-mgmt/apikeysZHIPU_API_KEY not configured. Get your API key at: https://bigmodel.cn/usercenter/proj-mgmt/apikeys