Skip to navigation

Submit documents

Queue a document (or several about one patient) and a prompt for summarization. Returns immediately; poll GET /v1/jobs/{id}, then fetch the result.

Authentication

AuthorizationBearer

Customer API key or OAuth 2.0 access token (scope summarization:process)

Headers

idempotency-keystring or nullOptional

Optional, recommended: retrying with the same key and body returns the original job instead of a new one (per organization, 24 h). 1-128 of [A-Za-z0-9_.:-]

Request

This endpoint expects an object.
promptstringRequired
What the summary should cover and how to write it, e.g. "Summarize the patient's active problems and medications for a referral letter." At most 8 KiB
documentobject or nullOptional

One document. Send it alone, or instead use any of documents, prep_documents and nlp_results (they can be combined)

documentslist of objects or nullOptional

Several documents about one patient, summarized as one: a single summary that cites them. At most 50, each at most 64 KiB, 1 MiB in total

prep_documentslist of objects or nullOptional

Documents as Prep produces them: the objects of its JSONL file (one per line), sent as an array. Each is summarized like an item of documents, with its id, category, chart date and subject details. Same limits as documents

nlp_resultslist of objects or nullOptional

NLP API results you already have (emtellipro-json-2, as returned, including the documents’ text); their documents are summarized. They have no dates or patient details; add those with document_metadata

fhir_bundleslist of maps from strings to any or nullOptional

FHIR R4 Bundles (e.g. from the Synth API). Each one’s clinical notes (DocumentReference with a text attachment) are summarized, along with its structured record — problems, medications, procedures, immunizations, allergies, encounters, laboratory results and vital signs — and the patient’s age and sex. Notes that can’t be read (e.g. PDF attachments) are skipped and named in a documents_skipped warning

document_metadatamap from strings to objects or nullOptional

Chart dates and subjects by document id (or position, for documents without one), over any of documents, prep_documents, nlp_results and fhir_bundles

patientobject or nullOptional
Who every document should concern. With several documents, the summary carries a warning if they appear not to
optionsobjectOptional

Response

Idempotent retry: the job already created with this Idempotency-Key

idstring
type"summary"
statusenum

expired: the result was downloaded or the 24-hour window passed

created_atstring

UTC, YYYY-MM-DDTHH:MM:SSZ

expires_atstring
When the job and any unread result are deleted
result_availableboolean
started_atstring or nullOptional
completed_atstring or nullOptional
errorobject or nullOptional

Present when status is failed

progressobject or nullOptional

While running, for jobs with several documents

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
409
Conflict Error
413
Content Too Large Error
422
Unprocessable Entity Error
429
Too Many Requests Error
503
Service Unavailable Error