Layout Parsing
Use the 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.
post/paas/v4/layout_parsing
Request body
Example request
{
"model": "glm-ocr",
"file": "https://cdn.bigmodel.cn/static/logo/introduction.png"
}Response
Business processing successful
Example response
{
"id": "task_123456789",
"created": 1727156815,
"model": "GLM-OCR",
"md_results": "# Doc title\nThis is the document content...",
"layout_details": [
[
{
"index": 1,
"label": "text",
"bbox_2d": [
0.1,
0.1,
0.5,
0.3
],
"content": "This is the content of the element",
"height": 800,
"width": 600
}
]
],
"data_info": {
"num_pages": 5,
"pages": [
{
"width": 600,
"height": 800
}
]
},
"request_id": "req_123456789"
}