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": "\n\n模型体验\n\n文本模型\n\n多模态模型\n\n音视频互动\n\n智能体\n\nGLM-4.1V-Thinking上线视觉推理,同尺寸最强\n\n\n\n\n\n帮助中心\n\n技术社群\n\n\n\n## 欢迎体验智谱AI大模型!\n\n\n\n在这里,你可以快速测试大模型在业务场景上的效果,体验平台提供的各类大模型。\n\n## GLM-4-Plus\n\n## 高智能旗舰\n\n使用了大量模型辅助构造高质量合成数据以提升模型性能,利用 PPO有效提升模型推理的表现。在各项性能指标上,GLM-4- Plus已达到与GPT-4o等第一梯队模型持平的水平。\n\n## @智谱\n\n\n\n\n\n\n\n## GLM-Z1-Air\n\n## 复杂推理\n\n智谱全自研32B参数GLM推理模型,性能媲美DeepSeek-R1,价格仅为其1/30。\n\n\n\n@智谱\n\n\n\n\n\n## 更多模型 >\n\n## GLM-4-Flash\n\n## 响应快速且免费\n\n一款免费且好用的语言模型,适用于处理简单任务,例如,智能问答、摘要生成和文本数据处理等多种应用场景。\n\n@智谱\n\n\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
modelrequiredstringModel code: glm-ocrfilerequiredstringImage or PDF document to be recognized, supports URL and base64. Supported image formats: PDF, JPG, PNG. Single image ≤10MB, PDF ≤50MB, maximum support 30 pagesreturn_crop_imagesbooleanWhether to return screenshot informationneed_layout_visualizationbooleanWhether to return detailed layout image result informationstart_page_idintegerStart page number for parsing when PDF is providedend_page_idintegerEnd page number for parsing when PDF is providedrequest_idstringPassed by the user side, needs to be unique; used to distinguish each request, 6–64 characters. If not provided by the user side, the platform will generate one by default.user_idstringUnique ID for the end user, 6–128 characters. Avoid using sensitive information.Response types
idTask IDstringcreatedRequest creation time, Unix timestamp in secondsintegermodelModel namestringmd_resultsRecognition result in Markdown formatstringlayout_visualization[]stringrequest_idRequest IDstringMore from Z.ai
- Web page readerPOST/api/paas/v4/reader$0.0109 per callFixed
- Agent taskPOST/api/v1/agentsFrom $0.763 per 1M tokens · varies by agentResponse-based · up to $1.09
- Chat completionPOST/api/paas/v4/chat/completionsFrom $0.0327 per 1M tokens · varies by modelResponse-based · up to $2.228749
- Async image generationPOST/api/paas/v4/async/images/generations$0.01635 per callFixed
- Web searchPOST/api/paas/v4/web_search$0.0109 per callFixed
- Image/video job resultGET/api/paas/v4/async-result/{id}Free
- Token countPOST/api/paas/v4/tokenizer$0.000109 per callFixed
- Video generationPOST/api/paas/v4/videos/generations$0.218 per callFixed
- Agent job resultPOST/api/v1/agents/async-resultFree
- Speech to textPOST/api/paas/v4/audio/transcriptions$0.001308 per callFixed
- Slides conversation exportPOST/api/v1/agents/conversationFree
- Image generationPOST/api/paas/v4/images/generations$0.01635 per callFixed