Configuring Custom Endpoints

Instructions for using Deepgram’s regional, Dedicated, and self-hosted endpoints with your applications.

This guide provides instructions for configuring your applications to use Deepgram’s regional endpoints, Deepgram Dedicated endpoints, or self-hosted endpoints.

Regional Endpoints

Deepgram offers regional endpoints for customers who need data processing within a specific geography. Regional endpoints use the same API keys and SDKs as the default global endpoint — you only need to change the base URL.

EU Endpoint URL: api.eu.deepgram.com

The EU endpoint supports Speech-to-Text, Text-to-Speech, Voice Agent, and Text Intelligence APIs. Replace api.deepgram.com with api.eu.deepgram.com in any SDK or API request to route traffic through the EU.

For full configuration details, SDK examples, WebSocket URLs, known limitations, and information about managed LLM/TTS provider regional routing, see Regional Endpoints.

Deepgram Dedicated Endpoints

Deepgram Dedicated allows you to run speech-to-text, text-to-speech, and voice agent workloads with performance, compliance, and regional control, without the complexity of managing infrastructure.

If you have a Deepgram Dedicated (DGD) endpoint, you’ll receive endpoint details similar to:

Endpoint URL: {SHORT_UID}.{REGION_SUBDOMAIN}.api.deepgram.com

How to Configure

  1. Replace the base URL: In any SDK or API request, replace api.deepgram.com with your dedicated endpoint URL.
  2. Use your existing credentials: You can use your existing API keys and tokens.

Feature Compatibility

All Deepgram API features are available on self-hosted deployments. See our API Documentation for more information.

Self-Hosted Endpoints

For self-hosted Deepgram deployments, you’ll use your own custom domain and infrastructure.

Common Endpoint Patterns:

  • HTTPS: https://your-deepgram-instance.com
  • HTTP with alternate port 8080: http://your-deepgram-instance.com:8080
  • Internal network: http://10.0.1.100:8080

How to configure

For more information about self-hosted deployments, see our Self-Hosted Documentation.

  1. Replace the base URL: In any SDK or API request, replace api.deepgram.com with your self-hosted endpoint
  2. Use your distribution credentials: Self-hosted deployments require specific credentials provided during setup.
  3. Configure protocol and port: Specify HTTP/HTTPS and custom ports as needed for your deployment.

Feature Compatibility

All Deepgram API features are available on self-hosted deployments. See our API Documentation for more information.

WebSocket Connections

For streaming features, update WebSocket connection URLs accordingly:

Speech-to-Text (/v1/listen)

  • Standard: wss://api.deepgram.com/v1/listen
  • Dedicated: wss://{YOUR_DEDICATED_ENDPOINT}/v1/listen
  • Self-hosted (HTTPS): wss://your-deepgram-instance.com/v1/listen
  • Self-hosted (HTTP with custom port): ws://your-deepgram-instance.com:8080/v1/listen

Text-to-Speech (/v1/speak)

  • Standard: wss://api.deepgram.com/v1/speak
  • Dedicated: wss://{YOUR_DEDICATED_ENDPOINT}/v1/speak
  • Self-hosted (HTTPS): wss://your-deepgram-instance.com/v1/speak
  • Self-hosted (HTTP with custom port): ws://your-deepgram-instance.com:8080/v1/speak

Voice Agent (/v1/agent/converse)

  • Standard: wss://api.deepgram.com/v1/agent/converse
  • Dedicated: wss://{YOUR_DEDICATED_ENDPOINT}/v1/agent/converse
  • Self-hosted (HTTPS): wss://your-deepgram-instance.com/v1/agent/converse
  • Self-hosted (HTTP with custom port): ws://your-deepgram-instance.com:8080/v1/agent/converse

SDK Configuration Examples

Python SDK

1# For more Python SDK migration guides, visit:
2# https://github.com/deepgram/deepgram-python-sdk/tree/main/docs
3
4from deepgram import DeepgramClient
5import httpx
6
7# Standard endpoint
8# client = DeepgramClient(api_key="YOUR_API_KEY")
9
10# Dedicated endpoint
11client = DeepgramClient(
12 api_key="YOUR_API_KEY",
13 httpx_client=httpx.Client(
14 base_url="https://YOUR_DEDICATED_ENDPOINT"
15 )
16)
17
18# Self-hosted endpoint (HTTPS)
19client = DeepgramClient(
20 api_key="YOUR_API_KEY",
21 httpx_client=httpx.Client(
22 base_url="https://your-deepgram-instance.com"
23 )
24)
25
26# Self-hosted endpoint (HTTP with custom port)
27client = DeepgramClient(
28 api_key="YOUR_API_KEY",
29 httpx_client=httpx.Client(
30 base_url="http://your-deepgram-instance.com:8080"
31 )
32)

