> ## Documentation Index
> Fetch the complete documentation index at: https://assemblyai.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Medical Mode

Medical Mode is an add-on that enhances transcription accuracy for medication names, including both generic and brand-name medications. It corrects medication names that other models frequently get wrong.

Medical Mode can be used with all of our Pre-recorded STT models.

Enable Medical Mode by setting the `domain` parameter to `"medical-v1"`. No changes to your existing pipeline are required.

## Quickstart

> [tab] Python
>
> To enable Medical Mode, set `domain` to `"medical-v1"` in the POST request body:
>
> ```python {11}  expandable theme={null}
> import requests
> import time
>
> base_url = "https://api.assemblyai.com"
> headers = {"authorization": "<YOUR_API_KEY>"}
>
> data = {
>     "audio_url": "https://assembly.ai/lispro",
>     "language_detection": True,
>     "domain": "medical-v1"
> }
>
> response = requests.post(base_url + "/v2/transcript", headers=headers, json=data)
>
> if response.status_code != 200:
>     print(f"Error: {response.status_code}, Response: {response.text}")
>     response.raise_for_status()
>
> transcript_response = response.json()
> transcript_id = transcript_response["id"]
> polling_endpoint = f"{base_url}/v2/transcript/{transcript_id}"
>
> while True:
>     transcript = requests.get(polling_endpoint, headers=headers).json()
>     if transcript["status"] == "completed":
>         print(transcript["text"])
>         break
>     elif transcript["status"] == "error":
>         raise RuntimeError(f"Transcription failed: {transcript['error']}")
>     else:
>         time.sleep(3)
> ```

> [tab] Python SDK
>
> To enable Medical Mode, set `domain` to `"medical-v1"` in the transcription config.
>
> ```python {12}  theme={null}
> from assemblyai.prerecorded.v2 import Transcriber, TranscriptionConfig
>
> # You can use a local filepath:
> # audio_file = "./example.mp3"
>
> # Or use a publicly-accessible URL:
> audio_file = "https://assembly.ai/lispro"
>
> config = TranscriptionConfig(
>     language_detection=True,
>     domain="medical-v1",
> )
>
> transcriber = Transcriber(api_key="<YOUR_API_KEY>")
> transcript = transcriber.transcribe(audio_file, config)
>
> print(transcript.text)
> ```

> [tab] JavaScript
>
> To enable Medical Mode, set `domain` to `"medical-v1"` in the POST request body:
>
> ```javascript {10}  expandable theme={null}
> const baseUrl = "https://api.assemblyai.com";
> const headers = {
>   authorization: "<YOUR_API_KEY>",
> };
>
> const data = {
>   audio_url: "https://assembly.ai/lispro",
>   language_detection: true,
>   domain: "medical-v1",
> };
>
> const url = `${baseUrl}/v2/transcript`;
> let res = await fetch(url, {
>   method: "POST",
>   headers: { ...headers, "Content-Type": "application/json" },
>   body: JSON.stringify(data),
> });
> if (!res.ok) throw new Error(`Error: ${res.status}`);
> const response = await res.json();
>
> const transcriptId = response.id;
> const pollingEndpoint = `${baseUrl}/v2/transcript/${transcriptId}`;
>
> while (true) {
>   res = await fetch(pollingEndpoint, { headers });
>   if (!res.ok) throw new Error(`Error: ${res.status}`);
>   const transcriptionResult = await res.json();
>
>   if (transcriptionResult.status === "completed") {
>     console.log(transcriptionResult.text);
>     break;
>   } else if (transcriptionResult.status === "error") {
>     throw new Error(`Transcription failed: ${transcriptionResult.error}`);
>   } else {
>     await new Promise((resolve) => setTimeout(resolve, 3000));
>   }
> }
> ```

> [tab] JavaScript SDK
>
> To enable Medical Mode, set `domain` to `"medical-v1"` in the transcription config.
>
> ```javascript {17}  expandable theme={null}
> import { AssemblyAI } from "assemblyai";
>
> const client = new AssemblyAI({
>   apiKey: "<YOUR_API_KEY>",
> });
>
> // You can use a local filepath:
> // const audioFile = "./example.mp3"
>
> // Or use a publicly-accessible URL:
> const audioFile = "https://assembly.ai/lispro";
>
> const params = {
>   audio: audioFile,
>   language_detection: true,
>   domain: "medical-v1",
> };
>
> const run = async () => {
>   const transcript = await client.transcripts.transcribe(params);
>   console.log(transcript.text);
> };
>
> run();
> ```

