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

# Cloud Endpoints and Data Residency

Choose the endpoint that best fits your application's requirements—whether that's using the default US region or our EU endpoint.

## Data processing locations

Pre-recorded audio and transcription data is processed in AWS regions located in the United States and the European Union:

**US**

| AWS region | Location |
| - | - |
| `us-east-1` | N. Virginia |
| `us-east-2` | Ohio |
| `us-west-2` | Oregon |

**EU**

| AWS region | Location |
| - | - |
| `eu-central-1` | Frankfurt |
| `eu-north-1` | Stockholm |
| `eu-west-1` | Ireland |

Which of these locations processes your data depends on the endpoint you use, as described below.

## Default Endpoint

The default endpoint (`api.assemblyai.com`) processes your pre-recorded audio transcription requests in the US region. If you don't specify a base URL, this is the endpoint used for the request.

## EU Data Residency

The EU endpoint (`api.eu.assemblyai.com`) processes your audio and transcript data in the European Union.\* This is designed for organizations with strict data residency and governance requirements. Note: File names may be processed by our subprocessors CrowdStrike and Datadog, which are located in the US. Do not include PII or PHI in file names if you require that information to remain in the EU.

\*AssemblyAI will store Account Data and Usage Data in the United States, per our [Privacy Policy](https://www.assemblyai.com/legal/privacy-policy) and the Data Privacy Framework. Audio and transcript data will be stored in the endpoint region you select. Incident response and customer support may be conducted from locations where staff are employed, which may be in the US, EU, or elsewhere. If your audio or transcript needs to be accessed for debugging, a member of our team located outside of your endpoint region may access that data and may use a US-based subprocessor to support the troubleshooting or customer support request.

## Endpoints

| Endpoint | Base URL | Description |
| - | - | - |
| US (default) | `api.assemblyai.com` | Audio + transcript data processed in the US |
| EU | `api.eu.assemblyai.com` | Audio + transcript data processed in the EU |

## Which endpoint should I use?

* **No data residency requirements?** Use the **default endpoint**. No configuration change is needed.
* **Need EU data residency?** Use the **EU endpoint**.
* **Transcribing streaming audio?** This page covers pre-recorded audio only. Streaming has its own endpoints, including an EU Data Zone at `wss://streaming.eu.assemblyai.com/v3/ws`. See [Streaming endpoints and data zones](https://assemblyai.com/docs/streaming/endpoints-and-data-zones.md).
* **Need audio, transcripts and PII to stay on your own network?** [Self-hosted streaming](https://assemblyai.com/docs/streaming/self-hosted-streaming.md) runs inside your own infrastructure, so that data never leaves your network.

## How to use it

Update your base URL to your preferred endpoint. Select an endpoint tab below to see examples for each.

> [tab] US (default)
>
> The US endpoint is the default. If you're using the SDKs without overriding the base URL, you're already using this endpoint. No configuration change is required.
>
> ```python title="Python SDK"  theme={null}
> from assemblyai.prerecorded.v2 import Transcriber, TranscriptionConfig
>
> # No base_url override needed — US is the default
> # audio_file = "./local_file.mp3"
> audio_file = "https://assembly.ai/wildfires.mp3"
>
> config = TranscriptionConfig(
>     speech_models=["assemblyai-stt-3-7", "universal-2"],
>     language_detection=True,
> )
>
> transcriber = Transcriber(api_key="<YOUR_API_KEY>", config=config)
> transcript = transcriber.transcribe(audio_file)
>
> if transcript.status == "error":
>   raise RuntimeError(f"Transcription failed: {transcript.error}")
>
> print(transcript.text)
> ```
>
> ```python title="Python" highlight={4}  expandable theme={null}
> import requests
> import time
>
> base_url = "https://api.assemblyai.com"
>
> headers = {
>     "authorization": "<YOUR_API_KEY>"
> }
>
> with open("./my-audio.mp3", "rb") as f:
>   response = requests.post(base_url + "/v2/upload",
>                           headers=headers,
>                           data=f)
>
> upload_url = response.json()["upload_url"]
>
> data = {
>     "audio_url": upload_url, # You can also use a URL to an audio or video file on the web
>     "speech_models": ["assemblyai-stt-3-7", "universal-2"],
>     "language_detection": True
> }
>
> url = base_url + "/v2/transcript"
> response = requests.post(url, json=data, headers=headers)
>
> transcript_id = response.json()['id']
> polling_endpoint = f"{base_url}/v2/transcript/{transcript_id}"
>
> while True:
>   transcription_result = requests.get(polling_endpoint, headers=headers).json()
>
>   if transcription_result['status'] == 'completed':
>     print(f"Transcript ID: {transcript_id}")
>     break
>
>   elif transcription_result['status'] == 'error':
>     raise RuntimeError(f"Transcription failed: {transcription_result['error']}")
>
>   else:
>     time.sleep(3)
>
> ```
>
> ```javascript title="JavaScript SDK"  expandable theme={null}
> import { AssemblyAI } from "assemblyai";
>
> // No baseUrl override needed — US is the default
> const client = new AssemblyAI({
>   apiKey: "<YOUR_API_KEY>",
> });
>
> // const audioFile = './local_file.mp3'
> const audioFile = "https://assembly.ai/wildfires.mp3";
>
> const params = {
>   audio: audioFile,
>   speech_models: ["assemblyai-stt-3-7", "universal-2"],
>   language_detection: true,
> };
>
> const run = async () => {
>   const transcript = await client.transcripts.transcribe(params);
>
>   console.log(transcript.text);
> };
>
> run();
> ```
>
> ```javascript title="JavaScript" highlight={4}  expandable theme={null}
> import fs from "fs-extra";
>
> const baseUrl = "https://api.assemblyai.com";
>
> const headers = {
>   authorization: "<YOUR_API_KEY>",
> };
>
> const path = "./my-audio.mp3";
> const audioData = await fs.readFile(path);
> let res = await fetch(`${baseUrl}/v2/upload`, {
>   method: "POST",
>   headers,
>   body: audioData,
> });
> if (!res.ok) throw new Error(`Error: ${res.status}`);
> const uploadResponse = await res.json();
> const uploadUrl = uploadResponse.upload_url;
>
> const data = {
>   audio_url: uploadUrl, // You can also use a URL to an audio or video file on the web
>   speech_models: ["assemblyai-stt-3-7", "universal-2"],
>   language_detection: true,
> };
>
> const url = `${baseUrl}/v2/transcript`;
> 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] EU data residency
>
> ```python title="Python SDK" highlight={7}  theme={null}
> from assemblyai import Client, Settings
> from assemblyai.prerecorded.v2 import Transcriber, TranscriptionConfig
>
> client = Client(
>     settings=Settings(
>         api_key="<YOUR_API_KEY>",
>         base_url="https://api.eu.assemblyai.com",
>     )
> )
>
> # audio_file = "./local_file.mp3"
> audio_file = "https://assembly.ai/wildfires.mp3"
>
> config = TranscriptionConfig(
>     speech_models=["assemblyai-stt-3-7", "universal-2"],
>     language_detection=True,
> )
>
> transcriber = Transcriber(client=client, config=config)
> transcript = transcriber.transcribe(audio_file)
>
> if transcript.status == "error":
>   raise RuntimeError(f"Transcription failed: {transcript.error}")
>
> print(transcript.text)
> ```
>
> ```python title="Python" highlight={4}  expandable theme={null}
> import requests
> import time
>
> base_url = "https://api.eu.assemblyai.com"
>
> headers = {
>     "authorization": "<YOUR_API_KEY>"
> }
>
> with open("./my-audio.mp3", "rb") as f:
>   response = requests.post(base_url + "/v2/upload",
>                           headers=headers,
>                           data=f)
>
> upload_url = response.json()["upload_url"]
>
> data = {
>     "audio_url": upload_url, # You can also use a URL to an audio or video file on the web
>     "speech_models": ["assemblyai-stt-3-7", "universal-2"],
>     "language_detection": True
> }
>
> url = base_url + "/v2/transcript"
> response = requests.post(url, json=data, headers=headers)
>
> transcript_id = response.json()['id']
> polling_endpoint = f"https://api.eu.assemblyai.com/v2/transcript/{transcript_id}"
>
> while True:
>   transcription_result = requests.get(polling_endpoint, headers=headers).json()
>
>   if transcription_result['status'] == 'completed':
>     print(f"Transcript ID: {transcript_id}")
>     break
>
>   elif transcription_result['status'] == 'error':
>     raise RuntimeError(f"Transcription failed: {transcription_result['error']}")
>
>   else:
>     time.sleep(3)
>
> ```
>
> ```javascript title="JavaScript SDK" highlight={5}  expandable theme={null}
> import { AssemblyAI } from "assemblyai";
>
> const client = new AssemblyAI({
>   apiKey: "<YOUR_API_KEY>",
>   baseUrl: "https://api.eu.assemblyai.com",
> });
>
> // const audioFile = './local_file.mp3'
> const audioFile = "https://assembly.ai/wildfires.mp3";
>
> const params = {
>   audio: audioFile,
>   speech_models: ["assemblyai-stt-3-7", "universal-2"],
>   language_detection: true,
> };
>
> const run = async () => {
>   const transcript = await client.transcripts.transcribe(params);
>
>   console.log(transcript.text);
> };
>
> run();
> ```
>
> ```javascript title="JavaScript" highlight={4}  expandable theme={null}
> import fs from "fs-extra";
>
> const baseUrl = "https://api.eu.assemblyai.com";
>
> const headers = {
>   authorization: "<YOUR_API_KEY>",
> };
>
> const path = "./my-audio.mp3";
> const audioData = await fs.readFile(path);
> let res = await fetch(`${baseUrl}/v2/upload`, {
>   method: "POST",
>   headers,
>   body: audioData,
> });
> if (!res.ok) throw new Error(`Error: ${res.status}`);
> const uploadResponse = await res.json();
> const uploadUrl = uploadResponse.upload_url;
>
> const data = {
>   audio_url: uploadUrl, // You can also use a URL to an audio or video file on the web
>   speech_models: ["assemblyai-stt-3-7", "universal-2"],
>   language_detection: true,
> };
>
> const url = `${baseUrl}/v2/transcript`;
> 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));
>   }
> }
> ```
