Developer Platform
API documentation
Build on LexLathos — generate documents, manage drafts and integrate the advocate marketplace programmatically.
Authentication
Authenticate with a Clerk session token or an API key in the Authorization: Bearer <token> header.
Document generation
/api/generate authGenerate a legal document from a matter description, document type and language.
/api/modify authRefine an existing document — simplify, translate or add clauses.
/api/update authUpdate a saved draft's content or metadata.
/api/pdf authExport a draft as a PDF document.
Marketplace & consultations
/api/marketplace/advocatespublicList advocates with filters for practice area, city, language and sorting.
/api/marketplace/consultations authBook a consultation request with an advocate.
/api/marketplace/advocates/me authGet the signed-in advocate's profile.
/api/marketplace/advocates/[id]/reviews authSubmit a rating and review for an advocate.
/api/marketplace/requests/[id]/respond authAccept or decline an incoming consultation request.
/api/marketplace/requests/[id]/cancel authCancel a consultation request you sent.
Account, payments & content
/api/user authGet the signed-in user's profile and role.
/api/user/credits authGet the user's credit balance.
/api/payment/create authCreate a Razorpay order for credits or a plan.
/api/payment/verify authVerify a completed payment signature.
/api/subscription/cancel authCancel an active subscription.
/api/templatespublicList available document templates.
/api/invoices authList the user's payment invoices.
Try the API right now
You don't need a key in demo mode. Generate a document or list advocates from the product itself, or read the source endpoints under /api/*.