Extend

App · Document Extraction · 11 actions

Turn documents into clean, LLM-ready markdown, pull structured data out of them, classify and split them, and fill PDF forms with Extend's document processing AI. Run your Extend workflows and manage the files they read.

Actions

ActionWhat it does
Classify a documentDecide what kind of document a file is, such as an invoice, a receipt, or a bank statement, from types you describe or a classifier saved in Extend.
Delete a fileDelete a file from Extend for good, with everything Extend holds about it.
Extract data from a documentPull structured values out of a document (invoice totals, contract dates, form answers) as named fields you can use in later steps.
Fill a PDF formFill in the fields of a PDF form from plain-language instructions, such as 'Set the name to Jordan Avery and tick Single', and save the completed PDF for later steps to email, upload, or sign.
Get a fileLook up a file in Extend by its id: its name, type and page count, and a download link that works for 15 minutes.
Get a workflow runRead where an Extend workflow run has got to and what each of its steps produced: the extracted values, the document type, the split parts, and validation results.
List filesList the files in your Extend workspace, newest first, optionally only those whose name contains some text.
Parse a documentTurn a PDF, image, spreadsheet, presentation, or scan into clean, layout-aware markdown split into chunks: ready to feed into a later AI step, a search index, or a RAG pipeline.
Run a workflowStart one of your Extend workflows on a file, with every step you set up in Extend Studio: parsing, classifying, splitting, extracting, validation, and human review.
Split a documentFind the separate documents inside one file, such as the application, pay stubs, and bank statements in a scanned loan packet, with the pages each one covers.
Upload a fileSend a file to Extend once and get back its Extend file id, so several Extend steps can read it without sending it again.

Classify a document

Decide what kind of document a file is, such as an invoice, a receipt, or a bank statement, from types you describe or a classifier saved in Extend. Use the answer to send each document down the right branch of a workflow.

Inputs

FilefiletextRequired
The document: upload one here, pick a file from an earlier step, give its public link, or pass the file id an earlier Extend step returned. A file from Lodol is sent to Extend first.
Document typesdocument_typeslist
The types the document could be, each with a name and a description of how to recognize it. A catch-all 'other' type is added for anything that fits none of them. Needed unless you pick a saved classifier.
Classification guidanceclassification_rulestext
Optional. Plain-language rules for telling similar types apart, e.g. 'A purchase order has a PO number; an invoice has an amount due'.
Classification engineenginetext
Optional. Which engine to classify with. Defaults to the high-accuracy engine.One of: classification_performance (Performance: highest accuracy (default)), classification_light (Light: faster and cheaper).
Saved classifierclassifiertext
Optional. A classifier saved in Extend to run instead of listing types here. Any types, guidance or engine set above then replace the saved ones for this run only.
Versionclassifier_versiontext
Optional. Which published version of the saved classifier to run, such as '1.0', or 'draft' for the draft. Leave blank for the latest published version.

Outputs

classification_idtext
That type's id: its name in lowercase with underscores
classify_run_idtext
Extend's id for this classification run
confidencenumber
How sure Extend is, from 0 to 1
creditsnumber
Extend credits this classification used
dashboard_urltext
Link to review this run in the Extend dashboard
document_typetext
The type the document was found to be, as you named it, or 'other' when it fits none
file_idtext
Extend's id for the file, reusable in a later Extend step
file_nametext
The name of the file that was read
reasoningtext
Extend's explanation of its choice
Example output
{
  "classification_id": "invoice",
  "classify_run_id": "clr_Xj8mK2pL9nR4vT7qY5wZ",
  "confidence": 0.97,
  "credits": 1,
  "dashboard_url": "https://dashboard.extend.ai/classify_runs/clr_Xj8mK2pL9nR4vT7qY5wZ",
  "document_type": "invoice",
  "file_id": "file_xK9mLPqRtN3vS8wF5hB2cQ",
  "file_name": "scan_0042.pdf",
  "reasoning": "The document lists line items with prices and an amount due."
}

Delete a file

Delete a file from Extend for good, with everything Extend holds about it. Use it to remove documents once a workflow is done with them.

Inputs

