Most business documents carry the same few fields in a different layout every time. Structured outputs let you describe the fields once and get them back in exactly that shape.
What you need
- The Structured outputs guide.
- A handful of real documents to test against.
The shape of it
Describe the fields
Write down the fields you want and their types — invoice number, date, total, line items.
Ask for that shape
Send the document with the schema, and the response comes back matching it.
Check what came back
Validate the result before you store it, and send anything that fails to a person.
The complete recipe is on upfyn.com: Extract structured data.