JavaScript SDK

1import { DeepgramClient } from "@deepgram/sdk";
2
3// Standard endpoint
4// const deepgram = new DeepgramClient({ apiKey: "YOUR_API_KEY" });
5
6// Dedicated endpoint
7const deepgram = new DeepgramClient({
8 apiKey: "YOUR_API_KEY",
9 baseUrl: "https://{YOUR_DEDICATED_ENDPOINT}",
10});
11
12// Self-hosted endpoint (HTTPS)
13const deepgram = new DeepgramClient({
14 apiKey: "YOUR_API_KEY",
15 baseUrl: "https://your-deepgram-instance.com",
16});
17
18// Self-hosted endpoint (HTTP with custom port)
19const deepgram = new DeepgramClient({
20 apiKey: "YOUR_API_KEY",
21 baseUrl: "http://your-deepgram-instance.com:8080",
22});

.NET SDK

1using Deepgram;
2using Deepgram.Models.Authenticate.v1;
3
4// Standard endpoint (default)
5// var client = new AnalyzeClient("YOUR_API_KEY");
6
7// Dedicated endpoint
8var client = new AnalyzeClient("YOUR_API_KEY",
9 new DeepgramHttpClientOptions("YOUR_API_KEY", "https://{YOUR_DEDICATED_ENDPOINT}"));
10
11// Self-hosted endpoint (HTTPS)
12var client = new AnalyzeClient("YOUR_API_KEY",
13 new DeepgramHttpClientOptions("YOUR_API_KEY", "https://your-deepgram-instance.com"));
14
15// Self-hosted endpoint (HTTP with custom port)
16var client = new AnalyzeClient("YOUR_API_KEY",
17 new DeepgramHttpClientOptions("YOUR_API_KEY", "http://your-deepgram-instance.com:8080"));

Go SDK

1import "github.com/deepgram/deepgram-go-sdk/pkg/client/interfaces"
2
3// Standard endpoint
4// client := client.NewWithDefaults()
5
6// Dedicated endpoint
7client := client.New("YOUR_API_KEY", &interfaces.ClientOptions{
8 Host: "{YOUR_DEDICATED_ENDPOINT}",
9})
10
11// Self-hosted endpoint (HTTPS)
12client := client.New("YOUR_API_KEY", &interfaces.ClientOptions{
13 Host: "your-deepgram-instance.com",
14})
15
16// Self-hosted endpoint (HTTP with custom port)
17client := client.New("YOUR_API_KEY", &interfaces.ClientOptions{
18 Host: "http://your-deepgram-instance.com:8080", // Protocol included in Host
19 APIVersion: "v1",
20})

Java SDK

1import com.deepgram.DeepgramClient;
2import com.deepgram.core.Environment;
3
4// Standard endpoint (default)
5// DeepgramClient client = DeepgramClient.builder().build();
6
7// Dedicated or self-hosted endpoint
8Environment customEnv = Environment.custom()
9 .base("https://your-deepgram-instance.com")
10 .agent("wss://your-deepgram-instance.com")
11 .production("wss://your-deepgram-instance.com")
12 .build();
13DeepgramClient client = DeepgramClient.builder()
14 .apiKey("YOUR_API_KEY")
15 .environment(customEnv)
16 .build();

Direct API Calls

cURL Examples

Standard endpoint:

$curl -X POST "https://api.deepgram.com/v1/listen" \
> -H "Authorization: Token YOUR_API_KEY" \
> -H "Content-Type: audio/wav" \
> --data-binary @audio.wav

Dedicated endpoint:

$curl -X POST "https://{YOUR_DEDICATED_ENDPOINT}/v1/listen" \
> -H "Authorization: Token YOUR_API_KEY" \
> -H "Content-Type: audio/wav" \
> --data-binary @audio.wav

Self-hosted endpoint (HTTPS):

$curl -X POST "https://your-deepgram-instance.com/v1/listen" \
> -H "Authorization: Token YOUR_API_KEY" \
> -H "Content-Type: audio/wav" \
> --data-binary @audio.wav

Self-hosted endpoint (HTTP with custom port):

$curl -X POST "http://your-deepgram-instance.com:8080/v1/listen" \
> -H "Authorization: Token YOUR_API_KEY" \
> -H "Content-Type: audio/wav" \
> --data-binary @audio.wav