Skip to main content
Generate a draft from the session’s transcript and context, then present it for clinician review. Scopes: scribe:generate to generate, scribe:read to retrieve, and scribe:write to save edits. The clinician needs access to the selected templates and generation entitlements.

Request generation

POST /sessions/{session_id}/consult-note
If you omit template_ids, Cortexa uses the session’s template selection or default. The default response is 200 text/event-stream. Process each output.delta as it arrives. The final output.ready contains the saved document, so you do not need to poll or fetch the result separately.

Receive the result

For multiple templates, track each document separately and wait for its output.ready. Completed output can arrive immediately without deltas. A disconnected stream is incomplete until every document has a result. See Streaming for the event format, failure handling, and resuming the same request after a disconnect. For background-only generation, add ?stream=false to receive a 202 receipt and follow Jobs. Example completed document:
The generated wording and content structure depend on the template and clinical inputs. rendered_text is the display text; do not assume a fixed schema for content across templates.

Save clinician edits

To edit a particular document, use its ID. To edit the latest completed consult note generated through the consult-note endpoint, use:
Replace base_version with the current value from the document you read. A stale version returns 409; retrieve the latest document and resolve the edits before saving again. If no completed consult note is available, this endpoint returns 409 CONSULT_NOTE_REQUIRED.

Write the result to your EHR

Save the reviewed result through your EHR API or an approved connector. To fill separate EHR fields, use note sections. Document PATCH requests save edits in Cortexa.