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

# Select The EU Region for EU Data Residency

In this guide, we'll show you how to configure your code to utilise the EU endpoint when interacting directly with the API, as well as across our SDKs.

<Info>
  Streaming is now available in EU-West via `streaming.eu.assemblyai.com`
</Info>

## Get Started

Before we begin, make sure you have an AssemblyAI account and an API key. You can [sign up](https://assemblyai.com/dashboard/signup) for a free account and get your API key from your dashboard.

## Python (Requests)

The only difference here is adding the `eu.` subdomain to the base URL. Everything else in your request code stays the same:

```python theme={null}
# US endpoint (default)
url = "https://api.assemblyai.com"

# EU endpoint - just change the base URL
url = "https://api.eu.assemblyai.com"
```

## Python SDK

To set the EU endpoint as the base URL when using the Python SDK, add the following line of code before setting the `Transcriber` object:

```python theme={null}
import assemblyai as aai

aai.settings.base_url = "https://api.eu.assemblyai.com"  # Set the base URL to the EU endpoint
```

## JavaScript (Axios)

Similar to the requests library for Python, the only difference here is adding the `eu.` subdomain to the base URL as follows:

```javascript theme={null}
// US endpoint (default)
const url = "https://api.assemblyai.com";

// EU endpoint - just change the base URL
const url = "https://api.eu.assemblyai.com";
```

## JavaScript SDK

To set the EU endpoint as the base URL when using the JavaScript SDK, set the `baseUrl` parameter in your AssemblyAI client as follows:

```javascript theme={null}
import { AssemblyAI } from "assemblyai";

const client = new AssemblyAI({
  apiKey: process.env.ASSEMBLYAI_API_KEY,
  baseUrl: "https://api.eu.assemblyai.com", // Set the baseUrl to the EU endpoint
});
```

## Streaming Speech-to-Text

For streaming transcription, use the EU streaming endpoint `streaming.eu.assemblyai.com`.

### Python SDK (Streaming)

To use the EU streaming endpoint with the Python SDK:

```python theme={null}
import assemblyai as aai
from assemblyai.streaming.v3 import StreamingClient, StreamingClientOptions

client = StreamingClient(
    StreamingClientOptions(
        api_key="YOUR_API_KEY",
        api_host="streaming.eu.assemblyai.com"  # EU streaming endpoint
    )
)
```

### JavaScript SDK (Streaming)

To use the EU streaming endpoint with the JavaScript SDK:

```javascript theme={null}
import { AssemblyAI } from "assemblyai";

const client = new AssemblyAI({
  apiKey: "YOUR_API_KEY",
});

const transcriber = client.streaming.transcriber({
  sampleRate: 16_000,
  apiHost: "streaming.eu.assemblyai.com", // EU streaming endpoint
});
```

### WebSocket (Direct)

When connecting directly via WebSocket, use the EU streaming base URL:

```text theme={null}
# US endpoint (default)
wss://streaming.assemblyai.com/v3/ws

# EU endpoint
wss://streaming.eu.assemblyai.com/v3/ws
```

If you encounter any issues or have any questions, reach out to our [Support team.](https://www.assemblyai.com/contact/support)
