> 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.

# Submit documents

POST https://summarize.emtelligent.com/v1/jobs
Content-Type: application/json

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

Reference: https://docs.emtelligent.com/summarization/api/jobs/submit-job-v-1-jobs-post

## Authentication

- `Authorization` header (bearer token, required) — Customer API key or OAuth 2.0 access token (scope `summarization:process`)

## Request

### Headers

- `idempotency-key` (string, optional, nullable) — 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_.:-]

### Body (application/json)

This endpoint expects a JobRequest.

- `prompt` (string, required) — 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
- `document` (DocumentIn, optional, nullable) — One document. Send it alone, or instead use any of `documents`, `prep_documents` and `nlp_results` (they can be combined)
- `documents` (list of DocumentItemIn, optional, nullable) — 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_documents` (list of PrepDocumentIn, optional, nullable) — 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_results` (list of NlpResultIn, optional, nullable) — 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_bundles` (list of map from string to any, optional, nullable) — 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_metadata` (map from string to DocumentMetadataIn, optional, nullable) — Chart dates and subjects by document `id` (or position, for documents without one), over any of `documents`, `prep_documents`, `nlp_results` and `fhir_bundles`
- `patient` (SubjectIn, optional, nullable) — Who every document should concern. With several documents, the summary carries a warning if they appear not to
- `options` (OptionsIn, optional)

## Response

### 200

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

- `id` (string, required)
- `type` ("summary", required)
- `status` (enum, required) — `expired`: the result was downloaded or the 24-hour window passed
  - Allowed values: `queued`, `running`, `succeeded`, `failed`, `canceled`, `expired`
- `created_at` (string, required) — UTC, `YYYY-MM-DDTHH:MM:SSZ`
- `expires_at` (string, required) — When the job and any unread result are deleted
- `result_available` (boolean, required)
- `started_at` (string, optional, nullable)
- `completed_at` (string, optional, nullable)
- `error` (JobError, optional, nullable) — Present when `status` is `failed`
- `progress` (JobProgress, optional, nullable) — While `running`, for jobs with several documents

### 202

Accepted and queued

- `id` (string, required)
- `type` ("summary", required)
- `status` (enum, required) — `expired`: the result was downloaded or the 24-hour window passed
  - Allowed values: `queued`, `running`, `succeeded`, `failed`, `canceled`, `expired`
- `created_at` (string, required) — UTC, `YYYY-MM-DDTHH:MM:SSZ`
- `expires_at` (string, required) — When the job and any unread result are deleted
- `result_available` (boolean, required)
- `started_at` (string, optional, nullable)
- `completed_at` (string, optional, nullable)
- `error` (JobError, optional, nullable) — Present when `status` is `failed`
- `progress` (JobProgress, optional, nullable) — While `running`, for jobs with several documents

## Errors

### 400 Bad Request Error

Invalid document, prompt, JSON or Idempotency-Key; both or neither of `document` and `documents`; duplicate document ids

- `error` (ErrorDetail, required)

### 401 Unauthorized Error

Missing, unknown or unscoped credentials

- `error` (ErrorDetail, required)

### 402 Payment Required Error

Organization suspended

- `error` (ErrorDetail, required)

### 409 Conflict Error

Idempotency-Key reused with a different body

- `error` (ErrorDetail, required)

### 413 Content Too Large Error

Document, prompt or body too large, or too many documents

- `error` (ErrorDetail, required)

### 422 Unprocessable Entity Error

Wrong request shape; names the fields, never echoes values

- `error` (ErrorDetail, required)

### 429 Too Many Requests Error

Organization rate or active-job limit; see Retry-After

- `error` (ErrorDetail, required)

### 503 Service Unavailable Error

Temporarily unavailable

- `error` (ErrorDetail, required)

## Types

### DocumentIn

- `text` (string, required) — The clinical document as UTF-8 text, at most 64 KiB
- `category` (string, optional, nullable) — Document category, e.g. `Discharge Summary`. Omit it to have the type detected automatically (recommended)
- `subcategory` (string, optional, nullable) — Document subcategory. Omit it to have the type detected automatically (recommended)

### DocumentItemIn

- `text` (string, required) — The clinical document as UTF-8 text, at most 64 KiB
- `category` (string, optional, nullable) — Document category, e.g. `Discharge Summary`. Omit it to have the type detected automatically (recommended)
- `subcategory` (string, optional, nullable) — Document subcategory. Omit it to have the type detected automatically (recommended)
- `id` (string, optional, nullable) — Your reference for this document, unique within the job; citations in the summary point to it. Defaults to the document's position (`1`, `2`, …)
- `chart_date` (date, optional, nullable) — The document's clinical date (`YYYY-MM-DD`). More recent documents are given precedence; undated documents are treated as the oldest
- `subject` (SubjectIn, optional, nullable) — Who the document concerns, if you know. Used to check that all documents concern the same patient

### PrepDocumentIn

One line of a Prep JSONL file (`id`, `text`, `category`, `subcategory` and `documentmetadata` columns). Fields not listed are ignored.

- `id` (string, optional, nullable) — Used as the document's id when it is 1-64 of [A-Za-z0-9_.:-]; otherwise the line's position is
- `text` (string, optional, nullable) — The document's text. Required
- `pdf` (string, optional, nullable) — Ignored: the text is used. Leave it out to keep the request small
- `category` (string, optional, nullable)
- `subcategory` (string, optional, nullable)
- `chartdate` (string, optional, nullable) — `YYYY-MM-DD[ hh:mm:ss]`
- `subject_id` (string, optional, nullable)
- `subject_name` (string, optional, nullable)
- `subject_dob` (string, optional, nullable)
- `subject_gender` (string, optional, nullable)

### NlpResultIn

An NLP API result as it returns it (`format` `emtellipro-json-2`), e.g. the saved output of an earlier pipeline. Each of its `documents` (with `text`) is summarized.

- `format` (string, required) — `emtellipro-json-2`
- `documents` (list of map from string to any, required)
- `version` (string, optional, nullable)

### DocumentMetadataIn

- `chart_date` (date, optional, nullable) — As `documents[].chart_date`
- `subject` (SubjectIn, optional, nullable) — As `documents[].subject`

### SubjectIn

Who a document concerns. Compared across the job's documents, never returned or stored beyond the job.

- `id` (string, optional, nullable) — Your identifier for the patient
- `name` (string, optional, nullable)
- `dob` (string, optional, nullable) — Date of birth, e.g. `1950-02-03`
- `sex` (string, optional, nullable) — `male` or `female`
- `mrn` (string, optional, nullable) — Medical record number

### OptionsIn

- `check_patient` (boolean, optional, default: true) — With several documents, check that they concern one patient, including documents that come without patient details (recommended; adds a few seconds). A mismatch is reported as a warning; the summary is still written

### JobError

- `code` (string, required) — Why the job failed, e.g. `insufficient_credit`, `document_too_long`

### JobProgress

- `stage` (enum, required) — The current stage, for showing progress
  - Allowed values: `reading`, `summarizing`
- `done` (integer, required)
- `total` (integer, required) — 0 when not known in advance

### ErrorDetail

- `code` (string, required) — Stable machine-readable code, e.g. `invalid_credentials`
- `message` (string, required) — Human-readable summary. Never echoes submitted content
- `request_id` (string, required) — Quote this to support; also in `X-Request-Id`

## Examples

### A summary for the primary care physician

**Request**

```json
{
  "prompt": "Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.",
  "document": {
    "text": "DISCHARGE SUMMARY\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks."
  }
}
```

**Response**

```json
{
  "id": "job_8f2c1d0e9b7a6c5d4e3f2a1b",
  "type": "string",
  "status": "queued",
  "created_at": "string",
  "expires_at": "string",
  "result_available": true,
  "started_at": "string",
  "completed_at": "string",
  "error": {
    "code": "string"
  },
  "progress": {
    "stage": "reading",
    "done": 1,
    "total": 1
  }
}
```

**SDK Code**

