AI Field Setup
DocSpring can now set up a PDF template's fields for you. When you upload a PDF, it finds the fields on each page, and AI names them, chooses their types and adds conditional logic. Then you review everything in the template editor.

It works with both kinds of PDF form:
- Flat PDFs, such as scans: DocSpring finds the fields in the page layout.
- Fillable PDFs: DocSpring imports the PDF's form fields, renames them, and adds fields the form leaves out, such as a signature line that's only printed on the page.
AI also sets each field's title, description and whether it's required. It recognizes repeated rows as arrays, and sets up split boxes, such as an SSN, as comb fields.
When you upload a PDF
Automatically detect fields and Set up conditional logic with AI are both checked when you upload a PDF in the web app. Each page takes up to a minute. To add the fields yourself instead, click Skip and set up fields myself.

With conditional logic, AI reads the whole form and adds rules for fields that only apply in some situations. Each rule says why it was added, and you can edit or remove it with the Logic button in the editor.

Existing templates
Open Settings in the template editor and click Set Up Fields. You can detect the fields again, import the PDF's form fields, or keep your current fields and only rename generic ones like "Text1". With Review changes before applying, you see each suggested change and choose which ones to apply.

Field name language
Field names become the keys in your API data, so you can choose their language. Automatic uses the form's own language when it's written in the Latin alphabet, and English for other scripts. You can also choose Always English, or Same language as the form for any script.
New templates use the AI Field Name Language on the Template Settings page, in the left sidebar. To change the language of one template, choose a Field name language in Set Up Fields.
Check the fields before you publish
AI field setup gives you a starting point, so review the fields, names, types and rules before you publish the template. You can publish a new version once AI has finished setting up the fields.
Pricing and privacy
Every account gets 100 free AI pages each month. After that, each page AI sets up costs $0.25, paid from your credits (see how credits work). If your account can't pay for a run, new uploads still get their fields, without AI names or conditional logic.
DocSpring sends the page images and the detected fields to Anthropic's Claude models on Amazon Bedrock, in the same region as your account's data (US or EU).
API
Field detection is off by default for templates you create with the API, so it doesn't add fields when your integration adds its own. Send "detect_fields": true when you create a PDF template to turn it on. field_source, field_naming and field_logic work like the choices in Set Up Fields: where the fields come from, whether AI names them, and whether it sets up conditional logic. ai_field_naming_language chooses the language of the names. To know when the fields are ready, listen for the template.updated webhook, or poll the template's page_processing_statuses and field_logic_status.
Read more in Automatic Field Detection.