File IDfile_idtextRequired
The Extend file id to delete, e.g. file_xK9mLPqRtN3vS8wF5hB2cQ.

Outputs

deletedtrue/false
True once Extend has deleted the file
file_idtext
The id of the deleted file
Example output
{
  "deleted": true,
  "file_id": "file_xK9mLPqRtN3vS8wF5hB2cQ"
}

Extract data from a document

Pull structured values out of a document (invoice totals, contract dates, form answers) as named fields you can use in later steps. List the fields you want, run an extractor saved in Extend, or leave both blank and let Extend work out the shape of the document for you.

Inputs

FilefiletextRequired
The document: upload one here, pick a file from an earlier step, give its public link, or pass the file id an earlier Extend step returned. A file from Lodol is sent to Extend first.
Fields to extractfieldslist
Optional. The values to pull out, each with a name and a description of what to look for. Leave this empty to let Extend infer the fields from the document itself, or to use a saved extractor's fields.
Extraction guidanceextraction_rulestext
Optional. Plain-language rules for the extraction, e.g. 'Return dates as YYYY-MM-DD and amounts without a currency symbol'. When no fields are listed above, this also tells Extend what kind of document to expect.
Extraction engineenginetext
Optional. Which engine to extract with. Defaults to the high-accuracy engine.One of: extraction_performance (Performance: highest accuracy (default)), extraction_light (Light: faster and cheaper for simple documents), extraction_operator (Operator: an agent for long, table-heavy documents (5 credits a page, can be slower)).
Saved extractorextractortext
Optional. An extractor saved in Extend to run instead of listing fields here. Any fields, guidance or engine set above then replace the saved ones for this run only.
Versionextractor_versiontext
Optional. Which published version of the saved extractor to run, such as '1.0', or 'draft' for the draft. Leave blank for the latest published version.

Outputs

creditsnumber
Extend credits this extraction used
dashboard_urltext
Link to review this run in the Extend dashboard
dataobject
The extracted values, one key per field you asked for (or per field Extend inferred)
extract_run_idtext
Extend's id for this extraction run
field_metadatalist
Per-field confidence and the text in the document each value came from
file_idtext
Extend's id for the file, reusable in a later Extend step
file_nametext
The name of the file that was read
Example output
{
  "credits": 3,
  "dashboard_url": "https://dashboard.extend.ai/extract_runs/exr_Xj8mK2pL9nR4vT7qY5wZ",
  "data": {
    "invoice_number": "INV-2024-001",
    "total_amount": 1234.56,
    "vendor_name": "Acme Supplies"
  },
  "extract_run_id": "exr_Xj8mK2pL9nR4vT7qY5wZ",
  "field_metadata": [
    {
      "confidence": 0.98,
      "field": "vendor_name",
      "page": 1,
      "reference_text": "Acme Supplies"
    },
    {
      "confidence": 0.95,
      "field": "invoice_number",
      "page": 1,
      "reference_text": "Invoice # INV-2024-001"
    }
  ],
  "file_id": "file_xK9mLPqRtN3vS8wF5hB2cQ",
  "file_name": "invoice.pdf"
}

Fill a PDF form

Fill in the fields of a PDF form from plain-language instructions, such as 'Set the name to Jordan Avery and tick Single', and save the completed PDF for later steps to email, upload, or sign. Extend finds the form's fields itself.

Inputs

Filefiletext
The PDF form to fill: upload one here, pick a file from an earlier step, give its public link, or pass an Extend file id. Leave blank to use a saved form template instead.
Saved form templatetemplatetext
Optional. A form template saved in Extend, used in place of a file. Its saved settings apply wherever this step sets none.
What to fill ininstructionstextRequired
The values to write and where, in plain language, e.g. 'Fill the first name as Jordan and the last name as Avery. Tick Single. Leave everything else blank.' Insert values from earlier steps to fill each form with its own data.
Lock the filled fieldsflattentrue/false
Optional. Flatten the form so the filled values can no longer be edited. Extend does this by default; turn it off to keep the fields editable.

Outputs

