Quickstart Code Example
Summarize a clinical document and read the summary back — in Python
This page submits one document with a prompt, waits for the job to finish, and
prints the summary. It uses only the requests library.
Create an API key with the summarization:process scope on the
emtelligent platform, then set it in the environment:
Create a session
Authenticate with the Authorization: Bearer header, using an API key or an
OAuth 2.0 access token.
Submit a job
The prompt says what the summary is for. The Idempotency-Key makes the
submission safe to retry: sending the same key and body again returns the
original job instead of creating, and charging for, a second one.
Wait for it to finish
Read the summary
The result can be downloaded once; store it if you need it again.
The summary is Markdown generated from your document. Render it with a sanitizing Markdown renderer — see Result format.
Several documents
To summarize several of a patient’s documents as one, send documents instead of
document. The summary cites them as [1], [2], …, and references maps each
number to your document’s id:
Poll and download it the same way, then:
See Several documents.

