Skip to navigation

Result format

Job status, the result, and rendering the summary safely

Job status

GET /v1/jobs/{id} returns the job:

{
"id": "job_8f2c1d0e9b7a6c5d4e3f2a1b",
"type": "summary",
"status": "succeeded",
"created_at": "2026-10-15T14:02:11Z",
"started_at": "2026-10-15T14:02:11Z",
"completed_at": "2026-10-15T14:02:14Z",
"expires_at": "2026-10-16T14:02:11Z",
"result_available": true
}
statusMeaning
queuedAccepted, waiting to start
runningBeing summarized. Jobs with several documents also show progress
succeededFinished; download the result
failedFinished without a result; error.code says why. See Errors
canceledCanceled with DELETE /v1/jobs/{id}
expiredThe result was downloaded, or the 24 hours passed

Times are UTC, formatted YYYY-MM-DDTHH:MM:SSZ.

The result

GET /v1/jobs/{id}/result returns the result once. Store it on your side straight away: a second request returns 410 result_expired.

{
"id": "job_8f2c1d0e9b7a6c5d4e3f2a1b",
"type": "summary",
"summary": "**Active problems**\n- Community-acquired pneumonia, resolving [1] …",
"references": [{"ref": 1, "document": "discharge"},
{"ref": 2, "document": "gp-visit"}],
"warnings": [{"code": "documents_skipped",
"message": "some documents could not be read and were left out",
"documents": ["gp-visit"]}],
"stats": {"billed_pages": 6, "latency_ms": 18400, "documents": 2},
"pipeline_version": "2026.10.15-1"
}
Field
summaryThe summary, as Markdown
referencesOnly with several documents: what each citation [n] refers to — the id of a document you sent. Lists only the documents cited
warningsOnly when there is something to check before relying on the summary (below)
stats.billed_pagesWhat the job is billed. See Limits and billing
stats.latency_msProcessing time once the job started
stats.documentsOnly with several documents: how many were summarized
pipeline_versionThe release that produced the result

New fields may be added; ignore fields you do not recognise.

Warnings

codeMeaning
possible_patient_mismatchThe documents appear to concern more than one patient. documents names the ones that seem to concern a different patient, and fields gives the kinds of detail that disagree (for example name or dob); values are never returned. See One patient per job
citations_unresolvedSome citations did not match a document and were removed
patient_check_incompleteSome documents could not be checked for which patient they concern; documents names them
documents_skippedDocuments that could not be read were left out, e.g. FHIR notes given as PDF or as a link; documents names them. See FHIR bundles

The summary is produced in every case. Show warnings to the user next to it.

Rendering the summary

The summary is generated from your documents, and a document can contain text crafted to get unwanted content into it. The API returns it as an inert string; render it safely:

  • use a Markdown renderer that sanitizes: no raw HTML;
  • allow only http, https and mailto links — never javascript: or data:;
  • do not load remote images automatically; show them as links, or drop them;
  • never evaluate or execute anything in it.

To turn citations into links or chips, transform [n] in the rendered, sanitized text, using references to find each document. Do not build HTML by string substitution on the summary itself.

Deleting

DELETE /v1/jobs/{id} cancels a queued or running job, or deletes a result that has not been downloaded. Nothing is kept beyond 24 hours either way.