Before you begin
- Complete sandbox onboarding and authentication.
- Load the returned Partner JWT into
CORTEXA_JWT. It needsscribe:read,scribe:write, andscribe:generate. - The authorized clinician needs an available consult-note template and generation entitlement.
- Run the commands in the same Bash shell with cURL and
jqavailable.
1. Create a synthetic patient
2. Create the consultation
3. Submit the conversation
full_text and transcript status.
For a longer conversation, submit multiple transcript batches.
4. Choose an available template
items. Load it into CORTEXA_TEMPLATE_ID:
5. Stream the note
200 response stays open while generation runs. You will see
generation.started, followed by text in output.delta events, and then an
output.ready event containing the saved document. No polling is needed.
Completed output may be returned immediately without deltas.
The command saves the synthetic response to cortexa-note-events.txt.
6. Read the completed note
This example requested one template. Extract its final document from the saved SSE events:?stream=false JSON mode for background integrations.
The final document includes rendered_text, structured content, status, and
current_version. Present the text for clinician review. To retain edits in
Cortexa, save a versioned document update. Use your own
EHR API to save the reviewed text into the mapped encounter.
Next steps
Use audio
Replace transcript submission with a complete recording upload.
Add background reports
Include relevant clinical context before generation.
Create additional outputs
Generate a referral or other document from the same session.
Handle real-world requests
Add retries, rate-limit handling, and version-conflict recovery.