> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emtelligent.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emtelligent.com/_mcp/server.

# Result format

## Job status

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

```json
{
  "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
}
```

| `status`    | Meaning                                                                                         |
| ----------- | ----------------------------------------------------------------------------------------------- |
| `queued`    | Accepted, waiting to start                                                                      |
| `running`   | Being summarized. Jobs with several documents also show `progress`                              |
| `succeeded` | Finished; download the result                                                                   |
| `failed`    | Finished without a result; `error.code` says why. See [Errors](/summarization/reference/errors) |
| `canceled`  | Canceled with `DELETE /v1/jobs/{id}`                                                            |
| `expired`   | The 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`.

```json
{
  "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                |                                                                                                                                   |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `summary`            | The summary, as Markdown                                                                                                          |
| `references`         | Only with several documents: what each citation `[n]` refers to — the `id` of a document you sent. Lists only the documents cited |
| `warnings`           | Only when there is something to check before relying on the summary (below)                                                       |
| `stats.billed_pages` | What the job is billed. See [Limits and billing](/summarization/reference/limits)                                                 |
| `stats.latency_ms`   | Processing time once the job started                                                                                              |
| `stats.documents`    | Only with several documents: how many were summarized                                                                             |
| `pipeline_version`   | The release that produced the result                                                                                              |

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

## Warnings

| `code`                      | Meaning                                                                                                                                                                                                                                                                                                                           |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `possible_patient_mismatch` | The 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](/summarization/guides/several-documents#one-patient-per-job) |
| `citations_unresolved`      | Some citations did not match a document and were removed                                                                                                                                                                                                                                                                          |
| `patient_check_incomplete`  | Some documents could not be checked for which patient they concern; `documents` names them                                                                                                                                                                                                                                        |
| `documents_skipped`         | Documents 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](/summarization/guides/fhir-bundles#what-is-left-out)                                                                                                                                        |

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.