For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog in
DocumentationAPI ReferenceModel VersioningChangelog
DocumentationAPI ReferenceModel VersioningChangelog
    • Studio
    • Support
    • Benchmarks
    • Status
  • Getting Started
    • Overview
    • API Quickstart
    • Dashboard Quickstart
    • Agent Quickstart
  • Dev Tools
    • SDKs
    • CLI
  • Capabilities
      • Overview
      • Configuration
      • Response Format
      • Best Practices
      • Error Handling
      • Generate Edit Schema
LogoLogo
Book a demoLog in
On this page
  • Response structure
  • Top-level fields
  • The edited file
  • Filled values
  • Metrics
  • Status values
CapabilitiesEditing

Response Format

Was this page helpful?
Previous

Best Practices

Next
Built with

An edit run returns an edit_run object. While the run is processing, output is null; once status is "PROCESSED", output carries the completed PDF and the values that were written into it. This page explains every field in the response.


Response structure

A completed edit run looks like this. The result lives in output: the finished document in editedFile and the values that were written in filledValues.

1{
2 "object": "edit_run",
3 "id": "edr_xK9mLPqRtN3vS8wF5hB2cQ",
4 "file": {
5 "object": "file",
6 "id": "file_Zk9mNP12Qw4yTv8BdR3H",
7 "name": "f1040.pdf"
8 },
9 "status": "PROCESSED",
10 "failureReason": null,
11 "failureMessage": null,
12 "config": { "instructions": "Fill the taxpayer's name and filing status." },
13 "output": {
14 "editedFile": {
15 "id": "file_Ab3cDE45Fg6hIj7KlM8nO",
16 "presignedUrl": "https://extend-files.s3.amazonaws.com/..."
17 },
18 "filledValues": {
19 "first_name": "Jordan",
20 "last_name": "Avery",
21 "filing_status_single": true
22 }
23 },
24 "metrics": { "processingTimeMs": 1234, "pageCount": 2, "fieldCount": 3 },
25 "usage": { "credits": 1 }
26}

Top-level fields

FieldTypeDescription
objectstringAlways "edit_run".
idstringUnique identifier for the run (e.g. edr_...). Use it to fetch results later.
fileobjectThe input file submitted for editing (id, name).
statusstringPROCESSING, PROCESSED, or FAILED.
configobjectThe full configuration used, including defaults that were applied.
outputobject | nullThe completed PDF and filled values. Present when status is PROCESSED.
metricsobject | nullProcessing time, page count, and field-level counts. Present when status is PROCESSED.
usageobjectCredits consumed (usage.credits).
failureReason / failureMessagestring | nullMachine-readable code and human-readable message. Present when status is FAILED. See Error Handling.

The edited file

output.editedFile is the completed PDF.

FieldTypeDescription
output.editedFile.idstringThe Extend file id of the edited document. Reusable as input to other endpoints.
output.editedFile.presignedUrlstringA download URL for the completed PDF.

presignedUrl expires 15 minutes after the response is returned. Download or store the file promptly.

Python
TypeScript
Java
Go
1edited = result.output.edited_file
2print("File id:", edited.id)
3print("Download:", edited.presigned_url) # expires after 15 minutes

Filled values

output.filledValues is the set of values written into the form, keyed by the property names from your schema (or the field names Extend detected when you pass instructions). It is omitted when no values were filled.

1{
2 "output": {
3 "filledValues": {
4 "first_name": "Jordan",
5 "last_name": "Avery",
6 "filing_status_single": true
7 }
8 }
9}

Metrics

When status is PROCESSED, metrics reports timing and field-level counts for the run.

FieldTypeDescription
processingTimeMsnumberTotal processing time, in milliseconds.
pageCountintegerNumber of pages in the document.
fieldCountintegerTotal number of fields in the schema.
fieldsDetectedCountintegerNumber of fields that were automatically detected.
fieldsAnnotatedCountintegerNumber of fields that were annotated with bounding boxes.
fieldDetectionTimeMsnumberTime taken to detect fields, in milliseconds.
fieldAnnotationTimeMsnumberTime taken to annotate field positions, in milliseconds.
fieldFillingTimeMsnumberTime taken to fill the fields, in milliseconds.

Status values

StatusDescription
PROCESSINGThe file is still being edited.
PROCESSEDThe edit completed successfully; output is populated.
FAILEDThe edit failed; see failureReason and failureMessage. See Error Handling.