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.

Streaming is now available in EU-West via streaming.eu.assemblyai.com

Get Started

Before we begin, make sure you have an AssemblyAI account and an API key. You can sign up 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:

1# US endpoint (default)
2url = "https://api.assemblyai.com"
3
4# EU endpoint - just change the base URL
5url = "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:

1import assemblyai as aai
2
3aai.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:

1// US endpoint (default)
2const url = 'https://api.assemblyai.com'
3
4// EU endpoint - just change the base URL
5const 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:

1import { AssemblyAI } from "assemblyai";
2
3const client = new AssemblyAI({
4 apiKey: process.env.ASSEMBLYAI_API_KEY,
5 baseUrl: "https://api.eu.assemblyai.com" // Set the baseUrl to the EU endpoint
6});

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:

1import assemblyai as aai
2from assemblyai.streaming.v3 import StreamingClient, StreamingClientOptions
3
4client = StreamingClient(
5 StreamingClientOptions(
6 api_key="YOUR_API_KEY",
7 api_host="streaming.eu.assemblyai.com" # EU streaming endpoint
8 )
9)

JavaScript SDK (Streaming)

To use the EU streaming endpoint with the JavaScript SDK:

1import { AssemblyAI } from "assemblyai";
2
3const client = new AssemblyAI({
4 apiKey: "YOUR_API_KEY"
5});
6
7const transcriber = client.streaming.transcriber({
8 sampleRate: 16_000,
9 apiHost: "streaming.eu.assemblyai.com" // EU streaming endpoint
10});

WebSocket (Direct)

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

1# US endpoint (default)
2wss://streaming.assemblyai.com/v3/ws
3
4# EU endpoint
5wss://streaming.eu.assemblyai.com/v3/ws

If you encounter any issues or have any questions, reach out to our Support team.