Document OCR parsing

POST/api/paas/v4/layout_parsing

Published by Z.aiPublisher docs
curl -X POST https://api.orthogonal.com/v1/run \
-H 'Authorization: Bearer orth_live_••••' \
-H 'Content-Type: application/json' \
-d '{
"api": "zai",
"path": "/api/paas/v4/layout_parsing",
"method": "POST",
"body": {
"model": "",
"file": "",
"return_crop_images": ,
"need_layout_visualization":
}
}'
{
"success": true,
"data": {
"id": "20261121070515aee1868f402b40fb",
"model": "glm-ocr",
"usage": { … },
"created": 1795215919,
"data_info": { … },
"md_results": "![](page=0,bbox=[31, 50, 71, 86])\n\n模型体验\n\n文本模型\n\n多模态模型\n\n音视频互动\n\n智能体\n\nGLM-4.1V-Thinking上线视觉推理,同尺寸最强\n\n![](page=0,bbox=[142, 1210, 257, 1239])\n\n![](page=0,bbox=[34, 1333, 72, 1369])\n\n帮助中心\n\n技术社群\n\n![](page=0,bbox=[31, 1404, 72, 1438])\n\n## 欢迎体验智谱AI大模型!\n\n![](page=0,bbox=[476, 587, 572, 698])\n\n在这里,你可以快速测试大模型在业务场景上的效果,体验平台提供的各类大模型。\n\n## GLM-4-Plus\n\n## 高智能旗舰\n\n使用了大量模型辅助构造高质量合成数据以提升模型性能,利用 PPO有效提升模型推理的表现。在各项性能指标上,GLM-4- Plus已达到与GPT-4o等第一梯队模型持平的水平。\n\n## @智谱\n\n![](page=0,bbox=[1161, 595, 1200, 632])\n\n![](page=0,bbox=[1146, 880, 1188, 916])\n\n![](page=0,bbox=[1294, 589, 1391, 697])\n\n## GLM-Z1-Air\n\n## 复杂推理\n\n智谱全自研32B参数GLM推理模型,性能媲美DeepSeek-R1,价格仅为其1/30。\n\n![](page=0,bbox=[1977, 594, 2020, 634])\n\n@智谱\n\n![](page=0,bbox=[1967, 880, 2007, 916])\n\n![](page=0,bbox=[2111, 587, 2215, 698])\n\n## 更多模型 >\n\n## GLM-4-Flash\n\n## 响应快速且免费\n\n一款免费且好用的语言模型,适用于处理简单任务,例如,智能问答、摘要生成和文本数据处理等多种应用场景。\n\n@智谱\n\n![](page=0,bbox=[2788, 882, 2825, 915])\n\n向我发指令,我可以完成对话聊天、创作文章、生成代码等多种任务",
"request_id": "20261121070515aee1868f402b40fb",
"layout_details": [ 1 item ],
"layout_visualization": []
}
}
A real response, recorded when Orthogonal checked this endpoint.

The final charge depends on what comes back. It shows after Run.

$0.0327per 1M tokens

Response-basedYou pay for the prompt and completion tokens the call uses, read from the response, never more than $0.00981 per call.

You aren't charged for failed calls. A wallet payment for a failed call is refunded.

About this endpoint

Use the [GLM-OCR](/guides/vlm/glm-ocr) model to parse the layout of documents and images and extract text content. Support OCR recognition of images and PDF documents, returning detailed layout information and visualization results.

Body parameters

Response types

More from Z.ai

  1. Web page readerPOST/api/paas/v4/reader$0.0109 per callFixed
  2. Agent taskPOST/api/v1/agentsFrom $0.763 per 1M tokens · varies by agentResponse-based · up to $1.09
  3. Chat completionPOST/api/paas/v4/chat/completionsFrom $0.0327 per 1M tokens · varies by modelResponse-based · up to $2.228749
  4. Async image generationPOST/api/paas/v4/async/images/generations$0.01635 per callFixed
  5. Web searchPOST/api/paas/v4/web_search$0.0109 per callFixed
  6. Image/video job resultGET/api/paas/v4/async-result/{id}Free
  7. Token countPOST/api/paas/v4/tokenizer$0.000109 per callFixed
  8. Video generationPOST/api/paas/v4/videos/generations$0.218 per callFixed
  9. Agent job resultPOST/api/v1/agents/async-resultFree
  10. Speech to textPOST/api/paas/v4/audio/transcriptions$0.001308 per callFixed
  11. Slides conversation exportPOST/api/v1/agents/conversationFree
  12. Image generationPOST/api/paas/v4/images/generations$0.01635 per callFixed
All 14 Z.ai endpoints