Edit a PDF document by inferring form fields and filling them with provided instructions.
Either document OR template_id must be provided, but not both:
With document (standard flow):
With template_id (template-based flow, PDF only):
Note: The original model name (e.g., “retab-flash”) is preserved in the edit log. Model resolution to specific candidates happens internally during LLM calls.
Request for the infer_and_fill_schema endpoint.
Performs OCR + LLM inference to detect and fill form fields in the provided document.
If form_fields is provided (PDF only), the inference step is skipped and the
provided fields are used directly for filling.
Input document (PDF, DOCX, XLSX or PPTX).
Instructions to fill the form
LLM model to use for inference
Optional pre-defined form fields (PDF only). When provided, skips field inference and uses these fields directly.
Configuration for the edit request