Draft case document (E2)
Drafts a legal document from the case context. Jurisdiction is INHERITED from the case (NOT a parameter). The internal route's SSE is aggregated to JSON server-side. Loopback: the internal route is the only one that debits (3 cr × tier multiplier).
Request
- Base URL: https://legal.nexusquantum.legal
- URL: https://legal.nexusquantum.legal/api/v1/cases/{caseId}/draft
- Auth: HTTP bearer
Path parameters
Request body
Response
{ draft, citationChecks?, truncated?, chunksUsed?, chunksTotal?, corpusPartial?, piiResiduals?, citationsOrigenC[], killSwitch?, processingMs, requestId }. draft is the FINISHED text: personal data rehydrated and, when the document was cut short, the notice written INSIDE the body — not the raw model stream. ⚠️ truncated: false means the provider reported a clean stop. It does NOT mean completeness was verified: a provider that omits finish_reason — which the API permits, and under BYO the provider is the one your firm chose — produces text that stops mid-sentence and still arrives as truncated: false. chunksTotal is the denominator: without it, chunksUsed: 48 reads as the whole case file and may be 48 of 1,200. null there means the count could not be taken, which is NOT «there are no more». piiResiduals are anonymisation markers that could not be restored: the draft ships with placeholders where personal data belongs. piiResidualsFromCorpus vs piiResidualsInvented split the same markers by ORIGIN, because the actions are opposite: FROM-CORPUS means the marker was already in the case-file document and the map that would undo it is never stored (Zero Retention) — unrecoverable BY DESIGN, the privacy guarantee working, and only the firm can fill it in from its own source. INVENTED means the marker appears nowhere in the case file: the engine produced it and there is NO underlying value — delete or replace it, never read it as masked case data. Both are also written INTO draft, because a .docx that leaves the firm does not carry these fields. citationsOrigenC are citations absent from the case corpus — possible invention. killSwitch is null when the output watchdog ran and did not fire; absent means it was not run. It reports; it does not block.
Changes
No recorded changes to this operation across all 1 revision of this API.