Fill a PDF form
edit_pdfFill form fields in a PDF and return the edited file (edit group). Values come from instructions (free-form prose, e.g. "name is Acme Corp; date is 2026-04-15") and/or schema (an edit schema from detect_form_fields with extend_edit:value set per field; extend_edit:image with an image_url for signature images). The document passed here must be the TARGET form, not the source you read values from — parse or extract the source first, then fill. Before authoring a schema fill by hand, call get_documentation with https://docs.extend.ai/editing/configuration.md and follow it. Output is a pointer { id, presignedUrl } to the filled PDF; the URL expires in ~15 minutes (re-fetch with get_file). Inspect runs with get_edit_run. Follow any llmContext guidance included in results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | The PDF form to fill. Exactly one of id/url — e.g. { "url": "https://..." } or { "id": "file_..." }, never a bare string. | |
| schema | No | Populated edit schema (root type: "object", fields carrying extend_edit:* keys). Generate with detect_form_fields. | |
| environment | Yes | "TEST" = the Test (development) environment, "PRODUCTION" = live. Must match a granted target from get_me (an API key pins one environment). | |
| waitSeconds | No | Max seconds to block waiting on the run (clamped to the server wait budget). | |
| workspaceId | Yes | Target workspace (ws_...). Must be a granted workspace — get_me lists the accepted values. | |
| instructions | No | Prose fill values and/or formatting guidance. | |
| advancedOptions | No | { flattenPdf?, tableParsingEnabled?, radioEnumsEnabled?, nativeFieldsOnly?, conditionalGenerationEnabled? } |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | Yes | ||
| output | No | Pointer to the filled PDF (PROCESSED only); the presignedUrl expires in ~15 minutes. | |
| status | Yes | PROCESSING | PROCESSED | FAILED, or "running" (resume via the get tool). | |
| metrics | No | ||
| runType | No | ||
| llmContext | No | ||
| failureReason | No | ||
| failureMessage | No |