Public
Likellamaparse-compare
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
Interactive side-by-side viewer comparing LlamaParse v2 parsing tiers on real financial documents.
Live demo: viewer.ts endpoint
Rendering mermaid diagram...
Rendering mermaid diagram...
| Document | Pages | Type | Challenge |
|---|---|---|---|
| JPMorgan Q4 2025 Earnings Presentation | 21 | Slide deck | Charts, graphs, mixed text/image layouts |
| JPMorgan Q4 2025 Earnings Supplement | 29 | Financial tables | Dense nested tables, footnotes, merged cells |
| Tier | Credits/pg | $/page | Best For |
|---|---|---|---|
fast | 1 | $0.00125 | Quick text extraction, no AI |
cost_effective | 3 | $0.00375 | Standard docs, good accuracy/cost ratio |
agentic | 10 | $0.01250 | Complex layouts needing reasoning |
agentic_plus | 45 | $0.05625 | Maximum accuracy on dense financial docs |
(1,000 credits = $1.25 in North America)
JPMorgan Presentation (21 pages Γ 4 tiers):
| Tier | Credits | Cost | Output |
|---|---|---|---|
| fast | 21 | $0.026 | 55,097 chars (spatial text only) |
| cost_effective | 63 | $0.079 | 38,572 chars (markdown) |
| agentic | 210 | $0.263 | 38,683 chars (markdown) |
| agentic_plus | 945 | $1.181 | 38,646 chars (markdown) |
JPMorgan Supplement (29 pages Γ 4 tiers):
| Tier | Credits | Cost | Output |
|---|---|---|---|
| fast | 29 | $0.036 | 213,067 chars (spatial text only) |
| cost_effective | 87 | $0.109 | 186,036 chars (markdown) |
| agentic | 290 | $0.363 | 184,084 chars (markdown) |
| agentic_plus | 1,305 | $1.631 | 178,615 chars (markdown) |
Total for this demo: 2,950 credits = $3.69
- fast tier returns spatial text (no markdown structure), hence higher char counts from whitespace
- cost_effective vs agentic produce nearly identical output on these docs
- agentic_plus at 45 credits/page is 15Γ more expensive than cost_effective with marginal improvement
- For standard financial tables: cost_effective is the sweet spot
- For charts/images: agentic tiers may extract chart data more intelligently
| File | Type | Description |
|---|---|---|
dispatch.ts | Script | Sends PDFs to LlamaParse at 4 tiers, saves job manifest |
collect.ts | Script | Polls jobs, saves parsed markdown to blob storage |
viewer.ts | HTTP | Side-by-side PDF/markdown viewer with cost display |
check-pdfs.ts | Script | Utility to verify uploaded PDFs in blob storage |
Dispatch β POST /api/v2/parse/
{ "source_url": "https://...", "tier": "cost_effective", "version": "latest" }
Poll/Collect β GET /api/v2/parse/:job_id?expand=markdown
- Response:
data.job.statusβPENDING|COMPLETED|FAILED - Content:
data.markdown.pages[].markdown(sorted bypage_number) - Fast tier: use
?expand=textβdata.text.pages[].text
Key differences from v1:
- Tier-based instead of mode-based
source_urlparameter for public PDFs (no upload needed)- Response structure:
data.job.statusnotdata.status - 1-based page indexing (v1 was 0-based)