The Edit endpoint fills forms and modifies documents based on natural language instructions. Provide a document and describe what to change — Aifano handles field detection, text placement, and formatting automatically.Credits: 4 credits per page
curl -X POST "https://platform.aifano.com/edit" \ -H "Authorization: Bearer $AIFANO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "document_url": "aifano://tax-form.pdf", "edit_instructions": "Fill this form with:\n- Full Name: John David Smith\n- Date of Birth: March 15, 1985\n- SSN: 123-45-6789\n- Check \"Yes\" for US Citizen\n- Select \"California\" for state" }'
For repeatable form filling, provide a form_schema with predefined field locations. This improves speed and consistency when processing the same form type multiple times:
The first time you edit a PDF form, the response includes a form_schema with detected fields. Save this schema and reuse it for subsequent edits of the same form type to improve accuracy and speed.