Configuring Custom Endpoints

Instructions for using Deepgram Dedicated and EU endpoints with your applications.

This guide provides instructions for configuring your applications to use Deepgram’s dedicated or EU-specific endpoints.

Deepgram Dedicated Endpoints

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.

EU Endpoints

For customers requiring data processing within the European Union, Deepgram provides EU-specific endpoints.

Endpoint URL: api.eu.deepgram.com

How to Configure

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

Feature Compatibility

All Deepgram API features are available on EU-specific endpoints. 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:

  • Standard: wss://api.deepgram.com/v1/listen
  • Dedicated: wss://{YOUR_DEDICATED_ENDPOINT}/v1/listen
  • EU: wss://api.eu.deepgram.com/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

SDK Configuration Examples

Python SDK

1from deepgram import DeepgramClient, DeepgramClientOptions
2
3# Standard endpoint
4# client = DeepgramClient("YOUR_API_KEY")
5
6# Dedicated endpoint
7client = DeepgramClient("YOUR_API_KEY", config=DeepgramClientOptions(
8 url="https://{YOUR_DEDICATED_ENDPOINT}"
9))
10
11# EU endpoint
12client = DeepgramClient("YOUR_API_KEY", config=DeepgramClientOptions(
13 url="https://api.eu.deepgram.com"
14))
15
16# Self-hosted endpoint (HTTPS)
17client = DeepgramClient("YOUR_API_KEY", config=DeepgramClientOptions(
18 url="https://your-deepgram-instance.com"
19))
20
21# Self-hosted endpoint (HTTP with custom port)
22client = DeepgramClient("YOUR_API_KEY", config=DeepgramClientOptions(
23 url="http://your-deepgram-instance.com:8080"
24))

JavaScript SDK

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

.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// EU endpoint
12var client = new AnalyzeClient("YOUR_API_KEY",
13 new DeepgramHttpClientOptions("YOUR_API_KEY", "https://api.eu.deepgram.com"));
14
15// Self-hosted endpoint (HTTPS)
16var client = new AnalyzeClient("YOUR_API_KEY",
17 new DeepgramHttpClientOptions("YOUR_API_KEY", "https://your-deepgram-instance.com"));
18
19// Self-hosted endpoint (HTTP with custom port)
20var client = new AnalyzeClient("YOUR_API_KEY",
21 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// EU endpoint
12client := client.New("YOUR_API_KEY", &interfaces.ClientOptions{
13 Host: "api.eu.deepgram.com",
14})
15
16// Self-hosted endpoint (HTTPS)
17client := client.New("YOUR_API_KEY", &interfaces.ClientOptions{
18 Host: "your-deepgram-instance.com",
19})
20
21// Self-hosted endpoint (HTTP with custom port)
22client := client.New("YOUR_API_KEY", &interfaces.ClientOptions{
23 Host: "http://your-deepgram-instance.com:8080", // Protocol included in Host
24 APIVersion: "v1",
25})

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

EU endpoint:

$curl -X POST "https://api.eu.deepgram.com/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