```python A summary for the primary care physician
import requests

url = "https://summarize.emtelligent.com/v1/jobs"

payload = {
    "prompt": "Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.",
    "document": { "text": "DISCHARGE SUMMARY
Admitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.
Discharge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.
Follow-up: primary care in 1 week; repeat chest X-ray in 6 weeks." }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript A summary for the primary care physician
const url = 'https://summarize.emtelligent.com/v1/jobs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"prompt":"Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.","document":{"text":"DISCHARGE SUMMARY\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks."}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go A summary for the primary care physician
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://summarize.emtelligent.com/v1/jobs"

	payload := strings.NewReader("{\n  \"prompt\": \"Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.\",\n  \"document\": {\n    \"text\": \"DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby A summary for the primary care physician
require 'uri'
require 'net/http'

url = URI("https://summarize.emtelligent.com/v1/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"prompt\": \"Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.\",\n  \"document\": {\n    \"text\": \"DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java A summary for the primary care physician
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://summarize.emtelligent.com/v1/jobs")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"prompt\": \"Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.\",\n  \"document\": {\n    \"text\": \"DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.\"\n  }\n}")
  .asString();
```

```php A summary for the primary care physician
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://summarize.emtelligent.com/v1/jobs', [
  'body' => '{
  "prompt": "Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.",
  "document": {
    "text": "DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks."
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp A summary for the primary care physician
using RestSharp;

var client = new RestClient("https://summarize.emtelligent.com/v1/jobs");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"prompt\": \"Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.\",\n  \"document\": {\n    \"text\": \"DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift A summary for the primary care physician
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "prompt": "Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.",
  "document": ["text": "DISCHARGE SUMMARY
Admitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.
Discharge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.
Follow-up: primary care in 1 week; repeat chest X-ray in 6 weeks."]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://summarize.emtelligent.com/v1/jobs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### A summary for the primary care physician

**Request**

```json
{
  "prompt": "Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.",
  "document": {
    "text": "DISCHARGE SUMMARY\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks."
  }
}
```

**Response**

```json
{
  "id": "job_c98217191c6fa760bb01bea8",
  "type": "summary",
  "status": "queued",
  "created_at": "2026-10-17T23:49:11Z",
  "expires_at": "2026-10-18T23:49:11Z",
  "result_available": false
}
```

**SDK Code**

```python A summary for the primary care physician
import requests

url = "https://summarize.emtelligent.com/v1/jobs"

