Berhan Advisor – API Test

Base URL

GET /health

POST /legal-search/stream

Retrieval-grounded search: synthesized answer with citations. Messages in the same conversation are remembered.

(effort=medium, slower first token)

POST /legal-agent/stream

Legal consultant agent: advisory answers over any legal matter. Messages in the same conversation are remembered.

(effort=medium, slower first token)

POST /doc-agent/stream

Hybrid document + law consultant: understands your uploaded documents and Ethiopian law. Ask about specific clauses, obligations, risks, or anything in your docs. Messages in the same conversation are remembered.

POST /drafting/generate

Agent one-shot drafting: JSON body with nested metadata per drafting_metadata.schema.json (camelCase; required title, parties, governingLaw). Generates TipTap then auto-exports. Language: en | am.


    
    
    
    
  

POST /drafting/generate/stream

Document generation (ported from main API). Streams analysis / clarification / TipTap JSON. Use action=start, then message for follow-ups, or finalize to force generate.

POST /drafting/export

Convert TipTap JSON to PDF and/or DOCX, upload to Contabo Object Storage, return downloadable URLs. Uses the last generated document when available, or paste TipTap JSON below.

POST /drafting/compliance/analyze-stream

Same as sync /analyze, but streams Server-Sent Events: progress (phase + approximate %), then the full result. Lets you see retrieval, main analysis, and per-clause citation steps while they run.