[L017]Layout-only Parsing (No OCR)
Run layout detection only, without OCR. Every results.content value is null and markdown is not returned. Supported types: png, jpg, jpeg, pdf, doc, docx, ppt, pptx, xls, and xlsx. include_crop_urls is optional and defaults to true.
Request Parameters
List of parameters supported by this API endpoint
| Name | Type | Example | Description |
|---|---|---|---|
Required | file | maximum 20MB | File to analyze for layout. |
Response Schema
Structure of the API response data
| Field Name | Type | Example | Description |
|---|---|---|---|
dataRequired | object | Please check the form: LayoutParseResponse | Data payload for layout-only parsing. |
stateRequired | string | success | Execution state; success indicates that parsing completed successfully. |
resultsRequired | array | Please check the form: LayoutResultItem | Layout detection results; markdown is not returned. |
url | string<uri> | https://oss.example.com/doc/0_2.png?sign=... | Cropped-region URL. Null when include_crop_urls=false; when true, URLs are primarily provided for chemical structures and figures. |
bboxRequired | array | [
0.16,
0.18,
0.37,
0.2,
0.9
] | Normalized coordinates [x1, y1, x2, y2, confidence]. |
pageRequired | integer<int32> | - | Zero-based page index. |
typeRequired | string | figure | Original region type produced by the layout model. |
content | string | null | Always null because layout-only mode does not run OCR. |
file_typeRequired | string | png | Input file type inferred from the uploaded filename extension. |
total_pagesRequired | integer<int32> | 1 | Total pages; always 1 for an image. |
statusRequired | string | success | The request completed successfully. |
error_msgRequired | string | success | Always success on success. |
error_codeRequired | integer<int32> | - | Always 0 on success. |
Success Response Example
Example of a successful API response
JSON
{
"data": {
"state": "success",
"results": [
{
"url": "https://oss.example.com/doc/0_2.png?sign=...",
"bbox": [
0.16,
0.18,
0.37,
0.2,
0.9
],
"page": 0,
"type": "figure",
"content": "null"
}
],
"file_type": "png",
"total_pages": 1
},
"status": true,
"error_msg": "success",
"error_code": 0
}Error Codes
List of possible error codes returned by this endpoint
Business Errors
| Error Code | Description |
|---|---|
68300004 | Invalid parameter! |
68300005 | Search api failure! |
68300006 | Analytic basic access error! |
68300007 | Bad request! |
68300008 | Service error, please try again later! |
68300010 | The file does not comply with upload specifications! |
Platform Errors
| Error Code | Description |
|---|---|
67200000 | API call exceeds the total limit set by the platform! |
67200001 | API call exceeds the total limit set by the platform! |
67200002 | The current call rate is too fast, exceeding the current configuration limit QPS! |
67200003 | The key and secret parameters for applying for the token are incorrect or the client has been disabled! |
67200004 | The requested api does not have permission. Please contact our support personnel! |
67200005 | Insufficient account balance/number of calls! |
67200006 | The client has exceeded the activation validity period! |
67200007 | The current call exceeds the configured usage limit of the day! |
67200008 | Please check if the required apikey in the query parameter has been transmitted! |
67200009 | The apikey does not match the passed bearerToken. Please check if a valid token is being used! |
67200012 | The request is illegal! |
67200100 | The current server status is busy, request response timeout! |
67200101 | The API requested currently does not exist. Please check the request path! |
HTTP Status Codes
| Status Code | Description |
|---|---|
0 | Success |
400 | Invalid request, missing file, empty file, or unsupported file format |
413 | File exceeds 20 MB or the document exceeds 200 pages |
500 | Internal server error; error_code is INTERNAL_ERROR |
502 | Downstream processing failed; error_code may be OCR_FAILED, LAYOUT_DETECTION_FAILED, PDF_PARSE_FAILED, or DOCUMENT_CONVERSION_FAILED |
504 | Request processing exceeded 300 seconds; error_code is GATEWAY_TIMEOUT |
Performance Metrics
Expected performance characteristics for this endpoint
Normal Response Time
5000 ms
Max Response Time
10000 ms