content_typetext
MIME type of the saved file
creditsnumber
Extend credits this run used
document_reftext
Reference to the saved file, for use by a later step
documentslist
The filled PDF, in the shape steps that send or upload files expect
edit_run_idtext
Extend's id for this form-filling run
edited_file_idtext
Extend's id for the filled PDF, reusable in a later Extend step
field_countnumber
How many fields Extend found on the form
file_idtext
Extend's id for the blank form that was filled
file_nametext
The name of the blank form that was filled
filenametext
Name the file was saved under
filled_valuesobject
The value written into each field, by field name
page_countnumber
How many pages the form has
size_bytesnumber
Size of the file in bytes
urltext
Download link for the saved file
Example output
{
  "content_type": "application/pdf",
  "credits": 4,
  "document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
  "documents": [
    {
      "content_type": "application/pdf",
      "document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
      "filename": "f1040_filled.pdf",
      "size_bytes": 182344,
      "url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
    }
  ],
  "edit_run_id": "edr_xK9mLPqRtN3vS8wF5hB2cQ",
  "edited_file_id": "file_Q7wZ2pL9nR4vT8mK3yX5c",
  "field_count": 141,
  "file_id": "file_GzKUy0VDhHscv7tweODYb",
  "file_name": "f1040.pdf",
  "filename": "f1040_filled.pdf",
  "filled_values": {
    "filing_status_single": true,
    "first_name": "Jordan",
    "last_name": "Avery"
  },
  "page_count": 2,
  "size_bytes": 182344,
  "url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}

Get a file

Look up a file in Extend by its id: its name, type and page count, and a download link that works for 15 minutes.

Inputs

File IDfile_idtextRequired
The Extend file id, such as the file_id an earlier Extend step returned, e.g. file_xK9mLPqRtN3vS8wF5hB2cQ.

Outputs

created_attext
When the file was added
download_urltext
A link to download the file. It stops working after 15 minutes.
file_idtext
Extend's id for the file, reusable in a later Extend step
file_nametext
The file's name
file_typetext
The kind of file Extend detected: PDF, IMG, DOCX, EXCEL, CSV, TXT, XML or HTML
page_countnumber
How many pages the file has. Only set for PDF and Word files.
parent_file_idtext
The file this one was split out of, when an Extend workflow split it
updated_attext
When the file last changed
Example output
{
  "created_at": "2026-03-21T16:45:00Z",
  "download_url": "https://extend-files.s3.amazonaws.com/file_xK9mLPqRtN3vS8wF5hB2cQ?X-Amz-Expires=900",
  "file_id": "file_xK9mLPqRtN3vS8wF5hB2cQ",
  "file_name": "invoice.pdf",
  "file_type": "PDF",
  "page_count": 2,
  "parent_file_id": "",
  "updated_at": "2026-03-21T16:45:00Z"
}

Get a workflow run

Read where an Extend workflow run has got to and what each of its steps produced: the extracted values, the document type, the split parts, and validation results. Wait and read again until 'finished' is true.

Inputs

Workflow run IDworkflow_run_idtextRequired
The run to read: the workflow_run_id 'Run an Extend workflow' returned, such as workflow_run_xKm9pNv3qWsY_jL2tR5Dh.

Outputs

creditsnumber
Extend credits the run's steps have used
dashboard_urltext
Link to the run in the Extend dashboard
ended_attext
When the run finished. Empty until it finishes.
failure_messagetext
Extend's explanation of the failure. Empty unless it failed.
failure_reasontext
Why the run failed, as Extend's code. Empty unless it failed.
fileslist
The files the run processed
finishedtrue/false
True once the run will not change on its own: processed, failed, canceled, rejected, or waiting for a person to review it
outputsobject
Each step's output under the step's name, so a later step can read one by name
rejection_notetext
The reviewer's note when the run was rejected
reviewedtrue/false
Whether a person has reviewed the run in Extend
started_attext
When the run started. Empty until it starts.
statustext
Where the run is: PENDING, PROCESSING, NEEDS_REVIEW, REJECTED, PROCESSED, FAILED, CANCELLED or CANCELLING
stepslist
Every step of the workflow that has run so far, in order
workflow_idtext
The workflow that ran
workflow_nametext
The workflow's name
workflow_run_idtext
Extend's id for this run, for 'Get a workflow run'
workflow_versiontext
The workflow version used, or 'draft'
Example output
{
  "credits": 6,
  "dashboard_url": "https://dashboard.extend.ai/workflows/workflow_run_xKm9pNv3qWsY_jL2tR5Dh",
  "ended_at": "2026-03-21T15:31:12Z",
  "failure_message": "",
  "failure_reason": "",
  "files": [
    {
      "file_id": "file_xK9mLPqRtN3vS8wF5hB2cQ",
      "file_name": "invoice.pdf",
      "file_type": "PDF"
    }
  ],
  "finished": true,
  "outputs": {
    "Extract invoice": {
      "invoice_number": "INV-2024-001",
      "total_amount": 1234.56
    }
  },
  "rejection_note": "",
  "reviewed": false,
  "started_at": "2026-03-21T15:30:00Z",
  "status": "PROCESSED",
  "steps": [
    {
      "name": "Extract invoice",
      "output": {
        "invoice_number": "INV-2024-001",
        "total_amount": 1234.56
      },
      "status": "PROCESSED",
      "type": "EXTRACT"
    }
  ],
  "workflow_id": "workflow_BMdfq_yWM3sT-ZzvCnA3f",
  "workflow_name": "Invoice processing",
  "workflow_run_id": "workflow_run_xKm9pNv3qWsY_jL2tR5Dh",
  "workflow_version": "3"
}

List files

List the files in your Extend workspace, newest first, optionally only those whose name contains some text. A file just uploaded can take a few seconds to appear.

Inputs

Name containsname_containstext
Optional. Only files whose name contains this text, e.g. 'invoice'.
Ordersort_directiontext
Optional. Newest first (the default) or oldest first.One of: desc (Newest first), asc (Oldest first).
How manylimitnumber
Optional. How many to return, up to 100. Defaults to 10.From 1 to 100.
Next pagepage_tokentext
Optional. The next_page_token a previous step returned, to get the page after it.

Outputs

countnumber
How many files are on this page
fileslist
The files on this page
next_page_tokentext
Give this to 'Next page' to get the next page. Empty on the last page.
Example output
{
  "count": 1,
  "files": [
    {
      "created_at": "2026-03-21T16:45:00Z",
      "file_id": "file_xK9mLPqRtN3vS8wF5hB2cQ",
      "file_name": "invoice.pdf",
      "file_type": "PDF",
      "page_count": 2,
      "parent_file_id": "",
      "updated_at": "2026-03-21T16:45:00Z"
    }
  ],
  "next_page_token": ""
}

Parse a document

Turn a PDF, image, spreadsheet, presentation, or scan into clean, layout-aware markdown split into chunks: ready to feed into a later AI step, a search index, or a RAG pipeline.

Inputs

FilefiletextRequired
The document: upload one here, pick a file from an earlier step, give its public link, or pass the file id an earlier Extend step returned. A file from Lodol is sent to Extend first.
Split the document intochunking_strategytext
Optional. How to divide the document. Defaults to one chunk per page.One of: page (Pages (one chunk per page)), section (Sections (splits at headings, best for search)), document (The whole document (a single chunk)).
Parsing engineenginetext
Optional. Which engine to parse with. Defaults to the high-accuracy engine.One of: parse_performance (Performance: highest accuracy for complex tables, handwriting, and checkboxes (default)), parse_light (Light: faster and cheaper for high-volume, good-quality documents), parse_auto (Auto: Light for simple pages, Performance for hard ones, billed page by page).
Layouttargettext
Optional. Markdown follows the reading order and suits AI steps and search. Spatial keeps text where it sits on the page, which suits messy scans, handwriting, and forms like bills of lading; it can only be split by pages. Defaults to Markdown.One of: markdown (Markdown (default)), spatial (Spatial (keeps the layout)).
Table formattable_formattext
Optional. How tables are written into the parsed content. Defaults to HTML, which handles merged cells and nested headers.One of: html (HTML: complex tables with merged cells (default)), markdown (Markdown: simple tables and AI steps).
Include element breakdowninclude_blockstrue/false
Optional. Also return every element on the page individually (each table, figure, heading, and key-value pair) with the page it came from.Default: false.
First pagepage_startnumber
Optional. Parse only from this page onwards. Set the last page too. You are only billed for the pages parsed.At least 1.
Last pagepage_endnumber
Optional. Parse up to and including this page. Set the first page too.At least 1.

Outputs

blockslist
Individual page elements. Empty unless 'Include element breakdown' is on.
chunkslist
The parsed content, split into chunks
contenttext
The whole document as markdown, with every chunk joined in reading order
creditsnumber
Extend credits this parse used
file_idtext
Extend's id for the parsed file, reusable in a later Extend step
file_nametext
The name of the parsed file
page_countnumber
How many pages were parsed
parse_run_idtext
Extend's id for this parse run
Example output
{
  "blocks": [
    {
      "content": "CHASE JPMorgan Chase Bank, N.A. P O Box 659754 San Antonio, TX 78265 - 9754",
      "page": 1,
      "type": "text"
    }
  ],
  "chunks": [
    {
      "content": "# CHASE\n\nJPMorgan Chase Bank, N.A.\nP O Box 659754\nSan Antonio, TX 78265 - 9754",
      "page_end": 1,
      "page_start": 1,
      "type": "page"
    }
  ],
  "content": "# CHASE\n\nJPMorgan Chase Bank, N.A.\nP O Box 659754\nSan Antonio, TX 78265 - 9754",
  "credits": 14,
  "file_id": "file_GzKUy0VDhHscv7tweODYb",
  "file_name": "bank_statement.pdf",
  "page_count": 7,
  "parse_run_id": "pr_3f1j6I1gsw5k96xFiCnkM"
}

Run a workflow

Start one of your Extend workflows on a file, with every step you set up in Extend Studio: parsing, classifying, splitting, extracting, validation, and human review. Extend runs it in the background, so this returns the run straight away; read the results with 'Get an Extend workflow run'.

Inputs

WorkflowworkflowtextRequired
The Extend workflow to run.
FilefiletextRequired
The document: upload one here, pick a file from an earlier step, give its public link, or pass the file id an earlier Extend step returned. A file from Lodol is sent to Extend first.
Versionworkflow_versiontext
Optional. Which version of the workflow to run, such as '3', or 'draft' for the draft. Leave blank for the latest deployed version.

Outputs

creditsnumber
Extend credits the run's steps have used
dashboard_urltext
Link to the run in the Extend dashboard
ended_attext
When the run finished. Empty until it finishes.
failure_messagetext
Extend's explanation of the failure. Empty unless it failed.
failure_reasontext
Why the run failed, as Extend's code. Empty unless it failed.
fileslist
The files the run processed
finishedtrue/false
True once the run will not change on its own: processed, failed, canceled, rejected, or waiting for a person to review it
outputsobject
Each step's output under the step's name, so a later step can read one by name
rejection_notetext
The reviewer's note when the run was rejected
reviewedtrue/false
Whether a person has reviewed the run in Extend
started_attext
When the run started. Empty until it starts.
statustext
Where the run is: PENDING, PROCESSING, NEEDS_REVIEW, REJECTED, PROCESSED, FAILED, CANCELLED or CANCELLING
stepslist
Every step of the workflow that has run so far, in order
workflow_idtext
The workflow that ran
workflow_nametext
The workflow's name
workflow_run_idtext
Extend's id for this run, for 'Get a workflow run'
workflow_versiontext
The workflow version used, or 'draft'
Example output
{
  "credits": 0,
  "dashboard_url": "https://dashboard.extend.ai/workflows/workflow_run_xKm9pNv3qWsY_jL2tR5Dh",
  "ended_at": "",
  "failure_message": "",
  "failure_reason": "",
  "files": [
    {
      "file_id": "file_xK9mLPqRtN3vS8wF5hB2cQ",
      "file_name": "invoice.pdf",
      "file_type": "PDF"
    }
  ],
  "finished": false,
  "outputs": {},
  "rejection_note": "",
  "reviewed": false,
  "started_at": "",
  "status": "PENDING",
  "steps": [],
  "workflow_id": "workflow_BMdfq_yWM3sT-ZzvCnA3f",
  "workflow_name": "Invoice processing",
  "workflow_run_id": "workflow_run_xKm9pNv3qWsY_jL2tR5Dh",
  "workflow_version": "3"
}

Split a document

Find the separate documents inside one file, such as the application, pay stubs, and bank statements in a scanned loan packet, with the pages each one covers. Every part comes back as an Extend file of its own, ready to extract from.

Inputs

FilefiletextRequired
The document: upload one here, pick a file from an earlier step, give its public link, or pass the file id an earlier Extend step returned. A file from Lodol is sent to Extend first.
Document typesdocument_typeslist
The types of document the file may contain, each with a name and a description of how to recognize it. A catch-all 'other' type is added for pages that fit none of them. Needed unless you pick a saved splitter.
Splitting guidancesplit_rulestext
Optional. Plain-language rules for where one document ends and the next begins, e.g. 'Each invoice starts on a page with the company logo'.
Splitting engineenginetext
Optional. Which engine to split with. Defaults to the high-accuracy engine.One of: splitting_performance (Performance: highest accuracy (default)), splitting_light (Light: faster and cheaper).
Saved splittersplittertext
Optional. A splitter saved in Extend to run instead of listing types here. Any types, guidance or engine set above then replace the saved ones for this run only.
Versionsplitter_versiontext
Optional. Which published version of the saved splitter to run, such as '1.0', or 'draft' for the draft. Leave blank for the latest published version.

Outputs

creditsnumber
Extend credits this split used
dashboard_urltext
Link to review this run in the Extend dashboard
file_idtext
Extend's id for the whole file
file_nametext
The name of the file that was split
split_countnumber
How many documents were found
split_run_idtext
Extend's id for this split run
splitslist
The documents found in the file, in page order
Example output
{
  "credits": 3,
  "dashboard_url": "https://dashboard.extend.ai/split_runs/splr_Xj8mK2pL9nR4vT7qY5wZ",
  "file_id": "file_GzKUy0VDhHscv7tweODYb",
  "file_name": "loan_application.pdf",
  "split_count": 2,
  "split_run_id": "splr_Xj8mK2pL9nR4vT7qY5wZ",
  "splits": [
    {
      "classification_id": "loan_application",
      "document_type": "loan_application",
      "file_id": "file_8sLPqRtN3vS2wF5hB2cQ",
      "identifier": "Jordan Avery",
      "name": "",
      "observation": "Pages 1-5 are a Uniform Residential Loan Application.",
      "page_end": 5,
      "page_start": 1,
      "split_id": "splt_xK9mLPqRtN3vS8wF5hB2cQ"
    },
    {
      "classification_id": "bank_statement",
      "document_type": "bank_statement",
      "file_id": "file_R4vT7qY5wZj8mK2pL9nR",
      "identifier": "Jordan Avery",
      "name": "",
      "observation": "Pages 6-9 are a monthly bank statement.",
      "page_end": 9,
      "page_start": 6,
      "split_id": "splt_2pL9nR4vT7qY5wZj8mK2"
    }
  ]
}

Upload a file

Send a file to Extend once and get back its Extend file id, so several Extend steps can read it without sending it again. Word and PowerPoint files are turned into PDFs on the way in.

Inputs

FilefiletextRequired
The file to upload: upload one here or pick a file from an earlier step. A public link needs no upload; give it to the step that reads the document instead.
PDF passwordpasswordtext
Optional. The password of a password-protected PDF, so Extend can open it.

Outputs

created_attext
When the file was added
file_idtext
Extend's id for the file, reusable in a later Extend step
file_nametext
The file's name
file_typetext
The kind of file Extend detected: PDF, IMG, DOCX, EXCEL, CSV, TXT, XML or HTML
page_countnumber
How many pages the file has. Only set for PDF and Word files.
parent_file_idtext
The file this one was split out of, when an Extend workflow split it
updated_attext
When the file last changed
Example output
{
  "created_at": "2026-03-21T16:45:00Z",
  "file_id": "file_xK9mLPqRtN3vS8wF5hB2cQ",
  "file_name": "invoice.pdf",
  "file_type": "PDF",
  "page_count": 2,
  "parent_file_id": "",
  "updated_at": "2026-03-21T16:45:00Z"
}

On this page