Configuring Custom Endpoints
This guide provides instructions for configuring your applications to use Deepgram's regional endpoints, Deepgram Dedicated endpoints, or self-hosted endpoints.
Regional Endpoints
Section titled “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.
AU Endpoint URL: api.au.deepgram.com
The AU endpoint supports Speech-to-Text, Text-to-Speech, Voice Agent, and Text Intelligence APIs. Replace api.deepgram.com with api.au.deepgram.com in any SDK or API request to route traffic through Australia.
India Endpoint URL: api.in.deepgram.com
The India endpoint supports Speech-to-Text, Text-to-Speech, Voice Agent, and Text Intelligence APIs. Replace api.deepgram.com with api.in.deepgram.com in any SDK or API request to route traffic through India.
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
Section titled “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
Section titled “How to Configure”- Replace the base URL: In any SDK or API request, replace
api.deepgram.comwith your dedicated endpoint URL. - Use your existing credentials: You can use your existing API keys and tokens.
Feature Compatibility
Section titled “Feature Compatibility”All Deepgram API features are available on self-hosted deployments. See our API Documentation for more information.
Self-Hosted Endpoints
Section titled “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
Section titled “How to configure”- Replace the base URL: In any SDK or API request, replace
api.deepgram.comwith your self-hosted endpoint - Use your distribution credentials: Self-hosted deployments require specific credentials provided during setup.
- Configure protocol and port: Specify HTTP/HTTPS and custom ports as needed for your deployment.
Feature Compatibility
Section titled “Feature Compatibility”All Deepgram API features are available on self-hosted deployments. See our API Documentation for more information.
WebSocket Connections
Section titled “WebSocket Connections”For streaming features, update WebSocket connection URLs accordingly:
Speech-to-Text (/v1/listen)
Section titled “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)
Section titled “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)
Section titled “Voice Agent (/v1/agent/converse)”- Standard:
wss://agent.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
Section titled “SDK Configuration Examples”Python SDK
Section titled “Python SDK”Override the endpoint with a custom DeepgramClientEnvironment. The v7 client
does not accept a base_url; httpx_client is for transport concerns only
(proxies, SSL, pooling, timeout) and does not change the endpoint. For more
detail, see Using SDKs with Self-Hosted.
# For more Python SDK migration guides, visit:
# https://github.com/deepgram/deepgram-python-sdk/tree/main/docs
from deepgram import DeepgramClient
from deepgram.environment import DeepgramClientEnvironment
# Standard endpoint
# client = DeepgramClient(api_key="YOUR_API_KEY")
# Dedicated endpoint
dedicated_env = DeepgramClientEnvironment(
base="https://YOUR_DEDICATED_ENDPOINT", # REST APIs
production="wss://YOUR_DEDICATED_ENDPOINT", # STT/TTS WebSocket
agent="wss://YOUR_DEDICATED_ENDPOINT", # Agent WebSocket
agent_rest="https://YOUR_DEDICATED_ENDPOINT", # Agent REST
)
client = DeepgramClient(api_key="YOUR_API_KEY", environment=dedicated_env)
# Self-hosted endpoint (HTTPS)
self_hosted_env = DeepgramClientEnvironment(
base="https://your-deepgram-instance.com",
production="wss://your-deepgram-instance.com",
agent="wss://your-deepgram-instance.com",
agent_rest="https://your-deepgram-instance.com",
)
client = DeepgramClient(api_key="YOUR_API_KEY", environment=self_hosted_env)
# Self-hosted endpoint (HTTP with custom port)
self_hosted_http_env = DeepgramClientEnvironment(
base="http://your-deepgram-instance.com:8080",
production="ws://your-deepgram-instance.com:8080",
agent="ws://your-deepgram-instance.com:8080",
agent_rest="http://your-deepgram-instance.com:8080",
)
client = DeepgramClient(api_key="YOUR_API_KEY", environment=self_hosted_http_env)JavaScript SDK
Section titled “JavaScript SDK”import { DeepgramClient } from "@deepgram/sdk";
// Standard endpoint
// const deepgram = new DeepgramClient({ apiKey: "YOUR_API_KEY" });
// Dedicated endpoint
const deepgram = new DeepgramClient({
apiKey: "YOUR_API_KEY",
baseUrl: "https://{YOUR_DEDICATED_ENDPOINT}",
});
// Self-hosted endpoint (HTTPS)
const deepgram = new DeepgramClient({
apiKey: "YOUR_API_KEY",
baseUrl: "https://your-deepgram-instance.com",
});
// Self-hosted endpoint (HTTP with custom port)
const deepgram = new DeepgramClient({
apiKey: "YOUR_API_KEY",
baseUrl: "http://your-deepgram-instance.com:8080",
});.NET SDK
Section titled “.NET SDK”using Deepgram;
using Deepgram.Models.Authenticate.v1;
// Standard endpoint (default)
// var client = new AnalyzeClient("YOUR_API_KEY");
// Dedicated endpoint
var client = new AnalyzeClient("YOUR_API_KEY",
new DeepgramHttpClientOptions("YOUR_API_KEY", "https://{YOUR_DEDICATED_ENDPOINT}"));
// Self-hosted endpoint (HTTPS)
var client = new AnalyzeClient("YOUR_API_KEY",
new DeepgramHttpClientOptions("YOUR_API_KEY", "https://your-deepgram-instance.com"));
// Self-hosted endpoint (HTTP with custom port)
var client = new AnalyzeClient("YOUR_API_KEY",
new DeepgramHttpClientOptions("YOUR_API_KEY", "http://your-deepgram-instance.com:8080"));Go SDK
Section titled “Go SDK”import "github.com/deepgram/deepgram-go-sdk/pkg/client/interfaces"
// Standard endpoint
// client := client.NewWithDefaults()
// Dedicated endpoint
client := client.New("YOUR_API_KEY", &interfaces.ClientOptions{
Host: "{YOUR_DEDICATED_ENDPOINT}",
})
// Self-hosted endpoint (HTTPS)
client := client.New("YOUR_API_KEY", &interfaces.ClientOptions{
Host: "your-deepgram-instance.com",
})
// Self-hosted endpoint (HTTP with custom port)
client := client.New("YOUR_API_KEY", &interfaces.ClientOptions{
Host: "http://your-deepgram-instance.com:8080", // Protocol included in Host
APIVersion: "v1",
})Java SDK
Section titled “Java SDK”import com.deepgram.DeepgramClient;
import com.deepgram.core.Environment;
// Standard endpoint (default)
// DeepgramClient client = DeepgramClient.builder().build();
// Dedicated or self-hosted endpoint
Environment customEnv = Environment.custom()
.base("https://your-deepgram-instance.com")
.agent("wss://your-deepgram-instance.com")
.production("wss://your-deepgram-instance.com")
.build();
DeepgramClient client = DeepgramClient.builder()
.apiKey("YOUR_API_KEY")
.environment(customEnv)
.build();Direct API Calls
Section titled “Direct API Calls”cURL Examples
Section titled “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.wavDedicated endpoint:
curl -X POST "https://{YOUR_DEDICATED_ENDPOINT}/v1/listen" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: audio/wav" \
--data-binary @audio.wavSelf-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.wavSelf-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