Create Edit
Create an edit.
Fills the form fields of a document according to instructions and renders
the values into a PDF. Provide exactly one of document (a PDF, DOCX, XLSX,
or PPTX) or template_id (an existing edit template) — supplying both or
neither responds with 400. Returns the created edit with the filled form
data and rendered document; responds with 201.
Automatically detect fillable regions in a document (or reuse a pre-defined template) and apply the values described inDocumentation Index
Fetch the complete documentation index at: https://docs.retab.com/llms.txt
Use this file to discover all available pages before exploring further.
instructions. Persisted as an Edit resource, retrievable via GET /v1/edits/{edit_id}.
Either document or template_id must be provided; they are mutually exclusive.
Authorizations
Body
Public create-edit request body.
Instructions describing how to fill the form fields.
A file represented by its filename and a base64 data url.
- MIMEData
- FileRef
EditTemplate id to fill. When provided, uses the template's pre-defined form fields and empty PDF. Mutually exclusive with document.
The model to use for edit inference.
Edit configuration (rendering options).
If true, skip the LLM cache and force a fresh completion.
If true, run asynchronously: returns immediately with status 'queued' and an empty output. Poll GET /v1//{id} until status is terminal. Mutually exclusive with stream.
Response
Successful Response
An edit result: form-field values written onto a document or template PDF.
Unique identifier of the edit.
Information about the source file (input document or template PDF).
Model used for the edit operation.
Configuration used for the edit operation.
Free-form instructions supplied with the edit request.
Template id used when the edit was created from a template; null for direct-document edits.
The edit result: filled form fields and the rendered PDF. An empty sentinel until status == 'completed'; gate reads on status.
Lifecycle status. The synchronous path returns 'completed'. Background runs progress pending -> queued -> in_progress -> completed | failed | cancelled.
pending, queued, in_progress, completed, failed, cancelled Error details when a background run fails; null otherwise. Always present so consumers can read it without an existence check.
Durable file reference for the filled document, when materialized.
Usage information for the edit operation.