---
title: "L017 Layout-only Parsing (No OCR)"
method: POST
path: "/rd-llm/v1/documents/layout_parsing"
tags: ["Others"]
---

# L017 Layout-only Parsing (No OCR)

`POST /rd-llm/v1/documents/layout_parsing`

## Request

- Base URL: `https://connect.patsnap.com`
- URL: `https://connect.patsnap.com/rd-llm/v1/documents/layout_parsing`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/docs/rd-llm/v1/documents/layout_parsing/post.ts> (a function with typed inputs; its response is checked against the schema)

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 body `multipart/form-data`

- L017DocumentsLayoutParsingRequest
  - `file` string, required: File to analyze for layout.

## Response `200`

Successful l017 layout-only parsing (no ocr) response.

- L017DocumentsLayoutParsingResponse
  - `data` L017DocumentsLayoutParsingLayoutParseResponse, required
    - `state` string, required: Execution state; success indicates that parsing completed successfully.
    - `results` L017DocumentsLayoutParsingLayoutResultItem[], required: Layout detection results; markdown is not returned.
      - `url` string, uri: Cropped-region URL. Null when include_crop_urls=false; when true, URLs are primarily provided for chemical structures and figures.
      - `bbox` unknown[], required: Normalized coordinates [x1, y1, x2, y2, confidence].
        - unknown
      - `page` integer, required: Zero-based page index.
      - `type` string, required: Original region type produced by the layout model.
      - `content` string: Always null because layout-only mode does not run OCR.
    - `file_type` string, required: Input file type inferred from the uploaded filename extension.
    - `total_pages` integer, required: Total pages; always 1 for an image.
  - `status` string, required: The request completed successfully.
  - `error_msg` string, required: Always success on success.
  - `error_code` integer, required: Always 0 on success.

## Other responses

- `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.

---

[API](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api.md) - [All operations](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/revisions/c2264a0de595?raw)
