Skip to main content

Overview

Pipeline Step 1 — Extract is where document processing begins: every downstream step consumes its extraction_id. After extraction, you can optionally split the document into topics, apply schema extraction to get structured data, or use tables for span-aware table extraction.Handling mixed document types? /classify can run before Extract to route each raw document to the right pipeline — it only chooses which pipeline runs, so extraction still happens here.
Extract document content as markdown, layout elements, table cells, words, figures, and optional extension output. When a response reaches the configured inline-size threshold (5 MB by default), the API returns a download URL instead of embedding the payload. Fetching that URL returns the same complete extraction result JSON you would receive inline. See Large Result Response below.
For large documents or batch processing workflows, set async: true to process asynchronously and poll for results via GET /job/jobId.
To process many files at once, use Batch Extract. It accepts an S3 prefix, local directory, or list of URLs and runs /extract on each file in parallel.

Async Mode

Set async: true to return immediately with a job ID for polling:
Async Response (200):
Use GET /job/{job_id} to poll for completion.

Request

Document Source

Provide the document using one of these methods:

Extraction Options

Refinement

refine is off unless you enable it. It accepts three forms:
Valid modes: refine.prompt accepts a string that applies to the whole refinement pass, or an object keyed by mode (e.g. {"tables": "...", "text": "..."}) to scope guidance per mode. Prompt keys must be a subset of the requested modes, and layout never accepts a custom prompt. When you use the boolean or array form, pass the guidance through the sibling refine_prompt field instead; refine.prompt takes precedence over refine_prompt when both are present. Refinement changes the normal markdown and bounding_boxes fields in place; it does not create a parallel response object.

Figure Processing

For spreadsheets, show_images: true returns embedded charts and images with workbook-specific metadata such as sheet_name, excel_range, chart_type, and source_ranges.

Extensions

Extensions add derived outputs while preserving the core response fields. The standard bounding_boxes.Words collection is always part of the extraction response. extensions.alt_outputs.wlbb (equivalently, the top-level word_level_bounding_boxes parameter) requests the additional extensions.altOutputs.wlbb word-box output used by existing WLBB workflows. Organizations can also have word-level output enabled by default for every extraction — contact support to configure an org-wide default.

Spreadsheet Options

Complete Processing Example

Storage Options

Control whether extractions are saved to your extraction library:

Response

The response structure varies based on document size to optimize for different use cases.

Standard Inline Response

When the response payload stays below the inline threshold, results are returned directly in the response body:

Response Fields

Partial Results (failed_pages)

Extraction completes with a partial result whenever at least one page succeeds. A job fails outright only when every page is unextractable. On a partial result:
  • failed_pages at the top level lists each unrecoverable page with a short reason.
  • A matching entry is appended to warnings.
  • The markdown carries a visible <!-- PAGE N FAILED EXTRACTION: ... --> placeholder at each hole, so page-oriented consumers keep their alignment.
  • Only successfully extracted pages are billed.
Treat failed_pages as the authoritative list of holes: if it is absent, every requested page was extracted.
If your organization was migrated from the default engine, responses keep the familiar shape documented on this page — including bounding_boxes with grouped Words, Tables[].cell_data with ids, spans, and confidences, and chunking output — and extraction bills at a flat 1 credit per page. Callers that explicitly request model="pulse-ultra-2" continue to receive today’s Ultra response format unchanged.

Large Result Response

When a response reaches the configured inline-size threshold (5 MB by default), or when force_url: true is supplied, the API returns a download URL instead of inlining the payload. Some rollback deployments may also offload documents over 70 pages. The downloaded JSON is the complete extraction result with the normal response shape.

Large Result Response Fields

Download and persist URL-backed results promptly. Anonymous Pulse result links are single-use and expire 1 hour after completion. Same-org authenticated requests can replay the Pulse URL while retention keeps the artifact available; presigned storage URLs follow their own expiry.

Handling Large Document Responses

Persist URL-backed results in your own storage after download. You can also keep storage.enabled and retrieve saved extractions from the Pulse Platform.

Example Usage

Core Processing

Use refine, refine_prompt, additional_prompt, and detect_selections to steer or refine the primary extraction result. These are separate from extensions, which add derived outputs.
refine also accepts a boolean ("refine": true runs the general pass) or a bare array of modes ("refine": ["tables", "formatting", "text", "layout"]); with those forms, pass refinement guidance through the sibling refine_prompt field. See Core Processing for precedence and defaults.

Basic Extraction

File Upload

Direct multipart uploads (file=) are limited to 100 MB. Larger uploads fail fast with HTTP 413 and error code FILE_TOO_LARGE_USE_URL. Files over 100 MB must be submitted via file_url pointing at your own hosted or presigned URL — file_url submissions are accepted at any size. Very large documents are sharded and processed transparently under a single job ID; see Working with Large Documents.

Structured Data (Extract → Schema)

Apply structured output with /schema after extraction. The resulting extraction_id lets you rerun or change schemas without processing the source document again.
Recommended two-step approach:

Document Metadata

Enable extensions.document_metadata to read native properties from the original file before conversion, rendering, or OCR. The option is a single boolean; Pulse returns every safely recoverable field for the detected format.
Absent metadata fields are omitted rather than returned as null. Metadata is evidence declared by the source file and is not independently verified. Original camera files may contain sensitive capture timestamps or GPS coordinates. See Document Metadata for format-specific behavior and implementation guidance.

Page Range and Chunking

With a pages= subset, every page number in the response — page-break markers, bounding boxes, tables, Words, and extension output — refers to the original document’s page numbers. Requesting pages="10-20" returns items labeled pages 10 through 20.

Footnote References

Enable extensions.footnote_references to detect footnote markers (e.g. *, , 1) in body text and link them to the footnote explanation paragraphs at the bottom of the page. Each result item includes the marker symbol, the bounding-box text ID of the footnote, and the bounding-box text IDs of all body-text paragraphs that reference it.

Example Response

Footnote Reference Fields

Footnote reference detection combines layout categories with native PDF text evidence for accurate symbol identification. This handles common OCR confusion between visually similar symbols like /+ and /#. Supported markers include numbered (1, 2, 3), symbolic (*, , , §, #), and lettered (a, b, c) footnotes.

Excel Spreadsheet Options

Spreadsheet table cells are returned under bounding_boxes.Tables[].cell_data. The default spreadsheet.cell_data_mode: "inline" returns each full cell array. Set it to "external" to return per-table JSONL artifact references when very large workbooks make inline cell arrays impractical.
Workbooks exported from claims systems, ERPs, and other automated pipelines often declare a “used range” that extends hundreds of thousands of rows past where the data actually ends. Set spreadsheet.only_data_rows: true and spreadsheet.only_data_cols: true to have Pulse trim those trailing empty “phantom” rows and columns before parsing. Surviving cells keep their original A1 coordinates, so any citation or bounding box that references a specific cell remains stable. Both flags default to false. See the extraction options above for the full reference.

Excel Charts and Embedded Images

When you set figure_processing.show_images: true on an Excel workbook, every embedded chart and image is collected from the workbook directly and returned under bounding_boxes.Images[]. Each entry carries a Pulse-hosted image_url you can fetch via results.getImage (or any HTTP client with your API key) to get the raw PNG/JPEG bytes.

Example bounding_boxes.Images Entry

See Bounding Boxes — Images Array for the full field reference and Get Result Image for the auth requirement on image_url.

Disable Storage