Skip to main content
Deepgram's Docs

Search documentation

Type to search this documentation.

On this pageOverview

Configuring Custom Endpoints

This guide provides instructions for configuring your applications to use Deepgram's regional endpoints, Deepgram Dedicated endpoints, or self-hosted 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 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

  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.

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

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

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

For streaming features, update WebSocket connection URLs accordingly:

  • 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
  • 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
  • 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

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.

Python
# 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
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",
});
C#
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
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
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();

Standard endpoint:

Bash
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:

Bash
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):

Bash
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):

Bash
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
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu