Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions src/content/docs/ai-gateway/usage/providers/deepgram.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Deepgram
pcx_content_type: get-started
---

[Deepgram](https://developers.deepgram.com/home) provides Voice AI APIs for speech-to-text, text-to-speech, and voice agents.

:::note

Deepgram is also available through Workers AI, see [Deepgram Workers AI](/ai-gateway/usage/websockets-api/realtime-api/#deepgram-workers-ai).

:::

## Endpoint

```txt
https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/deepgram
```

## URL Structure

When making requests to Deepgram, replace `https://api.deepgram.com/` in the URL you are currently using with `https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/deepgram/`.

## Prerequisites

When making requests to Deepgram, ensure you have the following:

- Your AI Gateway Account ID.
- Your AI Gateway gateway name.
- An active Deepgram API token.

## Example

### SDK

```ts title="TS"
import { createClient, LiveTranscriptionEvents } from "@deepgram/sdk";


const deepgram = createClient("{deepgram_api_key}", {
global: {
websocket: {
options: {
url: "wss://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/deepgram/",
_nodeOnlyHeaders: {
"cf-aig-authorization": "Bearer {CF_AIG_TOKEN}"
}
}
}
}
});


const connection = deepgram.listen.live({
model: "nova-3",
language: "en-US",
smart_format: true,
});

connection.send(...);
```