AiLawyer Docgen API
Legal documents, generated from your app.
Pass on what your user asked for, and we find the form and ask the questions. Or send the facts in one call. Get back a finished, state-specific lease, NDA, will or deed as a file you download and keep.
All 50 states + DC · test mode is free · files expire, sessions are yours to deletecurl https://api.129.212.147.181.sslip.io/v1/sessions \ -H "Authorization: Bearer $DOCGEN_API_KEY" \ -H "Docgen-Subject: wp_user:48213" \ -H "Content-Type: application/json" \ -d '{ "message": "I need a residential lease for my condo in Miami, Florida"}'201 · discovery It sounds like you need a Residential Lease Agreement. Is that right?
Three calls, one document
Start a session Pass on “lease for my condo in Miami”. The session finds the form and the state, and asks when it isn’t sure. Talk Your user answers one typed question at a time, or just chats. Generate Run the ready session's action. Stream the document, then download the files: links are temporary.
Guides
All guides →QuickstartFrom a test key to a downloaded documentAuthenticationAPI keys, and why only your server sends themSubjectsNaming your end user with Docgen-SubjectTest vs liveKeys, watermarks, billingSessionsFrom a request to a ready documentStreaming (SSE)Show the document as it is writtenIdempotencyRetry safely without double billingErrors and retriesEvery error code, and what to do nextRate limitsLimits per key and how to back offData lifetimeSessions and files expire after 7 daysJurisdictionsState codes, detection, coverage