PDF to structured data
Run document.parse (LlamaParse) on a vendor invoice PDF, then extract_structured to typed JSON. End-to-end in two calls.
Prerequisites
- document.parse enabled (LlamaParse-backed).
Walkthrough
1. Parse
Returns markdown that preserves tables and layout - much friendlier to LLMs than raw PDF text.
bash# LlamaParse converts PDF to structured markdown.
curl -X POST https://www.upivia.com/v1/service-requests \
-H "Authorization: Bearer $AGENT_KEY" \
-H "Content-Type: application/json" \
-d '{
"service":"document",
"operation":"parse",
"payload":{"url":"https://uploads.example.com/inv-001.pdf","mode":"markdown"}
}'2. Extract
Feed the markdown into text_generation.extract_structured with your invoice schema (see the 'Structured extraction' tutorial).
Next steps
Audit every call at /audit-logs, watch spend at /usage, and tune budgets per service on the agent's page.
Create an account →