> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portkey.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Deepgram

> Use Deepgram's Speech-to-Text API through Prisma AIRS AI Gateway for audio transcription.

Deepgram provides industry-leading speech-to-text capabilities. The AI Gateway allows you to use Deepgram's API with full observability and reliability features.

> [!NOTE]
>
> Deepgram currently uses a custom host setup. SDK support is available through the custom host pattern.

## Quick Start

Get started with Deepgram in under 2 minutes:

### Speech to Text - Local File

Transcribe audio from a local file:

```bash cURL theme={"system"}
curl https://aigw.portkey.ai/v1/listen \
  -H "Authorization: Token $DEEPGRAM_API_KEY" \
  -H "Content-Type: audio/mp3" \
  -H "x-portkey-custom-host: https://api.deepgram.com/v1" \
  -H "x-portkey-provider: openai" \
  -H "x-portkey-api-key: $PORTKEY_API_KEY" \
  --data-binary '@audio.mp3'
```

### Speech to Text - Remote File

Transcribe audio from a URL:

```bash cURL theme={"system"}
curl https://aigw.portkey.ai/v1/listen \
  -H "Authorization: Token $DEEPGRAM_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "x-portkey-custom-host: https://api.deepgram.com/v1" \
  -H "x-portkey-provider: openai" \
  -H "x-portkey-api-key: $PORTKEY_API_KEY" \
  -d '{"url": "https://dpgr.am/spacewalk.wav"}'
```

## Add Provider in Model Catalog

Before making requests, add Deepgram to your Model Catalog:

1. Go to [**Model Catalog → Add Provider**](https://stratacloudmanager.paloaltonetworks.com/)
2. Select **Deepgram**
3. Enter your [Deepgram API key](https://console.deepgram.com/)
4. Set the custom host to `https://api.deepgram.com/v1`
5. Name your provider (e.g., `deepgram`)

> **[Complete Setup Guide](https://docs.portkey.ai/docs/aigw/product/model-catalog.md)**
>
> See all setup options and detailed configuration instructions

***

## Using with the OpenAI SDK

You can also use Deepgram with the OpenAI SDK using custom host configuration:

***

## Deepgram Features

Deepgram offers advanced speech recognition capabilities:

* **Real-time Streaming**: Transcribe audio in real-time
* **Multiple Languages**: Support for 30+ languages
* **Custom Models**: Train custom models for domain-specific terminology
* **Diarization**: Identify different speakers in audio
* **Punctuation & Formatting**: Automatic punctuation and formatting

> **[Deepgram API Documentation](https://developers.deepgram.com/reference/listen-file)**
>
> Explore the complete Deepgram API documentation

***

## Next Steps

> **[Gateway Configs](https://docs.portkey.ai/docs/aigw/product/ai-gateway.md)**
>
> Add retries and timeouts for audio processing

> **[Observability](https://docs.portkey.ai/docs/aigw/product/observability.md)**
>
> Monitor and trace your Deepgram requests

> **[Custom Host Setup](https://docs.portkey.ai/docs/aigw/product/ai-gateway/universal-api.md#integrating-local-or-private-models)**
>
> Learn more about custom host configuration

> **[Metadata](https://docs.portkey.ai/docs/aigw/product/observability/metadata.md)**
>
> Add custom metadata to track audio sources


## Related topics

- [Enterprise Gateway](https://docs.portkey.ai/docs/changelog/enterprise.md)
- [Supported Providers](https://docs.portkey.ai/docs/aigw/api-reference/inference-api/supported-providers.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.