Detect and fill form fields with natural language.
Edit finds fillable elements in PDFs and images — text fields, dates, checkboxes, signatures — and fills them using instructions or explicit mappings. Run detection first, then fill in one request. Optional verification and full audit trail.



Edit
Detect and fill form fields with natural language.
Edit detects fillable elements in PDFs and images (text fields, dates, checkboxes, signatures) and fills them using natural language instructions or explicit mappings. Run detection first with POST /api/edit/detect, then fill with POST /api/edit/run using instructions or element IDs from the detect response.
Supported formats are PDF and images (PNG, JPEG, HEIC). Output is a filled document with optional post-fill verification and full audit trail.
Detect form elements
Find fillable fields before filling.
Use POST /api/edit/detect to find all fillable elements in a document without filling them. The response includes a job_id and an array of elements: id, type (text_field, date_field, checkbox, signature), label, page, bbox, and optional format or current_value.
Pass the job_id to /api/edit/run and supply mappings by elementId or, when using edit_job_id, by field label. Config can include include_checkboxes and include_signatures.






Run & fill
Fill with instructions or mappings; iterative correct.
POST /api/edit/run fills the document. You can pass natural language instructions, or mappings as an array of { elementId, value, formatted? } or, when edit_job_id is set, as an object keyed by label or element ID. Use corrections and edit_id for iterative correct; set verify: true to run post-fill verification.
Response includes job_id, edit_id, filled_elements, output_file_url, and optional verification_result. Reference a saved config with edit_config_id or pass inline config.
Configs & projects
Save configs; group runs and resume with projects.
Save edit configurations (instructions, detectionSettings, fillSettings) per organization via GET/POST /api/edit/configs. Apply a config by ID in run or batch requests. Projects group edit runs by document and config: list and create with GET/POST /api/edit/projects, get project and list runs, then rerun with POST /api/edit/projects/:id/rerun to resume or create a new version.
Use projects in the dashboard to manage version history and resume work without re-detecting.






Batch & verify
Same config on many documents; audit and verify.
Run the same edit configuration on multiple documents with POST /api/edit/batch (document_ids, optional edit_config_id or inline config). Get batch status and results with GET /api/edit/batch/:id. Re-run post-fill verification on an existing edit with POST /api/edit/verify (edit_id).
Audit: GET /api/edit/audit with document_id and optional from/to dates for who edited what and when. GET /api/edit/results/:job_id/audit-report returns the latest edit's per-field label, value, source, and reasoning.
Vocabulary & suggest
Normalize terms and get AI-suggested values.
Organization-scoped vocabulary (GET/POST/PATCH/DELETE /api/edit/vocabulary) stores canonical terms and aliases for normalizing values when filling. Use it to keep consistent terminology across forms.
POST /api/edit/suggest returns AI-suggested values for the detected elements of an edit job, optionally from instructions. Pass session_id to persist suggestions to the edit session with source ai_suggestion.



Supported formats
| Format | Extensions | Notes |
|---|---|---|
| Detection and editing supported | ||
| Images | .png, .jpg, .jpeg, .heic | Detection and editing supported |
Detect and run flow
| Step | Endpoint | Description |
|---|---|---|
| Detect | POST /api/edit/detect | Detect fillable elements; returns job_id and elements (id, type, label, page, bbox). |
| Fill | POST /api/edit/run | Fill using edit_job_id + instructions and/or mappings; returns output_file_url, filled_elements, optional verification_result. |
Edit configs
| Endpoint | Description |
|---|---|
| GET /api/edit/configs | List saved configs (requires active organization) |
| POST /api/edit/configs | Create config (name, description, instructions, config object) |
| GET /api/edit/configs/:id | Get a config by ID |
| PATCH /api/edit/configs/:id | Update config (partial) |
| DELETE /api/edit/configs/:id | Delete config |
Projects and batch
| Area | Endpoints | Description |
|---|---|---|
| Projects | GET/POST /api/edit/projects, GET /api/edit/projects/:id, GET /api/edit/projects/:id/runs, POST /api/edit/projects/:id/rerun | List, create, get project; list runs; rerun (new version with optional verify). |
| Batch | POST /api/edit/batch, GET /api/edit/batch/:id | Create batch (document_ids, optional edit_config_id or config); get batch status and results. |
Audit and verify
| Endpoint | Description |
|---|---|
| GET /api/edit/audit | Query params: document_id, from (ISO date), to (ISO date). Returns edit audit log entries. |
| GET /api/edit/results/:job_id/audit-report | Audit report for the latest edit of the job: document ID, edit ID, timestamp, per-field label, value, source, reasoning. |
| POST /api/edit/verify | Request body: edit_id. Re-run post-fill verification on that edit. |
API overview
| Endpoint | Description |
|---|---|
| POST /api/edit/detect | Detect fillable elements in a document |
| POST /api/edit/run | Fill document with instructions and/or mappings |
| POST /api/edit/verify | Re-run post-fill verification on an edit |
| GET /api/edit/audit | Edit audit log by document and date range |
| GET /api/edit/results/:job_id/audit-report | Audit report for latest edit of a job |
| GET/POST /api/edit/configs, GET/PATCH/DELETE /api/edit/configs/:id | Saved edit configurations |
| GET/POST /api/edit/projects, GET /api/edit/projects/:id, POST rerun | Projects and version history |
| POST /api/edit/batch, GET /api/edit/batch/:id | Batch edit across multiple documents |
| GET/POST/PATCH/DELETE /api/edit/vocabulary | Vocabulary for normalizing terms |
| POST /api/edit/suggest | AI-suggested values for detected elements |
Edit: Questions & Answers
Ready to edit your documents?
Get started with the Edit API in minutes. Sign up for free or read the full API reference for detect, run, configs, projects, and batch.