I built a $0 alternative to $300/hr legal tech (and survived 190s API hangs doing it)
Description and use
A free, instant legal review tool that outputs red‑flag lists, negotiation emails, risk scores, and audio in seconds, built with parallel AI routers, hard timeouts, and self‑healing fallback chains.
Problem
Legal tech often forces users to upload sensitive documents to opaque systems, charge high hourly rates, or produce generic summaries that require legal expertise to interpret.
Outcome
The app delivers instant legal review and negotiation drafts for free, with a 95th‑percentile latency drop from 190 s to 6–8 s after implementing parallel routing, hard timeouts, and self‑healing fallback chains.
Workflow
- Upload or paste contract
- Select user role (e.g., Freelancer, Tenant)
- Parallel AI routers analyze text (red flags, email draft, risk score)
- Cache result for identical future inputs
- Generate audio via ElevenLabs with gTTS fallback
- Return results to user
Evidence
My first version took a staggering 190 seconds to return a result. I was completely blind to why until I wrapped the main pipeline in a @sentry_sdk.trace decorator.
I added hard 10-second timeouts to every client and strict token budgets. If a model hangs or throws a gateway error, the router instantly kills the connection and hops to the next one.
To make the app feel truly production-ready, I added a simple dictionary-based response cache keyed to the hash of the input text.
The Decommissioned Model: Mid-build, Groq quietly deprecated an older Llama model I was relying on.
- Record date: 2026-10-17T16:41:05.842Z