Skip to main content
POST
document.parse-layout

Authorizations

Authorization
string
header
required

API key: sk_live_…

Headers

Idempotency-Key
string

Optional. A retry with the same key returns the stored result.

Maximum string length: 255
Pramaan-Max-Price-Micro
string

Optional. The most this request may be priced at, in micro-USD (a whole number above 0). It replaces the capability's own price ceiling for this request, lower or higher. Sources that could cost more are left out; when none is left the answer is 400 with the lowest limit that would work.

Pattern: ^[1-9]\d{0,14}$

Body

application/json
url
string

Public document URL; send exactly one of url, content or fileId.

content
string

Base64 document bytes, up to 10 MiB.

fileId
string

Id of an uploaded file holding the document, in place of a public link.

Pattern: ^file_[0-9A-HJKMNP-TV-Z]{26}$
extension
string

File extension for uploaded content; PDF by default.

Required string length: 1 - 8
Pattern: ^[a-z0-9]{1,8}$
formats
enum<string>[]

Output forms; JSON needs a schema or prompt.

Required array length: 1 - 7 elements

Requested document output form.

Available options:
markdown,
html,
rawHtml,
summary,
links,
images,
json
schema
object

Object schema for JSON output, up to 8,000 characters with local references only.

prompt
string

Extraction instructions for JSON output.

Required string length: 1 - 2000
pdfMode
enum<string>
default:auto

Read embedded text, fall back to optical character recognition, or always read scanned pages.

Available options:
auto,
fast,
ocr
maxPages
integer
default:100

PDF page cap; default 100, maximum 1,000.

Required range: 1 <= x <= 1000
includePages
boolean
default:true

Return Markdown for each physical PDF page.

includeBlocks
boolean
default:true

Return typed layout blocks with reported geometry.

pageMarkers
boolean
default:false

Mark page boundaries in the document Markdown.

onlyMainContent
boolean
default:true

Keep the main document content.

includeTags
string[]

Keep only these document parts.

Maximum array length: 20

CSS selector to keep.

Required string length: 1 - 2048
excludeTags
string[]

Omit these document parts.

Maximum array length: 20

CSS selector to omit.

Required string length: 1 - 2048
headers
object

At most 20 headers, sent once and never echoed.

checkPromptInjection
boolean
default:false

Scan content for attempts to change extraction instructions; adds up to four credits.

redactPersonalData
default:false

Redact personal details in Markdown; this does not guarantee redaction of other formats.

zeroDataRetention
boolean
default:false

Require no retained processing data; needs an enabled account feature.

cacheMaxAgeMs
integer

Maximum cache age for a remote URL; unavailable for uploads.

Required range: 0 <= x <= 604800000
cacheOnlyMinAgeMs
integer

Read only a cached remote document, never fetch fresh content; unavailable for uploads.

Required range: 1 <= x <= 604800000
maxOutputCharacters
integer
default:100000

Combined document text limit; default 100,000, maximum 500,000 characters.

Required range: 1000 <= x <= 500000

Response

Job started; poll GET /v1/jobs/{id}

job_id
string
required
status
enum<string>
required
Available options:
running
held_micro
integer
required

The credit set aside for the job (its estimate), micro-USD; 0 when it takes none. Not a price: what the job is charged reads on GET /v1/jobs/{id} once it is settled.