<audio controls>
  <source src="https://assemblyaiassets.com/56e2be1c-lispro.mp3" type="audio/mpeg" />

  Your browser does not support the audio element. [Download the audio](https://assemblyaiassets.com/56e2be1c-lispro.mp3).
</audio>

### Example output

Without Medical Mode:

```plain theme={null}
I have here insulin to be used for both prandial mealtime and sliding scale is
insulin lisprohumalog subcutaneously.
```

With Medical Mode, lisprohumalog is updated to Lispro (Humalog) - following the standard medical convention of writing the generic name first, with the brand name in parentheses.

```plain theme={null}
I have here insulin to be used for both prandial mealtime and sliding scale is
insulin Lispro (Humalog) subcutaneously.
```

## Use cases

Medical Mode is designed for healthcare AI applications where accurate medication names are critical:

* **Ambient clinical documentation** — Capture generic and brand-name medication names correctly in scribing workflows.
* **AI-powered clinical notes** — Generate clean transcripts for downstream LLMs producing SOAP notes, discharge summaries, and referral letters.
* **Front-office automation** — Capture medication names correctly in scheduling calls, insurance verification, and voice agents.
* **Multi-speaker clinical conversations** — Combine with [Speaker Diarization](https://assemblyai.com/docs/pre-recorded-audio/label-speakers.md) for provider/patient separation in telehealth, therapy documentation, and clinical settings.

## Combine with other features

Medical Mode works alongside other transcription features. You can combine it with:

* [Speaker Diarization](https://assemblyai.com/docs/pre-recorded-audio/label-speakers.md) to identify who said what in clinical conversations
* [Keyterms Prompting](https://assemblyai.com/docs/pre-recorded-audio/prompting.md#keyterms-prompting) to further boost accuracy for specific medical terms unique to your use case
* [PII Redaction](https://assemblyai.com/docs/pre-recorded-audio/redact-pii-from-transcripts.md) to redact sensitive patient information from transcripts

> [tab] Python
>
> ```python theme={null}
> data = {
>     "audio_url": "<YOUR_AUDIO_URL>",
>     "language_detection": True,
>     "domain": "medical-v1",
>     "speaker_labels": True,
>     "keyterms_prompt": ["Lisinopril", "Metformin", "Humalog"]
> }
> ```

> [tab] Python SDK
>
> ```python theme={null}
> config = TranscriptionConfig(
>     language_detection=True,
>     domain="medical-v1",
>     speaker_labels=True,
>     keyterms_prompt=["Lisinopril", "Metformin", "Humalog"],
> )
> ```

> [tab] JavaScript
>
> ```javascript theme={null}
> const data = {
>   audio_url: "<YOUR_AUDIO_URL>",
>   language_detection: true,
>   domain: "medical-v1",
>   speaker_labels: true,
>   keyterms_prompt: ["Lisinopril", "Metformin", "Humalog"],
> };
> ```

> [tab] JavaScript SDK
>
> ```javascript theme={null}
> const params = {
>   audio: audioFile,
>   language_detection: true,
>   domain: "medical-v1",
>   speaker_labels: true,
>   keyterms_prompt: ["Lisinopril", "Metformin", "Humalog"],
> };
> ```

> [!NOTE]
>
> Medical Mode supports English, Spanish, German, and French. If you use Medical Mode with an unsupported language, the API ignores the `domain` parameter and returns a warning indicating that Medical Mode was not applied: `"Skipped medical-v1 domain correction because the language is not supported"`
>
> Your transcript is still returned using standard transcription, and you will not be charged for Medical Mode.

## HIPAA compliance

AssemblyAI offers a Business Associate Agreement (BAA) for customers who need to process Protected Health Information (PHI). AssemblyAI is SOC 2 Type 2, ISO 27001:2022, and PCI DSS v4.0 certified. Medical Mode does not change existing data handling or retention policies.

Paid customers can review and sign our standard online BAA self-serve, at no additional cost, from the [**Data Controls** page](https://www.assemblyai.com/dashboard/settings/data-controls) in the dashboard. You must have an upgraded (paid) account to see the BAA option. See [Data Controls](https://assemblyai.com/docs/data-controls.md#business-associate-agreement-baa) for details, or [contact sales](https://www.assemblyai.com/contact/sales) for enterprise pricing.
