?wait_seconds=N
to block up to N seconds (max 300) for the result inline.
wait_seconds is a query parameter, not a request body field.
Idempotency-Key is an HTTP header, not a request body field. Strict request
models refuse extra body fields.
Source types
The five job-creating operations (parse, split, classify, extract, ground) accept the shared document source union. Schema validation is synchronous and validates a schema structure only — it does not accept a document source.
Parse
wait_seconds(optional, default 0, max 300) — Block up to N seconds for the result inline. 0 returns 202 immediately.
Idempotency-Key(optional, max 200 chars) — Replaying with the same key returns the original job.
source(required) — Document source discriminator.page_ranges(optional) — One or more 1-indexed inclusive page ranges. Omit to parse all pages.password(optional) — PDF user/owner password for encrypted uploads/URLs. Write-only: never stored in the job payload or returned in any response. Rejected withparse_resultsources. Ignored when the PDF is not encrypted. Non-PDF sources with a password fail withinvalid_request.output.formats(optional, default["markdown", "blocks"]) — One or more of"markdown","text","blocks".output.table_format(optional, default"html") — Render tables as"html"or GitHub-flavored"markdown".output.include_images(optional, defaultfalse) — Include extracted figure crops in the parsed output. Works for PDF and image uploads (png/jpg/jpeg/webp).output.include_page_markers(optional, defaulttrue) — Insert--- Page N ---headers between PDF pages in markdown and text. Page chunking still uses these headers internally when this is false.figures.mode(optional, default"include") —"omit","include", or"describe". Describe captions figure blocks (PDF and image). Independent ofdiagrams.mode.diagrams.mode(optional, default"omit") —"omit"or"mermaid". When omit, flowchart mermaid is stripped and node/edge labels are flattened into overlay text. When mermaid, fences stay andfigures.mode=describestill appends aFigure:caption.chunking.strategy(optional, default"none") —"none","page", or"section". Generated chunks are returned indocument.chunks.
source.type is parse_result, page selection and
output.include_images are not supported because NDI reuses the prior Parse
result instead of reading the original document again.
Example (wait for result):
file_name— Name of the parsed file.document.page_count— Total pages in the document.document.markdown— Present when"markdown"was inoutput.formats.document.text— Present when"text"was inoutput.formats.document.blocks— Present when"blocks"was inoutput.formats; list of structural blocks.document.chunks— RAG-oriented chunks produced by the selectedchunking.strategy; empty for"none".ocr_applied— Whether OCR ran.units— Processing units consumed (for billing).
Split
wait_seconds(optional, default 0, max 300)
Idempotency-Key(optional)
source(required) — One upload, URL, workspace-file, or supported Parse-result source.classes(required) — Target segment categories with stableidvalues and optionalsubclasses. Spreadsheet worksheets are classified against the same two-level leaf classes and can return more than one match.unknown_policy(optional, default"include") — Whether unclassified pages or worksheet segments are included, forced, or rejected.overlap_policy(optional, default"exclusive") — How adjacent candidate ranges are reconciled."shared_boundary_page"is reserved for a future runtime.output.include_content(optional, defaultfalse) — Include segment content in the result.output.materialize_files(optional, defaultfalse) — Materialize document segments as child artifacts. Spreadsheet segments always materialize as single-sheet.xlsxartifacts regardless of this option.
page_ranges is not supported for spreadsheet sources. Spreadsheet sheet
position is represented as start_page == end_page == sheet_index + 1.
Result:
segments— Ordered page-range segments for the document.class— The selected class for the segment, ornullfor unclassified segments.classes— Multi-class set for spreadsheet worksheet segments. Document/PDF segments keep the singularclassfield and returnnullhere.start_page/end_page— Inclusive 1-indexed page range.sheet_name— Worksheet name for spreadsheet segments;nullfor document segments.classification_confidence— Confidence band and optional calibrated score for the selected class.boundary_confidence— Confidence band and optional calibrated score for the segment boundaries.artifacts— Materialized child files when requested for documents; always one single-sheet.xlsxfor spreadsheet segments.warnings— Non-fatal notes about the segment.
Classify
granularity: "document"
for one document-level label unit, or granularity: "page" for one label unit per
page. page_ranges restricts which pages are parsed and classified.
Query parameters:
wait_seconds(optional, default 0, max 300)
Idempotency-Key(optional)
source(required) — One upload, URL, or workspace-file source.parse_resultreuse is intentionally rejected for Classify.classes(required) — One or more classes with stableid, humanlabel, optionaldescription, optionalcriteria, and optionalsubclasses.granularity(optional, default"document") —"document"or"page".page_ranges(optional) — One-based inclusive page ranges. Valid for paged document sources.unknown_policy(optional, default"allow") —"allow"returns an unknown unit with its detectedOther / …label;"force_best"requires the classifier to select the best configured class.output.max_alternatives(optional, default3) — Maximum ranked labels per unit.output.include_reason(optional, defaulttrue) — Include model reasons in labels.
units— One document unit or one unit per page, depending ongranularity.page_range— Page coverage for the unit, ornullwhen not available.unknown—truewhen no provided class was selected. The detected freeform type remains inlabelsunder classother.labels— Ranked class assignments with their reason and coverage-derived confidence. Confidence is the fraction of the unit’s pages or sheets assigned that label, not a calibrated model probability.
Extract
schema_id
or schema must be present.
Query parameters:
wait_seconds(optional, default 0, max 300)
Idempotency-Key(optional)
source(required) — Document source.schema_id(optional) — A registered schema identifier from/v1/extraction-schemas. Mutually exclusive withschema.schema_version(optional, ≥ 1) — Pin a registry version when usingschema_id. Omit to resolve the latest visible version.schema(optional) — Inline JSON Schema. Mutually exclusive withschema_id. Pre-validate withPOST /v1/extract/schema-validation.instructions(optional) — Additional guidance for finding values declared by the schema. Instructions cannot add undeclared result fields.page_ranges(optional) — One or more 1-indexed inclusive page ranges. Not supported with aparse_resultsource.citations.enabled(optional, defaulttrue) — Attach per-field citations when values can be located.citations.include_source_text(optional, defaulttrue) — Include a short source quote in citations.
data— The extracted object shaped by the submitted schema.fields— One entry per schema field. Status isfound,not_found, orambiguous. A field the model could not locate is explicitlynot_found, never silently omitted.fields[*].citations— Per-field locations and source text tracing found values back to the source document.schema_id/schema_version— Set when Extract resolved a registry schema; null for inlineschema.warnings— Non-fatal notes about the request, such as instructions that no declared schema field can satisfy.
Extract schema validation
schema(optional) — Inline JSON Schema to validate. Mutually exclusive withschema_id.schema_id(optional) — Registered schema from/v1/extraction-schemas. Mutually exclusive withschema.schema_version(optional, ≥ 1) — Pin a registry version when usingschema_id.
extract job to catch schema errors without consuming processing units.
Ground
found, not_found, or failed, with ranked matches that report how the
location was found.
Ground is target location, not claim verification. It locates target text and
reports location status only.
Query parameters:
wait_seconds(optional, default 0, max 300)
Idempotency-Key(optional)
source(required) — Document source.targets(required) — Array of 1–30 target texts to locate.id— Caller-assigned identifier, echoed in the result.text— Text or phrase to locate.hint(optional) — Nearby text that helps disambiguate matches.page_hints(optional) — 1-based page numbers to search first.
options.max_matches(optional, default 10) — Maximum ranked matches per target.options.minimum_semantic_score(optional) — Minimum score from0to1for semantic matches.options.include_previews(optional, defaultfalse) — Generate source-image crops when a visual region is available.
claims[] requests remain accepted during rollout, but new integrations
should send targets[].
Result:
targets— One entry per input target, in the same order.status—found,not_found, orfailed.matches— Ranked locations for found targets.match_method—exact,normalized, orsemantic.confidence—nullfor exact and normalized matches; set only for probabilistic semantic matches.cropped_image_url— Authenticated crop URL when previews were requested and a visual region is available; otherwisenull. Send the sameX-API-Keyheader when fetching it. See Get a Ground crop.
Job lifecycle
All five job-creating endpoints (parse, split, classify, extract, ground) follow the same pattern:
- 202 immediately when
wait_seconds=0(default). PollGET /v1/jobs/{job_id}. - 200 with terminal result when
wait_seconds=Nand the job finished within N seconds. - 202 with running job when
wait_seconds=Nbut the job did not finish in time. Still poll.
status regardless of whether the response is 200 or 202.
See Jobs, idempotency, and async semantics for the full job lifecycle.