GET
Get file layout
Request · Response · Guide: Read and parse
The path fileId is the document id returned by the files API. For a document split from a larger upload, the response contains only that document’s pages, renumbered from 1. Element ids retain their whole-file page identity.Bounding boxes are normalized [x0, y0, x1, y1] coordinates with the origin at the top-left of the displayed page. Rotation has already been applied.
Layout is available only for files processed with the Capybara (Experimental) OCR model. Any other file returns 404 File not found, even when the fileId is correct. See Experimental model.

Authorizations

x-api-key
string
header
required

API key for authentication

Path Parameters

fileId
string
required

The document's fileId, from the upload's files[] or GET /v1/files. For a file split into several documents, use the id of one document.

Response

The layout. pages and elements are filled only when status is ready.

status
enum<string>
required

Layout state. pages and elements are filled only when this is ready; poll again while it is pending.

Available options:
ready,
pending,
failed,
skipped,
unavailable
schema_version
string
required

Version of this response shape.

Example:

"layout/1"

page_count
integer | null
required

Number of pages in this document, or null when not known yet.

source
object | null
required

Processing run the layout came from, or null.

conventions
object
required

How to read the coordinates in this response.

error
string | null
required

Why the layout is not available, or null.

pages
object[]
required

One entry per page.

elements
object[]
required

Text blocks, tables and other elements on the pages.