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

# Veterinary Mode (beta)

Veterinary Mode is an add-on that enhances transcription accuracy for veterinary terminology, such as animal medication names, procedures, and conditions. Use it for veterinary use cases where general-purpose transcription frequently gets these terms wrong.

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

## Quickstart

> [tab] Python
>
> To enable Veterinary Mode, set `domain` to `"veterinary-v1"` in the POST request body:
>
> ```python {10}  expandable theme={null}
> import requests
> import time
>
> base_url = "https://api.assemblyai.com"
> headers = {"authorization": "<YOUR_API_KEY>"}
>
> data = {
>     "audio_url": "<YOUR_AUDIO_URL>",
>     "language_detection": True,
>     "domain": "veterinary-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 Veterinary Mode, set `domain` to `"veterinary-v1"` in the transcription config.
>
> ```python {11} 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 = "<YOUR_AUDIO_URL>"
>
> config = TranscriptionConfig(
>     language_detection=True,
>     domain="veterinary-v1",
> )
>
> transcriber = Transcriber(api_key="<YOUR_API_KEY>")
> transcript = transcriber.transcribe(audio_file, config)
>
> print(transcript.text)
> ```

> [tab] JavaScript
>
> To enable Veterinary Mode, set `domain` to `"veterinary-v1"` in the POST request body:
>
> ```javascript {9}  expandable theme={null}
> const baseUrl = "https://api.assemblyai.com";
> const headers = {
>   authorization: "<YOUR_API_KEY>",
> };
>
> const data = {
>   audio_url: "<YOUR_AUDIO_URL>",
>   language_detection: true,
>   domain: "veterinary-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 Veterinary Mode, set `domain` to `"veterinary-v1"` in the transcription config.
>
> ```javascript {16}  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 = "<YOUR_AUDIO_URL>";
>
> const params = {
>   audio: audioFile,
>   language_detection: true,
>   domain: "veterinary-v1",
> };
>
> const run = async () => {
>   const transcript = await client.transcripts.transcribe(params);
>   console.log(transcript.text);
> };
>
> run();
> ```

## Use cases

Veterinary Mode is designed for veterinary AI applications where accurate clinical terminology is critical:

* **Veterinary scribing**: Capture medication names and clinical terms correctly when documenting exams and consultations.
* **AI-powered clinical notes**: Generate clean transcripts for downstream LLMs producing SOAP notes, discharge instructions, and referral letters.
* **Front-office automation**: Handle drug names and clinic-specific terminology in scheduling calls, client follow-ups, and voice agents.
* **Multi-speaker consultations**: Combine with [Speaker Diarization](https://assemblyai.com/docs/pre-recorded-audio/label-speakers.md) to separate the veterinarian from the pet owner.

## Combine with other features

Veterinary 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 consultations
* [Keyterms Prompting](https://assemblyai.com/docs/pre-recorded-audio/universal-3-5-pro/prompting.md#keyterms-prompting) to further boost accuracy for specific terms unique to your practice

> [tab] Python
>
> ```python theme={null}
> data = {
>     "audio_url": "<YOUR_AUDIO_URL>",
>     "language_detection": True,
>     "domain": "veterinary-v1",
>     "speaker_labels": True,
>     "keyterms_prompt": ["Apoquel", "Bravecto", "Cytopoint"]
> }
> ```

> [tab] Python SDK
>
> ```python theme={null}
> config = TranscriptionConfig(
>     language_detection=True,
>     domain="veterinary-v1",
>     speaker_labels=True,
>     keyterms_prompt=["Apoquel", "Bravecto", "Cytopoint"],
> )
> ```

> [tab] JavaScript
>
> ```javascript theme={null}
> const data = {
>   audio_url: "<YOUR_AUDIO_URL>",
>   language_detection: true,
>   domain: "veterinary-v1",
>   speaker_labels: true,
>   keyterms_prompt: ["Apoquel", "Bravecto", "Cytopoint"],
> };
> ```

> [tab] JavaScript SDK
>
> ```javascript theme={null}
> const params = {
>   audio: audioFile,
>   language_detection: true,
>   domain: "veterinary-v1",
>   speaker_labels: true,
>   keyterms_prompt: ["Apoquel", "Bravecto", "Cytopoint"],
> };
> ```