payload = {
    "prompt": "Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.",
    "document": { "text": "DISCHARGE SUMMARY
Admitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.
Discharge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.
Follow-up: primary care in 1 week; repeat chest X-ray in 6 weeks." }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript A summary for the primary care physician
const url = 'https://summarize.emtelligent.com/v1/jobs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"prompt":"Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.","document":{"text":"DISCHARGE SUMMARY\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks."}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go A summary for the primary care physician
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://summarize.emtelligent.com/v1/jobs"

	payload := strings.NewReader("{\n  \"prompt\": \"Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.\",\n  \"document\": {\n    \"text\": \"DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby A summary for the primary care physician
require 'uri'
require 'net/http'

url = URI("https://summarize.emtelligent.com/v1/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"prompt\": \"Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.\",\n  \"document\": {\n    \"text\": \"DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java A summary for the primary care physician
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://summarize.emtelligent.com/v1/jobs")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"prompt\": \"Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.\",\n  \"document\": {\n    \"text\": \"DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.\"\n  }\n}")
  .asString();
```

```php A summary for the primary care physician
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://summarize.emtelligent.com/v1/jobs', [
  'body' => '{
  "prompt": "Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.",
  "document": {
    "text": "DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks."
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp A summary for the primary care physician
using RestSharp;

var client = new RestClient("https://summarize.emtelligent.com/v1/jobs");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"prompt\": \"Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.\",\n  \"document\": {\n    \"text\": \"DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift A summary for the primary care physician
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "prompt": "Summarize the hospital course, active problems and discharge medications for the primary care physician, in under 120 words.",
  "document": ["text": "DISCHARGE SUMMARY
Admitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.
Discharge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.
Follow-up: primary care in 1 week; repeat chest X-ray in 6 weeks."]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://summarize.emtelligent.com/v1/jobs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Several documents about one patient

**Request**

```json
{
  "prompt": "Summarize the course since admission and the current plan for the cardiology referral.",
  "documents": [
    {
      "text": "DISCHARGE SUMMARY\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.",
      "id": "discharge",
      "chart_date": "2026-09-14"
    },
    {
      "text": "Clinic follow-up. Breathing improved, no edema. Weight down 2 kg. Continue furosemide 40 mg daily; recheck potassium in one week.",
      "id": "clinic-follow-up",
      "chart_date": "2026-10-02"
    }
  ],
  "patient": {
    "dob": "1958-04-11"
  }
}
```

**Response**

```json
{
  "id": "job_6499ca86b4c619a3ba63f8e7",
  "type": "summary",
  "status": "queued",
  "created_at": "2026-10-17T23:49:11Z",
  "expires_at": "2026-10-18T23:49:11Z",
  "result_available": false
}
```

**SDK Code**

```python Several documents about one patient
import requests

url = "https://summarize.emtelligent.com/v1/jobs"

payload = {
    "prompt": "Summarize the course since admission and the current plan for the cardiology referral.",
    "documents": [
        {
            "text": "DISCHARGE SUMMARY
Admitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.
Discharge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.
Follow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.",
            "id": "discharge",
            "chart_date": "2026-09-14"
        },
        {
            "text": "Clinic follow-up. Breathing improved, no edema. Weight down 2 kg. Continue furosemide 40 mg daily; recheck potassium in one week.",
            "id": "clinic-follow-up",
            "chart_date": "2026-10-02"
        }
    ],
    "patient": { "dob": "1958-04-11" }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Several documents about one patient
const url = 'https://summarize.emtelligent.com/v1/jobs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"prompt":"Summarize the course since admission and the current plan for the cardiology referral.","documents":[{"text":"DISCHARGE SUMMARY\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.","id":"discharge","chart_date":"2026-09-14"},{"text":"Clinic follow-up. Breathing improved, no edema. Weight down 2 kg. Continue furosemide 40 mg daily; recheck potassium in one week.","id":"clinic-follow-up","chart_date":"2026-10-02"}],"patient":{"dob":"1958-04-11"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Several documents about one patient
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://summarize.emtelligent.com/v1/jobs"

	payload := strings.NewReader("{\n  \"prompt\": \"Summarize the course since admission and the current plan for the cardiology referral.\",\n  \"documents\": [\n    {\n      \"text\": \"DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.\",\n      \"id\": \"discharge\",\n      \"chart_date\": \"2026-09-14\"\n    },\n    {\n      \"text\": \"Clinic follow-up. Breathing improved, no edema. Weight down 2 kg. Continue furosemide 40 mg daily; recheck potassium in one week.\",\n      \"id\": \"clinic-follow-up\",\n      \"chart_date\": \"2026-10-02\"\n    }\n  ],\n  \"patient\": {\n    \"dob\": \"1958-04-11\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Several documents about one patient
require 'uri'
require 'net/http'

url = URI("https://summarize.emtelligent.com/v1/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"prompt\": \"Summarize the course since admission and the current plan for the cardiology referral.\",\n  \"documents\": [\n    {\n      \"text\": \"DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.\",\n      \"id\": \"discharge\",\n      \"chart_date\": \"2026-09-14\"\n    },\n    {\n      \"text\": \"Clinic follow-up. Breathing improved, no edema. Weight down 2 kg. Continue furosemide 40 mg daily; recheck potassium in one week.\",\n      \"id\": \"clinic-follow-up\",\n      \"chart_date\": \"2026-10-02\"\n    }\n  ],\n  \"patient\": {\n    \"dob\": \"1958-04-11\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Several documents about one patient
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://summarize.emtelligent.com/v1/jobs")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"prompt\": \"Summarize the course since admission and the current plan for the cardiology referral.\",\n  \"documents\": [\n    {\n      \"text\": \"DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.\",\n      \"id\": \"discharge\",\n      \"chart_date\": \"2026-09-14\"\n    },\n    {\n      \"text\": \"Clinic follow-up. Breathing improved, no edema. Weight down 2 kg. Continue furosemide 40 mg daily; recheck potassium in one week.\",\n      \"id\": \"clinic-follow-up\",\n      \"chart_date\": \"2026-10-02\"\n    }\n  ],\n  \"patient\": {\n    \"dob\": \"1958-04-11\"\n  }\n}")
  .asString();
```

```php Several documents about one patient
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://summarize.emtelligent.com/v1/jobs', [
  'body' => '{
  "prompt": "Summarize the course since admission and the current plan for the cardiology referral.",
  "documents": [
    {
      "text": "DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.",
      "id": "discharge",
      "chart_date": "2026-09-14"
    },
    {
      "text": "Clinic follow-up. Breathing improved, no edema. Weight down 2 kg. Continue furosemide 40 mg daily; recheck potassium in one week.",
      "id": "clinic-follow-up",
      "chart_date": "2026-10-02"
    }
  ],
  "patient": {
    "dob": "1958-04-11"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Several documents about one patient
using RestSharp;

var client = new RestClient("https://summarize.emtelligent.com/v1/jobs");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"prompt\": \"Summarize the course since admission and the current plan for the cardiology referral.\",\n  \"documents\": [\n    {\n      \"text\": \"DISCHARGE SUMMARY\\nAdmitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.\\nDischarge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.\\nFollow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.\",\n      \"id\": \"discharge\",\n      \"chart_date\": \"2026-09-14\"\n    },\n    {\n      \"text\": \"Clinic follow-up. Breathing improved, no edema. Weight down 2 kg. Continue furosemide 40 mg daily; recheck potassium in one week.\",\n      \"id\": \"clinic-follow-up\",\n      \"chart_date\": \"2026-10-02\"\n    }\n  ],\n  \"patient\": {\n    \"dob\": \"1958-04-11\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Several documents about one patient
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "prompt": "Summarize the course since admission and the current plan for the cardiology referral.",
  "documents": [
    [
      "text": "DISCHARGE SUMMARY
Admitted 2026-09-02 with community-acquired pneumonia of the right lower lobe. History of type 2 diabetes mellitus and hypertension. Treated with IV ceftriaxone and azithromycin, switched to oral amoxicillin-clavulanate on day 3. Blood glucose was poorly controlled on admission (HbA1c 8.9%); metformin was increased to 1000 mg twice daily. Afebrile for 48 hours, oxygen saturation 96% on room air at discharge on 2026-09-06.
Discharge medications: amoxicillin-clavulanate 875/125 mg twice daily for 4 more days; metformin 1000 mg twice daily; lisinopril 10 mg daily.
Follow-up: primary care in 1 week; repeat chest X-ray in 6 weeks.",
      "id": "discharge",
      "chart_date": "2026-09-14"
    ],
    [
      "text": "Clinic follow-up. Breathing improved, no edema. Weight down 2 kg. Continue furosemide 40 mg daily; recheck potassium in one week.",
      "id": "clinic-follow-up",
      "chart_date": "2026-10-02"
    ]
  ],
  "patient": ["dob": "1958-04-11"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://summarize.emtelligent.com/v1/jobs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Documents from Prep's JSONL output

**Request**

```json
{
  "prompt": "Summarize the cardiac and pulmonary findings for a referral letter.",
  "prep_documents": [
    {
      "id": "c9753dce15074d719c30ca4727721fa6-0001",
      "text": "ECG Report. Impression: Sinus bradycardia. Otherwise normal ECG.",
      "category": "Cardiology",
      "subcategory": "ECG",
      "chartdate": "2022-03-04",
      "subject_id": "11110001",
      "subject_dob": "1966-08-01 04:10:48"
    },
    {
      "id": "c9753dce15074d719c30ca4727721fa6-0002",
      "text": "CT chest. Impression: Bibasilar fibrotic changes, unchanged.",
      "category": "Radiology",
      "subcategory": "CT",
      "chartdate": "2022-05-10",
      "subject_id": "11110001"
    }
  ]
}
```

**Response**

```json
{
  "id": "job_bcbcb46196ec8f669c89b44b",
  "type": "summary",
  "status": "queued",
  "created_at": "2026-10-17T23:49:11Z",
  "expires_at": "2026-10-18T23:49:11Z",
  "result_available": false
}
```

**SDK Code**

```python Documents from Prep's JSONL output
import requests

url = "https://summarize.emtelligent.com/v1/jobs"

payload = {
    "prompt": "Summarize the cardiac and pulmonary findings for a referral letter.",
    "prep_documents": [
        {
            "id": "c9753dce15074d719c30ca4727721fa6-0001",
            "text": "ECG Report. Impression: Sinus bradycardia. Otherwise normal ECG.",
            "category": "Cardiology",
            "subcategory": "ECG",
            "chartdate": "2022-03-04",
            "subject_id": "11110001",
            "subject_dob": "1966-08-01 04:10:48"
        },
        {
            "id": "c9753dce15074d719c30ca4727721fa6-0002",
            "text": "CT chest. Impression: Bibasilar fibrotic changes, unchanged.",
            "category": "Radiology",
            "subcategory": "CT",
            "chartdate": "2022-05-10",
            "subject_id": "11110001"
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Documents from Prep's JSONL output
const url = 'https://summarize.emtelligent.com/v1/jobs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"prompt":"Summarize the cardiac and pulmonary findings for a referral letter.","prep_documents":[{"id":"c9753dce15074d719c30ca4727721fa6-0001","text":"ECG Report. Impression: Sinus bradycardia. Otherwise normal ECG.","category":"Cardiology","subcategory":"ECG","chartdate":"2022-03-04","subject_id":"11110001","subject_dob":"1966-08-01 04:10:48"},{"id":"c9753dce15074d719c30ca4727721fa6-0002","text":"CT chest. Impression: Bibasilar fibrotic changes, unchanged.","category":"Radiology","subcategory":"CT","chartdate":"2022-05-10","subject_id":"11110001"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Documents from Prep's JSONL output
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://summarize.emtelligent.com/v1/jobs"

	payload := strings.NewReader("{\n  \"prompt\": \"Summarize the cardiac and pulmonary findings for a referral letter.\",\n  \"prep_documents\": [\n    {\n      \"id\": \"c9753dce15074d719c30ca4727721fa6-0001\",\n      \"text\": \"ECG Report. Impression: Sinus bradycardia. Otherwise normal ECG.\",\n      \"category\": \"Cardiology\",\n      \"subcategory\": \"ECG\",\n      \"chartdate\": \"2022-03-04\",\n      \"subject_id\": \"11110001\",\n      \"subject_dob\": \"1966-08-01 04:10:48\"\n    },\n    {\n      \"id\": \"c9753dce15074d719c30ca4727721fa6-0002\",\n      \"text\": \"CT chest. Impression: Bibasilar fibrotic changes, unchanged.\",\n      \"category\": \"Radiology\",\n      \"subcategory\": \"CT\",\n      \"chartdate\": \"2022-05-10\",\n      \"subject_id\": \"11110001\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Documents from Prep's JSONL output
require 'uri'
require 'net/http'

url = URI("https://summarize.emtelligent.com/v1/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"prompt\": \"Summarize the cardiac and pulmonary findings for a referral letter.\",\n  \"prep_documents\": [\n    {\n      \"id\": \"c9753dce15074d719c30ca4727721fa6-0001\",\n      \"text\": \"ECG Report. Impression: Sinus bradycardia. Otherwise normal ECG.\",\n      \"category\": \"Cardiology\",\n      \"subcategory\": \"ECG\",\n      \"chartdate\": \"2022-03-04\",\n      \"subject_id\": \"11110001\",\n      \"subject_dob\": \"1966-08-01 04:10:48\"\n    },\n    {\n      \"id\": \"c9753dce15074d719c30ca4727721fa6-0002\",\n      \"text\": \"CT chest. Impression: Bibasilar fibrotic changes, unchanged.\",\n      \"category\": \"Radiology\",\n      \"subcategory\": \"CT\",\n      \"chartdate\": \"2022-05-10\",\n      \"subject_id\": \"11110001\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Documents from Prep's JSONL output
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://summarize.emtelligent.com/v1/jobs")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"prompt\": \"Summarize the cardiac and pulmonary findings for a referral letter.\",\n  \"prep_documents\": [\n    {\n      \"id\": \"c9753dce15074d719c30ca4727721fa6-0001\",\n      \"text\": \"ECG Report. Impression: Sinus bradycardia. Otherwise normal ECG.\",\n      \"category\": \"Cardiology\",\n      \"subcategory\": \"ECG\",\n      \"chartdate\": \"2022-03-04\",\n      \"subject_id\": \"11110001\",\n      \"subject_dob\": \"1966-08-01 04:10:48\"\n    },\n    {\n      \"id\": \"c9753dce15074d719c30ca4727721fa6-0002\",\n      \"text\": \"CT chest. Impression: Bibasilar fibrotic changes, unchanged.\",\n      \"category\": \"Radiology\",\n      \"subcategory\": \"CT\",\n      \"chartdate\": \"2022-05-10\",\n      \"subject_id\": \"11110001\"\n    }\n  ]\n}")
  .asString();
```

```php Documents from Prep's JSONL output
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://summarize.emtelligent.com/v1/jobs', [
  'body' => '{
  "prompt": "Summarize the cardiac and pulmonary findings for a referral letter.",
  "prep_documents": [
    {
      "id": "c9753dce15074d719c30ca4727721fa6-0001",
      "text": "ECG Report. Impression: Sinus bradycardia. Otherwise normal ECG.",
      "category": "Cardiology",
      "subcategory": "ECG",
      "chartdate": "2022-03-04",
      "subject_id": "11110001",
      "subject_dob": "1966-08-01 04:10:48"
    },
    {
      "id": "c9753dce15074d719c30ca4727721fa6-0002",
      "text": "CT chest. Impression: Bibasilar fibrotic changes, unchanged.",
      "category": "Radiology",
      "subcategory": "CT",
      "chartdate": "2022-05-10",
      "subject_id": "11110001"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Documents from Prep's JSONL output
using RestSharp;

var client = new RestClient("https://summarize.emtelligent.com/v1/jobs");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"prompt\": \"Summarize the cardiac and pulmonary findings for a referral letter.\",\n  \"prep_documents\": [\n    {\n      \"id\": \"c9753dce15074d719c30ca4727721fa6-0001\",\n      \"text\": \"ECG Report. Impression: Sinus bradycardia. Otherwise normal ECG.\",\n      \"category\": \"Cardiology\",\n      \"subcategory\": \"ECG\",\n      \"chartdate\": \"2022-03-04\",\n      \"subject_id\": \"11110001\",\n      \"subject_dob\": \"1966-08-01 04:10:48\"\n    },\n    {\n      \"id\": \"c9753dce15074d719c30ca4727721fa6-0002\",\n      \"text\": \"CT chest. Impression: Bibasilar fibrotic changes, unchanged.\",\n      \"category\": \"Radiology\",\n      \"subcategory\": \"CT\",\n      \"chartdate\": \"2022-05-10\",\n      \"subject_id\": \"11110001\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Documents from Prep's JSONL output
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "prompt": "Summarize the cardiac and pulmonary findings for a referral letter.",
  "prep_documents": [
    [
      "id": "c9753dce15074d719c30ca4727721fa6-0001",
      "text": "ECG Report. Impression: Sinus bradycardia. Otherwise normal ECG.",
      "category": "Cardiology",
      "subcategory": "ECG",
      "chartdate": "2022-03-04",
      "subject_id": "11110001",
      "subject_dob": "1966-08-01 04:10:48"
    ],
    [
      "id": "c9753dce15074d719c30ca4727721fa6-0002",
      "text": "CT chest. Impression: Bibasilar fibrotic changes, unchanged.",
      "category": "Radiology",
      "subcategory": "CT",
      "chartdate": "2022-05-10",
      "subject_id": "11110001"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://summarize.emtelligent.com/v1/jobs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### NLP API results you already have

**Request**

```json
{
  "prompt": "Summarize the cardiac findings.",
  "nlp_results": [
    {
      "format": "emtellipro-json-2",
      "documents": [
        {
          "attributes": {
            "category": {
              "value": "Cardiology"
            },
            "subcategory": {
              "value": "ECG"
            }
          },
          "concepts": {
            "snomed": [
              {
                "concept_id": "49710005",
                "description": "Sinus bradycardia (disorder)",
                "label": "Csnomed0"
              }
            ]
          },
          "entities": {
            "found": [
              {
                "attributes": {
                  "polarity": "asserted"
                },
                "concept_links": [
                  "Csnomed0"
                ],
                "label": "E0",
                "spans": [
                  {
                    "end": 29,
                    "start": 12
                  }
                ],
                "text": [
                  "Sinus bradycardia"
                ]
              }
            ]
          },
          "id": "ecg-1",
          "processing_status": "success",
          "relations": {
            "measurements": []
          },
          "text": "Impression: Sinus bradycardia."
        }
      ],
      "version": "2.37.0"
    }
  ],
  "document_metadata": {
    "ecg-1": {
      "chart_date": "2022-03-04"
    }
  }
}
```

**Response**

```json
{
  "id": "job_b1f79c7c0fd8feaa29a7726c",
  "type": "summary",
  "status": "queued",
  "created_at": "2026-10-17T23:49:11Z",
  "expires_at": "2026-10-18T23:49:11Z",
  "result_available": false
}
```

**SDK Code**

```python NLP API results you already have
import requests

url = "https://summarize.emtelligent.com/v1/jobs"

payload = {
    "prompt": "Summarize the cardiac findings.",
    "nlp_results": [
        {
            "format": "emtellipro-json-2",
            "documents": [
                {
                    "attributes": {
                        "category": { "value": "Cardiology" },
                        "subcategory": { "value": "ECG" }
                    },
                    "concepts": { "snomed": [
                            {
                                "concept_id": "49710005",
                                "description": "Sinus bradycardia (disorder)",
                                "label": "Csnomed0"
                            }
                        ] },
                    "entities": { "found": [
                            {
                                "attributes": { "polarity": "asserted" },
                                "concept_links": ["Csnomed0"],
                                "label": "E0",
                                "spans": [
                                    {
                                        "end": 29,
                                        "start": 12
                                    }
                                ],
                                "text": ["Sinus bradycardia"]
                            }
                        ] },
                    "id": "ecg-1",
                    "processing_status": "success",
                    "relations": { "measurements": [] },
                    "text": "Impression: Sinus bradycardia."
                }
            ],
            "version": "2.37.0"
        }
    ],
    "document_metadata": { "ecg-1": { "chart_date": "2022-03-04" } }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript NLP API results you already have
const url = 'https://summarize.emtelligent.com/v1/jobs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"prompt":"Summarize the cardiac findings.","nlp_results":[{"format":"emtellipro-json-2","documents":[{"attributes":{"category":{"value":"Cardiology"},"subcategory":{"value":"ECG"}},"concepts":{"snomed":[{"concept_id":"49710005","description":"Sinus bradycardia (disorder)","label":"Csnomed0"}]},"entities":{"found":[{"attributes":{"polarity":"asserted"},"concept_links":["Csnomed0"],"label":"E0","spans":[{"end":29,"start":12}],"text":["Sinus bradycardia"]}]},"id":"ecg-1","processing_status":"success","relations":{"measurements":[]},"text":"Impression: Sinus bradycardia."}],"version":"2.37.0"}],"document_metadata":{"ecg-1":{"chart_date":"2022-03-04"}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go NLP API results you already have
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://summarize.emtelligent.com/v1/jobs"

	payload := strings.NewReader("{\n  \"prompt\": \"Summarize the cardiac findings.\",\n  \"nlp_results\": [\n    {\n      \"format\": \"emtellipro-json-2\",\n      \"documents\": [\n        {\n          \"attributes\": {\n            \"category\": {\n              \"value\": \"Cardiology\"\n            },\n            \"subcategory\": {\n              \"value\": \"ECG\"\n            }\n          },\n          \"concepts\": {\n            \"snomed\": [\n              {\n                \"concept_id\": \"49710005\",\n                \"description\": \"Sinus bradycardia (disorder)\",\n                \"label\": \"Csnomed0\"\n              }\n            ]\n          },\n          \"entities\": {\n            \"found\": [\n              {\n                \"attributes\": {\n                  \"polarity\": \"asserted\"\n                },\n                \"concept_links\": [\n                  \"Csnomed0\"\n                ],\n                \"label\": \"E0\",\n                \"spans\": [\n                  {\n                    \"end\": 29,\n                    \"start\": 12\n                  }\n                ],\n                \"text\": [\n                  \"Sinus bradycardia\"\n                ]\n              }\n            ]\n          },\n          \"id\": \"ecg-1\",\n          \"processing_status\": \"success\",\n          \"relations\": {\n            \"measurements\": []\n          },\n          \"text\": \"Impression: Sinus bradycardia.\"\n        }\n      ],\n      \"version\": \"2.37.0\"\n    }\n  ],\n  \"document_metadata\": {\n    \"ecg-1\": {\n      \"chart_date\": \"2022-03-04\"\n    }\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby NLP API results you already have
require 'uri'
require 'net/http'

url = URI("https://summarize.emtelligent.com/v1/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"prompt\": \"Summarize the cardiac findings.\",\n  \"nlp_results\": [\n    {\n      \"format\": \"emtellipro-json-2\",\n      \"documents\": [\n        {\n          \"attributes\": {\n            \"category\": {\n              \"value\": \"Cardiology\"\n            },\n            \"subcategory\": {\n              \"value\": \"ECG\"\n            }\n          },\n          \"concepts\": {\n            \"snomed\": [\n              {\n                \"concept_id\": \"49710005\",\n                \"description\": \"Sinus bradycardia (disorder)\",\n                \"label\": \"Csnomed0\"\n              }\n            ]\n          },\n          \"entities\": {\n            \"found\": [\n              {\n                \"attributes\": {\n                  \"polarity\": \"asserted\"\n                },\n                \"concept_links\": [\n                  \"Csnomed0\"\n                ],\n                \"label\": \"E0\",\n                \"spans\": [\n                  {\n                    \"end\": 29,\n                    \"start\": 12\n                  }\n                ],\n                \"text\": [\n                  \"Sinus bradycardia\"\n                ]\n              }\n            ]\n          },\n          \"id\": \"ecg-1\",\n          \"processing_status\": \"success\",\n          \"relations\": {\n            \"measurements\": []\n          },\n          \"text\": \"Impression: Sinus bradycardia.\"\n        }\n      ],\n      \"version\": \"2.37.0\"\n    }\n  ],\n  \"document_metadata\": {\n    \"ecg-1\": {\n      \"chart_date\": \"2022-03-04\"\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java NLP API results you already have
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://summarize.emtelligent.com/v1/jobs")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"prompt\": \"Summarize the cardiac findings.\",\n  \"nlp_results\": [\n    {\n      \"format\": \"emtellipro-json-2\",\n      \"documents\": [\n        {\n          \"attributes\": {\n            \"category\": {\n              \"value\": \"Cardiology\"\n            },\n            \"subcategory\": {\n              \"value\": \"ECG\"\n            }\n          },\n          \"concepts\": {\n            \"snomed\": [\n              {\n                \"concept_id\": \"49710005\",\n                \"description\": \"Sinus bradycardia (disorder)\",\n                \"label\": \"Csnomed0\"\n              }\n            ]\n          },\n          \"entities\": {\n            \"found\": [\n              {\n                \"attributes\": {\n                  \"polarity\": \"asserted\"\n                },\n                \"concept_links\": [\n                  \"Csnomed0\"\n                ],\n                \"label\": \"E0\",\n                \"spans\": [\n                  {\n                    \"end\": 29,\n                    \"start\": 12\n                  }\n                ],\n                \"text\": [\n                  \"Sinus bradycardia\"\n                ]\n              }\n            ]\n          },\n          \"id\": \"ecg-1\",\n          \"processing_status\": \"success\",\n          \"relations\": {\n            \"measurements\": []\n          },\n          \"text\": \"Impression: Sinus bradycardia.\"\n        }\n      ],\n      \"version\": \"2.37.0\"\n    }\n  ],\n  \"document_metadata\": {\n    \"ecg-1\": {\n      \"chart_date\": \"2022-03-04\"\n    }\n  }\n}")
  .asString();
```

```php NLP API results you already have
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://summarize.emtelligent.com/v1/jobs', [
  'body' => '{
  "prompt": "Summarize the cardiac findings.",
  "nlp_results": [
    {
      "format": "emtellipro-json-2",
      "documents": [
        {
          "attributes": {
            "category": {
              "value": "Cardiology"
            },
            "subcategory": {
              "value": "ECG"
            }
          },
          "concepts": {
            "snomed": [
              {
                "concept_id": "49710005",
                "description": "Sinus bradycardia (disorder)",
                "label": "Csnomed0"
              }
            ]
          },
          "entities": {
            "found": [
              {
                "attributes": {
                  "polarity": "asserted"
                },
                "concept_links": [
                  "Csnomed0"
                ],
                "label": "E0",
                "spans": [
                  {
                    "end": 29,
                    "start": 12
                  }
                ],
                "text": [
                  "Sinus bradycardia"
                ]
              }
            ]
          },
          "id": "ecg-1",
          "processing_status": "success",
          "relations": {
            "measurements": []
          },
          "text": "Impression: Sinus bradycardia."
        }
      ],
      "version": "2.37.0"
    }
  ],
  "document_metadata": {
    "ecg-1": {
      "chart_date": "2022-03-04"
    }
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp NLP API results you already have
using RestSharp;

var client = new RestClient("https://summarize.emtelligent.com/v1/jobs");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"prompt\": \"Summarize the cardiac findings.\",\n  \"nlp_results\": [\n    {\n      \"format\": \"emtellipro-json-2\",\n      \"documents\": [\n        {\n          \"attributes\": {\n            \"category\": {\n              \"value\": \"Cardiology\"\n            },\n            \"subcategory\": {\n              \"value\": \"ECG\"\n            }\n          },\n          \"concepts\": {\n            \"snomed\": [\n              {\n                \"concept_id\": \"49710005\",\n                \"description\": \"Sinus bradycardia (disorder)\",\n                \"label\": \"Csnomed0\"\n              }\n            ]\n          },\n          \"entities\": {\n            \"found\": [\n              {\n                \"attributes\": {\n                  \"polarity\": \"asserted\"\n                },\n                \"concept_links\": [\n                  \"Csnomed0\"\n                ],\n                \"label\": \"E0\",\n                \"spans\": [\n                  {\n                    \"end\": 29,\n                    \"start\": 12\n                  }\n                ],\n                \"text\": [\n                  \"Sinus bradycardia\"\n                ]\n              }\n            ]\n          },\n          \"id\": \"ecg-1\",\n          \"processing_status\": \"success\",\n          \"relations\": {\n            \"measurements\": []\n          },\n          \"text\": \"Impression: Sinus bradycardia.\"\n        }\n      ],\n      \"version\": \"2.37.0\"\n    }\n  ],\n  \"document_metadata\": {\n    \"ecg-1\": {\n      \"chart_date\": \"2022-03-04\"\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift NLP API results you already have
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "prompt": "Summarize the cardiac findings.",
  "nlp_results": [
    [
      "format": "emtellipro-json-2",
      "documents": [
        [
          "attributes": [
            "category": ["value": "Cardiology"],
            "subcategory": ["value": "ECG"]
          ],
          "concepts": ["snomed": [
              [
                "concept_id": "49710005",
                "description": "Sinus bradycardia (disorder)",
                "label": "Csnomed0"
              ]
            ]],
          "entities": ["found": [
              [
                "attributes": ["polarity": "asserted"],
                "concept_links": ["Csnomed0"],
                "label": "E0",
                "spans": [
                  [
                    "end": 29,
                    "start": 12
                  ]
                ],
                "text": ["Sinus bradycardia"]
              ]
            ]],
          "id": "ecg-1",
          "processing_status": "success",
          "relations": ["measurements": []],
          "text": "Impression: Sinus bradycardia."
        ]
      ],
      "version": "2.37.0"
    ]
  ],
  "document_metadata": ["ecg-1": ["chart_date": "2022-03-04"]]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://summarize.emtelligent.com/v1/jobs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### A FHIR R4 bundle

**Request**

```json
{
  "prompt": "Summarize the admission and the diabetes control for the patient's GP.",
  "fhir_bundles": [
    {
      "entry": [
        {
          "fullUrl": "urn:uuid:patient-1",
          "resource": {
            "birthDate": "1958-04-11",
            "gender": "male",
            "id": "patient-1",
            "resourceType": "Patient"
          }
        },
        {
          "fullUrl": "urn:uuid:note-1",
          "resource": {
            "content": [
              {
                "attachment": {
                  "contentType": "text/plain; charset=utf-8",
                  "data": "RElTQ0hBUkdFIFNVTU1BUlkKQWRtaXR0ZWQgd2l0aCBjb21tdW5pdHktYWNxdWlyZWQgcG5ldW1vbmlhOyB0cmVhdGVkIHdpdGggY2VmdHJpYXhvbmUsIHN3aXRjaGVkIHRvIG9yYWwgYW1veGljaWxsaW4gb24gZGF5IDMuIEJhY2tncm91bmQ6IHR5cGUgMiBkaWFiZXRlcy4gRGlzY2hhcmdlZCBob21lIG9uIGRheSA0OyBHUCByZXZpZXcgaW4gb25lIHdlZWsuCg=="
                }
              }
            ],
            "date": "2026-09-14T10:00:00Z",
            "id": "note-1",
            "resourceType": "DocumentReference",
            "status": "current",
            "subject": {
              "reference": "urn:uuid:patient-1"
            },
            "type": {
              "text": "Discharge Summary"
            }
          }
        },
        {
          "fullUrl": "urn:uuid:condition-1",
          "resource": {
            "clinicalStatus": {
              "coding": [
                {
                  "code": "active"
                }
              ]
            },
            "code": {
              "text": "Type 2 diabetes mellitus"
            },
            "id": "condition-1",
            "resourceType": "Condition",
            "subject": {
              "reference": "urn:uuid:patient-1"
            }
          }
        },
        {
          "fullUrl": "urn:uuid:obs-1",
          "resource": {
            "category": [
              {
                "coding": [
                  {
                    "code": "laboratory"
                  }
                ]
              }
            ],
            "code": {
              "text": "Hemoglobin A1c"
            },
            "effectiveDateTime": "2026-09-13",
            "id": "obs-1",
            "resourceType": "Observation",
            "status": "final",
            "subject": {
              "reference": "urn:uuid:patient-1"
            },
            "valueQuantity": {
              "unit": "%",
              "value": 8.9
            }
          }
        }
      ],
      "resourceType": "Bundle",
      "type": "transaction"
    }
  ]
}
```

**Response**

```json
{
  "id": "job_1b839958b49006cfeaf61df8",
  "type": "summary",
  "status": "queued",
  "created_at": "2026-10-17T23:49:11Z",
  "expires_at": "2026-10-18T23:49:11Z",
  "result_available": false
}
```

**SDK Code**

```python A FHIR R4 bundle
import requests

url = "https://summarize.emtelligent.com/v1/jobs"

payload = {
    "prompt": "Summarize the admission and the diabetes control for the patient's GP.",
    "fhir_bundles": [
        {
            "entry": [
                {
                    "fullUrl": "urn:uuid:patient-1",
                    "resource": {
                        "birthDate": "1958-04-11",
                        "gender": "male",
                        "id": "patient-1",
                        "resourceType": "Patient"
                    }
                },
                {
                    "fullUrl": "urn:uuid:note-1",
                    "resource": {
                        "content": [{ "attachment": {
                                    "contentType": "text/plain; charset=utf-8",
                                    "data": "RElTQ0hBUkdFIFNVTU1BUlkKQWRtaXR0ZWQgd2l0aCBjb21tdW5pdHktYWNxdWlyZWQgcG5ldW1vbmlhOyB0cmVhdGVkIHdpdGggY2VmdHJpYXhvbmUsIHN3aXRjaGVkIHRvIG9yYWwgYW1veGljaWxsaW4gb24gZGF5IDMuIEJhY2tncm91bmQ6IHR5cGUgMiBkaWFiZXRlcy4gRGlzY2hhcmdlZCBob21lIG9uIGRheSA0OyBHUCByZXZpZXcgaW4gb25lIHdlZWsuCg=="
                                } }],
                        "date": "2026-09-14T10:00:00Z",
                        "id": "note-1",
                        "resourceType": "DocumentReference",
                        "status": "current",
                        "subject": { "reference": "urn:uuid:patient-1" },
                        "type": { "text": "Discharge Summary" }
                    }
                },
                {
                    "fullUrl": "urn:uuid:condition-1",
                    "resource": {
                        "clinicalStatus": { "coding": [{ "code": "active" }] },
                        "code": { "text": "Type 2 diabetes mellitus" },
                        "id": "condition-1",
                        "resourceType": "Condition",
                        "subject": { "reference": "urn:uuid:patient-1" }
                    }
                },
                {
                    "fullUrl": "urn:uuid:obs-1",
                    "resource": {
                        "category": [{ "coding": [{ "code": "laboratory" }] }],
                        "code": { "text": "Hemoglobin A1c" },
                        "effectiveDateTime": "2026-09-13",
                        "id": "obs-1",
                        "resourceType": "Observation",
                        "status": "final",
                        "subject": { "reference": "urn:uuid:patient-1" },
                        "valueQuantity": {
                            "unit": "%",
                            "value": 8.9
                        }
                    }
                }
            ],
            "resourceType": "Bundle",
            "type": "transaction"
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript A FHIR R4 bundle
const url = 'https://summarize.emtelligent.com/v1/jobs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"prompt":"Summarize the admission and the diabetes control for the patient\'s GP.","fhir_bundles":[{"entry":[{"fullUrl":"urn:uuid:patient-1","resource":{"birthDate":"1958-04-11","gender":"male","id":"patient-1","resourceType":"Patient"}},{"fullUrl":"urn:uuid:note-1","resource":{"content":[{"attachment":{"contentType":"text/plain; charset=utf-8","data":"RElTQ0hBUkdFIFNVTU1BUlkKQWRtaXR0ZWQgd2l0aCBjb21tdW5pdHktYWNxdWlyZWQgcG5ldW1vbmlhOyB0cmVhdGVkIHdpdGggY2VmdHJpYXhvbmUsIHN3aXRjaGVkIHRvIG9yYWwgYW1veGljaWxsaW4gb24gZGF5IDMuIEJhY2tncm91bmQ6IHR5cGUgMiBkaWFiZXRlcy4gRGlzY2hhcmdlZCBob21lIG9uIGRheSA0OyBHUCByZXZpZXcgaW4gb25lIHdlZWsuCg=="}}],"date":"2026-09-14T10:00:00Z","id":"note-1","resourceType":"DocumentReference","status":"current","subject":{"reference":"urn:uuid:patient-1"},"type":{"text":"Discharge Summary"}}},{"fullUrl":"urn:uuid:condition-1","resource":{"clinicalStatus":{"coding":[{"code":"active"}]},"code":{"text":"Type 2 diabetes mellitus"},"id":"condition-1","resourceType":"Condition","subject":{"reference":"urn:uuid:patient-1"}}},{"fullUrl":"urn:uuid:obs-1","resource":{"category":[{"coding":[{"code":"laboratory"}]}],"code":{"text":"Hemoglobin A1c"},"effectiveDateTime":"2026-09-13","id":"obs-1","resourceType":"Observation","status":"final","subject":{"reference":"urn:uuid:patient-1"},"valueQuantity":{"unit":"%","value":8.9}}}],"resourceType":"Bundle","type":"transaction"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go A FHIR R4 bundle
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://summarize.emtelligent.com/v1/jobs"

	payload := strings.NewReader("{\n  \"prompt\": \"Summarize the admission and the diabetes control for the patient's GP.\",\n  \"fhir_bundles\": [\n    {\n      \"entry\": [\n        {\n          \"fullUrl\": \"urn:uuid:patient-1\",\n          \"resource\": {\n            \"birthDate\": \"1958-04-11\",\n            \"gender\": \"male\",\n            \"id\": \"patient-1\",\n            \"resourceType\": \"Patient\"\n          }\n        },\n        {\n          \"fullUrl\": \"urn:uuid:note-1\",\n          \"resource\": {\n            \"content\": [\n              {\n                \"attachment\": {\n                  \"contentType\": \"text/plain; charset=utf-8\",\n                  \"data\": \"RElTQ0hBUkdFIFNVTU1BUlkKQWRtaXR0ZWQgd2l0aCBjb21tdW5pdHktYWNxdWlyZWQgcG5ldW1vbmlhOyB0cmVhdGVkIHdpdGggY2VmdHJpYXhvbmUsIHN3aXRjaGVkIHRvIG9yYWwgYW1veGljaWxsaW4gb24gZGF5IDMuIEJhY2tncm91bmQ6IHR5cGUgMiBkaWFiZXRlcy4gRGlzY2hhcmdlZCBob21lIG9uIGRheSA0OyBHUCByZXZpZXcgaW4gb25lIHdlZWsuCg==\"\n                }\n              }\n            ],\n            \"date\": \"2026-09-14T10:00:00Z\",\n            \"id\": \"note-1\",\n            \"resourceType\": \"DocumentReference\",\n            \"status\": \"current\",\n            \"subject\": {\n              \"reference\": \"urn:uuid:patient-1\"\n            },\n            \"type\": {\n              \"text\": \"Discharge Summary\"\n            }\n          }\n        },\n        {\n          \"fullUrl\": \"urn:uuid:condition-1\",\n          \"resource\": {\n            \"clinicalStatus\": {\n              \"coding\": [\n                {\n                  \"code\": \"active\"\n                }\n              ]\n            },\n            \"code\": {\n              \"text\": \"Type 2 diabetes mellitus\"\n            },\n            \"id\": \"condition-1\",\n            \"resourceType\": \"Condition\",\n            \"subject\": {\n              \"reference\": \"urn:uuid:patient-1\"\n            }\n          }\n        },\n        {\n          \"fullUrl\": \"urn:uuid:obs-1\",\n          \"resource\": {\n            \"category\": [\n              {\n                \"coding\": [\n                  {\n                    \"code\": \"laboratory\"\n                  }\n                ]\n              }\n            ],\n            \"code\": {\n              \"text\": \"Hemoglobin A1c\"\n            },\n            \"effectiveDateTime\": \"2026-09-13\",\n            \"id\": \"obs-1\",\n            \"resourceType\": \"Observation\",\n            \"status\": \"final\",\n            \"subject\": {\n              \"reference\": \"urn:uuid:patient-1\"\n            },\n            \"valueQuantity\": {\n              \"unit\": \"%\",\n              \"value\": 8.9\n            }\n          }\n        }\n      ],\n      \"resourceType\": \"Bundle\",\n      \"type\": \"transaction\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby A FHIR R4 bundle
require 'uri'
require 'net/http'

url = URI("https://summarize.emtelligent.com/v1/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"prompt\": \"Summarize the admission and the diabetes control for the patient's GP.\",\n  \"fhir_bundles\": [\n    {\n      \"entry\": [\n        {\n          \"fullUrl\": \"urn:uuid:patient-1\",\n          \"resource\": {\n            \"birthDate\": \"1958-04-11\",\n            \"gender\": \"male\",\n            \"id\": \"patient-1\",\n            \"resourceType\": \"Patient\"\n          }\n        },\n        {\n          \"fullUrl\": \"urn:uuid:note-1\",\n          \"resource\": {\n            \"content\": [\n              {\n                \"attachment\": {\n                  \"contentType\": \"text/plain; charset=utf-8\",\n                  \"data\": \"RElTQ0hBUkdFIFNVTU1BUlkKQWRtaXR0ZWQgd2l0aCBjb21tdW5pdHktYWNxdWlyZWQgcG5ldW1vbmlhOyB0cmVhdGVkIHdpdGggY2VmdHJpYXhvbmUsIHN3aXRjaGVkIHRvIG9yYWwgYW1veGljaWxsaW4gb24gZGF5IDMuIEJhY2tncm91bmQ6IHR5cGUgMiBkaWFiZXRlcy4gRGlzY2hhcmdlZCBob21lIG9uIGRheSA0OyBHUCByZXZpZXcgaW4gb25lIHdlZWsuCg==\"\n                }\n              }\n            ],\n            \"date\": \"2026-09-14T10:00:00Z\",\n            \"id\": \"note-1\",\n            \"resourceType\": \"DocumentReference\",\n            \"status\": \"current\",\n            \"subject\": {\n              \"reference\": \"urn:uuid:patient-1\"\n            },\n            \"type\": {\n              \"text\": \"Discharge Summary\"\n            }\n          }\n        },\n        {\n          \"fullUrl\": \"urn:uuid:condition-1\",\n          \"resource\": {\n            \"clinicalStatus\": {\n              \"coding\": [\n                {\n                  \"code\": \"active\"\n                }\n              ]\n            },\n            \"code\": {\n              \"text\": \"Type 2 diabetes mellitus\"\n            },\n            \"id\": \"condition-1\",\n            \"resourceType\": \"Condition\",\n            \"subject\": {\n              \"reference\": \"urn:uuid:patient-1\"\n            }\n          }\n        },\n        {\n          \"fullUrl\": \"urn:uuid:obs-1\",\n          \"resource\": {\n            \"category\": [\n              {\n                \"coding\": [\n                  {\n                    \"code\": \"laboratory\"\n                  }\n                ]\n              }\n            ],\n            \"code\": {\n              \"text\": \"Hemoglobin A1c\"\n            },\n            \"effectiveDateTime\": \"2026-09-13\",\n            \"id\": \"obs-1\",\n            \"resourceType\": \"Observation\",\n            \"status\": \"final\",\n            \"subject\": {\n              \"reference\": \"urn:uuid:patient-1\"\n            },\n            \"valueQuantity\": {\n              \"unit\": \"%\",\n              \"value\": 8.9\n            }\n          }\n        }\n      ],\n      \"resourceType\": \"Bundle\",\n      \"type\": \"transaction\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java A FHIR R4 bundle
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://summarize.emtelligent.com/v1/jobs")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"prompt\": \"Summarize the admission and the diabetes control for the patient's GP.\",\n  \"fhir_bundles\": [\n    {\n      \"entry\": [\n        {\n          \"fullUrl\": \"urn:uuid:patient-1\",\n          \"resource\": {\n            \"birthDate\": \"1958-04-11\",\n            \"gender\": \"male\",\n            \"id\": \"patient-1\",\n            \"resourceType\": \"Patient\"\n          }\n        },\n        {\n          \"fullUrl\": \"urn:uuid:note-1\",\n          \"resource\": {\n            \"content\": [\n              {\n                \"attachment\": {\n                  \"contentType\": \"text/plain; charset=utf-8\",\n                  \"data\": \"RElTQ0hBUkdFIFNVTU1BUlkKQWRtaXR0ZWQgd2l0aCBjb21tdW5pdHktYWNxdWlyZWQgcG5ldW1vbmlhOyB0cmVhdGVkIHdpdGggY2VmdHJpYXhvbmUsIHN3aXRjaGVkIHRvIG9yYWwgYW1veGljaWxsaW4gb24gZGF5IDMuIEJhY2tncm91bmQ6IHR5cGUgMiBkaWFiZXRlcy4gRGlzY2hhcmdlZCBob21lIG9uIGRheSA0OyBHUCByZXZpZXcgaW4gb25lIHdlZWsuCg==\"\n                }\n              }\n            ],\n            \"date\": \"2026-09-14T10:00:00Z\",\n            \"id\": \"note-1\",\n            \"resourceType\": \"DocumentReference\",\n            \"status\": \"current\",\n            \"subject\": {\n              \"reference\": \"urn:uuid:patient-1\"\n            },\n            \"type\": {\n              \"text\": \"Discharge Summary\"\n            }\n          }\n        },\n        {\n          \"fullUrl\": \"urn:uuid:condition-1\",\n          \"resource\": {\n            \"clinicalStatus\": {\n              \"coding\": [\n                {\n                  \"code\": \"active\"\n                }\n              ]\n            },\n            \"code\": {\n              \"text\": \"Type 2 diabetes mellitus\"\n            },\n            \"id\": \"condition-1\",\n            \"resourceType\": \"Condition\",\n            \"subject\": {\n              \"reference\": \"urn:uuid:patient-1\"\n            }\n          }\n        },\n        {\n          \"fullUrl\": \"urn:uuid:obs-1\",\n          \"resource\": {\n            \"category\": [\n              {\n                \"coding\": [\n                  {\n                    \"code\": \"laboratory\"\n                  }\n                ]\n              }\n            ],\n            \"code\": {\n              \"text\": \"Hemoglobin A1c\"\n            },\n            \"effectiveDateTime\": \"2026-09-13\",\n            \"id\": \"obs-1\",\n            \"resourceType\": \"Observation\",\n            \"status\": \"final\",\n            \"subject\": {\n              \"reference\": \"urn:uuid:patient-1\"\n            },\n            \"valueQuantity\": {\n              \"unit\": \"%\",\n              \"value\": 8.9\n            }\n          }\n        }\n      ],\n      \"resourceType\": \"Bundle\",\n      \"type\": \"transaction\"\n    }\n  ]\n}")
  .asString();
```

```php A FHIR R4 bundle
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://summarize.emtelligent.com/v1/jobs', [
  'body' => '{
  "prompt": "Summarize the admission and the diabetes control for the patient\'s GP.",
  "fhir_bundles": [
    {
      "entry": [
        {
          "fullUrl": "urn:uuid:patient-1",
          "resource": {
            "birthDate": "1958-04-11",
            "gender": "male",
            "id": "patient-1",
            "resourceType": "Patient"
          }
        },
        {
          "fullUrl": "urn:uuid:note-1",
          "resource": {
            "content": [
              {
                "attachment": {
                  "contentType": "text/plain; charset=utf-8",
                  "data": "RElTQ0hBUkdFIFNVTU1BUlkKQWRtaXR0ZWQgd2l0aCBjb21tdW5pdHktYWNxdWlyZWQgcG5ldW1vbmlhOyB0cmVhdGVkIHdpdGggY2VmdHJpYXhvbmUsIHN3aXRjaGVkIHRvIG9yYWwgYW1veGljaWxsaW4gb24gZGF5IDMuIEJhY2tncm91bmQ6IHR5cGUgMiBkaWFiZXRlcy4gRGlzY2hhcmdlZCBob21lIG9uIGRheSA0OyBHUCByZXZpZXcgaW4gb25lIHdlZWsuCg=="
                }
              }
            ],
            "date": "2026-09-14T10:00:00Z",
            "id": "note-1",
            "resourceType": "DocumentReference",
            "status": "current",
            "subject": {
              "reference": "urn:uuid:patient-1"
            },
            "type": {
              "text": "Discharge Summary"
            }
          }
        },
        {
          "fullUrl": "urn:uuid:condition-1",
          "resource": {
            "clinicalStatus": {
              "coding": [
                {
                  "code": "active"
                }
              ]
            },
            "code": {
              "text": "Type 2 diabetes mellitus"
            },
            "id": "condition-1",
            "resourceType": "Condition",
            "subject": {
              "reference": "urn:uuid:patient-1"
            }
          }
        },
        {
          "fullUrl": "urn:uuid:obs-1",
          "resource": {
            "category": [
              {
                "coding": [
                  {
                    "code": "laboratory"
                  }
                ]
              }
            ],
            "code": {
              "text": "Hemoglobin A1c"
            },
            "effectiveDateTime": "2026-09-13",
            "id": "obs-1",
            "resourceType": "Observation",
            "status": "final",
            "subject": {
              "reference": "urn:uuid:patient-1"
            },
            "valueQuantity": {
              "unit": "%",
              "value": 8.9
            }
          }
        }
      ],
      "resourceType": "Bundle",
      "type": "transaction"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp A FHIR R4 bundle
using RestSharp;

var client = new RestClient("https://summarize.emtelligent.com/v1/jobs");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"prompt\": \"Summarize the admission and the diabetes control for the patient's GP.\",\n  \"fhir_bundles\": [\n    {\n      \"entry\": [\n        {\n          \"fullUrl\": \"urn:uuid:patient-1\",\n          \"resource\": {\n            \"birthDate\": \"1958-04-11\",\n            \"gender\": \"male\",\n            \"id\": \"patient-1\",\n            \"resourceType\": \"Patient\"\n          }\n        },\n        {\n          \"fullUrl\": \"urn:uuid:note-1\",\n          \"resource\": {\n            \"content\": [\n              {\n                \"attachment\": {\n                  \"contentType\": \"text/plain; charset=utf-8\",\n                  \"data\": \"RElTQ0hBUkdFIFNVTU1BUlkKQWRtaXR0ZWQgd2l0aCBjb21tdW5pdHktYWNxdWlyZWQgcG5ldW1vbmlhOyB0cmVhdGVkIHdpdGggY2VmdHJpYXhvbmUsIHN3aXRjaGVkIHRvIG9yYWwgYW1veGljaWxsaW4gb24gZGF5IDMuIEJhY2tncm91bmQ6IHR5cGUgMiBkaWFiZXRlcy4gRGlzY2hhcmdlZCBob21lIG9uIGRheSA0OyBHUCByZXZpZXcgaW4gb25lIHdlZWsuCg==\"\n                }\n              }\n            ],\n            \"date\": \"2026-09-14T10:00:00Z\",\n            \"id\": \"note-1\",\n            \"resourceType\": \"DocumentReference\",\n            \"status\": \"current\",\n            \"subject\": {\n              \"reference\": \"urn:uuid:patient-1\"\n            },\n            \"type\": {\n              \"text\": \"Discharge Summary\"\n            }\n          }\n        },\n        {\n          \"fullUrl\": \"urn:uuid:condition-1\",\n          \"resource\": {\n            \"clinicalStatus\": {\n              \"coding\": [\n                {\n                  \"code\": \"active\"\n                }\n              ]\n            },\n            \"code\": {\n              \"text\": \"Type 2 diabetes mellitus\"\n            },\n            \"id\": \"condition-1\",\n            \"resourceType\": \"Condition\",\n            \"subject\": {\n              \"reference\": \"urn:uuid:patient-1\"\n            }\n          }\n        },\n        {\n          \"fullUrl\": \"urn:uuid:obs-1\",\n          \"resource\": {\n            \"category\": [\n              {\n                \"coding\": [\n                  {\n                    \"code\": \"laboratory\"\n                  }\n                ]\n              }\n            ],\n            \"code\": {\n              \"text\": \"Hemoglobin A1c\"\n            },\n            \"effectiveDateTime\": \"2026-09-13\",\n            \"id\": \"obs-1\",\n            \"resourceType\": \"Observation\",\n            \"status\": \"final\",\n            \"subject\": {\n              \"reference\": \"urn:uuid:patient-1\"\n            },\n            \"valueQuantity\": {\n              \"unit\": \"%\",\n              \"value\": 8.9\n            }\n          }\n        }\n      ],\n      \"resourceType\": \"Bundle\",\n      \"type\": \"transaction\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift A FHIR R4 bundle
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "prompt": "Summarize the admission and the diabetes control for the patient's GP.",
  "fhir_bundles": [
    [
      "entry": [
        [
          "fullUrl": "urn:uuid:patient-1",
          "resource": [
            "birthDate": "1958-04-11",
            "gender": "male",
            "id": "patient-1",
            "resourceType": "Patient"
          ]
        ],
        [
          "fullUrl": "urn:uuid:note-1",
          "resource": [
            "content": [["attachment": [
                  "contentType": "text/plain; charset=utf-8",
                  "data": "RElTQ0hBUkdFIFNVTU1BUlkKQWRtaXR0ZWQgd2l0aCBjb21tdW5pdHktYWNxdWlyZWQgcG5ldW1vbmlhOyB0cmVhdGVkIHdpdGggY2VmdHJpYXhvbmUsIHN3aXRjaGVkIHRvIG9yYWwgYW1veGljaWxsaW4gb24gZGF5IDMuIEJhY2tncm91bmQ6IHR5cGUgMiBkaWFiZXRlcy4gRGlzY2hhcmdlZCBob21lIG9uIGRheSA0OyBHUCByZXZpZXcgaW4gb25lIHdlZWsuCg=="
                ]]],
            "date": "2026-09-14T10:00:00Z",
            "id": "note-1",
            "resourceType": "DocumentReference",
            "status": "current",
            "subject": ["reference": "urn:uuid:patient-1"],
            "type": ["text": "Discharge Summary"]
          ]
        ],
        [
          "fullUrl": "urn:uuid:condition-1",
          "resource": [
            "clinicalStatus": ["coding": [["code": "active"]]],
            "code": ["text": "Type 2 diabetes mellitus"],
            "id": "condition-1",
            "resourceType": "Condition",
            "subject": ["reference": "urn:uuid:patient-1"]
          ]
        ],
        [
          "fullUrl": "urn:uuid:obs-1",
          "resource": [
            "category": [["coding": [["code": "laboratory"]]]],
            "code": ["text": "Hemoglobin A1c"],
            "effectiveDateTime": "2026-09-13",
            "id": "obs-1",
            "resourceType": "Observation",
            "status": "final",
            "subject": ["reference": "urn:uuid:patient-1"],
            "valueQuantity": [
              "unit": "%",
              "value": 8.9
            ]
          ]
        ]
      ],
      "resourceType": "Bundle",
      "type": "transaction"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://summarize.emtelligent.com/v1/jobs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```