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

# Streaming Endpoints and Data Zones

Choose the endpoint that best fits your application's requirements, whether that's achieving the lowest possible latency or processing your data within a specific geographic region.

## Data processing locations

All streaming 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-1` | N. California |
| `us-west-2` | Oregon |

**EU**

| AWS region | Location |
| - | - |
| `eu-central-1` | Frankfurt |
| `eu-north-1` | Stockholm |
| `eu-south-1` | Milan |
| `eu-south-2` | Spain |
| `eu-west-1` | Ireland |
| `eu-west-3` | Paris |

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

## Edge Routing

The default endpoint automatically routes requests to the nearest available region, minimizing latency for real-time transcription. Your data may be processed in any of the US or EU locations listed above. With infrastructure distributed across the US and EU, this endpoint delivers best-in-class streaming performance regardless of where your users are located.

| Endpoint | WebSocket URL |
| - | - |
| Edge Routing (default) | `wss://streaming.assemblyai.com/v3/ws` |

## Data Zone Routing

Data Zone endpoints will process your audio and transcript data in the specified region.\* This is designed for organizations with strict data residency and governance requirements. Your audio and transcription data is processed in that zone's locations listed above. 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 your selected Data Zone.

\*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, transcript, and prompt 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, transcript, or prompt 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.

| Endpoint | WebSocket URL |
| - | - |
| US data residency | `wss://streaming.us.assemblyai.com/v3/ws` |
| EU data residency | `wss://streaming.eu.assemblyai.com/v3/ws` |

## Which endpoint should I use?

* **Optimizing for latency?** Use **Edge Routing** (default). No configuration change is needed, as it automatically routes to the nearest region for the fastest response.
* **Need data residency?** Use a **Data Zone** endpoint. Choose US or EU.

## How to use it

Edge Routing is the default. If you're using the SDKs without overriding the base URL, you're already using this endpoint and no configuration change is required.

To use a Data Zone endpoint, set the endpoint URL when you connect. The examples below use the US Data Zone endpoint. For the EU Data Zone, replace `us` with `eu`.

> [tab] Python SDK
>
> ```python theme={null}
> client = RealTimeTranscriber(
>     RealTimeTranscriberOptions(api_host="streaming.us.assemblyai.com"),
>     api_key=api_key,
> )
> ```

> [tab] Python
>
> ```python theme={null}
> API_ENDPOINT_BASE_URL = "wss://streaming.us.assemblyai.com/v3/ws"
> API_ENDPOINT = f"{API_ENDPOINT_BASE_URL}?{urlencode(CONNECTION_PARAMS)}"
> ```

> [tab] Javascript
>
> ```javascript theme={null}
> const API_ENDPOINT_BASE_URL = "wss://streaming.us.assemblyai.com/v3/ws";
> const API_ENDPOINT = `${API_ENDPOINT_BASE_URL}?${querystring.stringify(CONNECTION_PARAMS)}`;
> ```

> [tab] JavaScript SDK
>
> ```javascript theme={null}
> const client = new AssemblyAI({
>   apiKey: "<YOUR_API_KEY>",
>   streamingBaseUrl: "wss://streaming.us.assemblyai.com",
> });
> ```
