> ## Documentation Index
> Fetch the complete documentation index at: https://docs.extend.ai/llms.txt
> Use this file to discover all available pages before exploring further.
>
> ## API version
> The current API version is `2026-02-09`, served at the site root (no version prefix in URLs).
> If this page URL contains `/2025-04-21/` or `/2024-12-23/`, you are reading an older API version.
> Prefer the current docs at https://docs.extend.ai/llms.txt unless the user explicitly needs that older version.
> Do not treat older-version pages as the source of truth for new integrations.

# Editing Response Format

> Understand the edit run response: top-level fields, the edited file, filled values, processing metrics, and status values.

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`.

```json
{
  "object": "edit_run",
  "id": "edr_xK9mLPqRtN3vS8wF5hB2cQ",
  "file": {
    "object": "file",
    "id": "file_Zk9mNP12Qw4yTv8BdR3H",
    "name": "f1040.pdf"
  },
  "status": "PROCESSED",
  "failureReason": null,
  "failureMessage": null,
  "config": {
    "engineVersion": "1.0.0",
    "instructions": "Fill the taxpayer's name and filing status."
  },
  "output": {
    "editedFile": {
      "id": "file_Ab3cDE45Fg6hIj7KlM8nO",
      "presignedUrl": "https://extend-files.s3.amazonaws.com/..."
    },
    "filledValues": {
      "first_name": "Jordan",
      "last_name": "Avery",
      "filing_status_single": true
    }
  },
  "metrics": { "processingTimeMs": 1234, "pageCount": 2, "fieldCount": 3 },
  "usage": { "credits": 1 }
}
```

### Top-level fields

| Field                              | Type           | Description                                                                                                                                                                        |
| ---------------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `object`                           | string         | Always `"edit_run"`.                                                                                                                                                               |
| `id`                               | string         | Unique identifier for the run (e.g. `edr_...`). Use it to [fetch results](/api-reference/endpoints/edit/get-edit-run) later.                                                       |
| `file`                             | object         | The input file submitted for editing (`id`, `name`).                                                                                                                               |
| `status`                           | string         | `PROCESSING`, `PROCESSED`, or `FAILED`.                                                                                                                                            |
| `config`                           | object         | The full configuration used, including defaults that were applied. `config.engineVersion` is always the resolved exact Edit engine version, even when the request used `"latest"`. |
| `output`                           | object \| null | The completed PDF and filled values. Present when `status` is `PROCESSED`.                                                                                                         |
| `metrics`                          | object \| null | Processing time, page count, and field-level counts. Present when `status` is `PROCESSED`.                                                                                         |
| `usage`                            | object         | Credits consumed (`usage.credits`).                                                                                                                                                |
| `failureReason` / `failureMessage` | string \| null | Machine-readable code and human-readable message. Present when `status` is `FAILED`. See [Error Handling](/editing/error-handling).                                                |

---

## The edited file

`output.editedFile` is the completed PDF.

| Field                            | Type   | Description                                                                        |
| -------------------------------- | ------ | ---------------------------------------------------------------------------------- |
| `output.editedFile.id`           | string | The Extend file `id` of the edited document. Reusable as input to other endpoints. |
| `output.editedFile.presignedUrl` | string | A download URL for the completed PDF.                                              |

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

#### Python

```python
edited = result.output.edited_file
print("File id:", edited.id)
print("Download:", edited.presigned_url)  # expires after 15 minutes
```

#### TypeScript

```typescript
const edited = result.output?.editedFile;
console.log("File id:", edited?.id);
console.log("Download:", edited?.presignedUrl); // expires after 15 minutes
```

#### Java

```java
var edited = result.getOutput().get().getEditedFile();
System.out.println("File id: " + edited.getId());
System.out.println("Download: " + edited.getPresignedUrl()); // expires after 15 minutes
```

#### Go

```go
edited := result.Output.EditedFile
fmt.Println("File id:", edited.ID)
fmt.Println("Download:", edited.PresignedURL) // 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.

```json
{
  "output": {
    "filledValues": {
      "first_name": "Jordan",
      "last_name": "Avery",
      "filing_status_single": true
    }
  }
}
```

---

## Metrics

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

| Field                   | Type    | Description                                               |
| ----------------------- | ------- | --------------------------------------------------------- |
| `processingTimeMs`      | number  | Total processing time, in milliseconds.                   |
| `pageCount`             | integer | Number of pages in the document.                          |
| `fieldCount`            | integer | Total number of fields in the schema.                     |
| `fieldsDetectedCount`   | integer | Number of fields that were automatically detected.        |
| `fieldsAnnotatedCount`  | integer | Number of fields that were annotated with bounding boxes. |
| `fieldDetectionTimeMs`  | number  | Time taken to detect fields, in milliseconds.             |
| `fieldAnnotationTimeMs` | number  | Time taken to annotate field positions, in milliseconds.  |
| `fieldFillingTimeMs`    | number  | Time taken to fill the fields, in milliseconds.           |

---

## Status values

| Status       | Description                                                                                               |
| ------------ | --------------------------------------------------------------------------------------------------------- |
| `PROCESSING` | The file is still being edited.                                                                           |
| `PROCESSED`  | The edit completed successfully; `output` is populated.                                                   |
| `FAILED`     | The edit failed; see `failureReason` and `failureMessage`. See [Error Handling](/editing/error-handling). |