Medical bills are designed to be confusing. A family member of mine was
charged $3,200 for an ER visit — buried in the itemization were duplicate CPT
codes, an unitemized $620 supply fee, and a facility charge billed
out-of-network despite being in-network. The hospital said it "looked right."
She paid it.
Studies estimate up to 80% of medical bills contain errors, but disputing them requires understanding CPT codes, knowing which laws apply, and having the confidence to write a formal letter. Most people don't, so they just pay.
MedClear fixes that. Upload any medical bill or EOB and within seconds you get
a plain-English breakdown of every charge, flagged issues with estimated
savings, applicable patient rights laws, prioritized action steps, and a
dispute letter ready to send — no healthcare background required.
I built it on Next.js and Google Gemini 2.5 Flash, using structured JSON
output to guarantee reliable, type-safe analysis every time. Three API routes
handle everything: document analysis, letter generation, and a follow-up chat
that keeps your document in context. The whole app is stateless — no database,
no login.
The hardest challenges were handling scanned PDFs (which return empty text and
need to be routed through vision instead), validating image types precisely
enough to avoid opaque API rejections, and tuning the JSON schema so Gemini
returns clean data rather than filling optional fields with empty strings.
The biggest lesson: AI doesn't make this problem slightly easier — it makes it solvable for the first time at scale. What previously required a healthcare advocate can now run in a browser in 15 seconds, free, for anyone.
Built With
- google-gemini
- next.js
- tailwind
- typescript
Log in or sign up for Devpost to join the conversation.