> ## 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 Portkey for audio transcription.

Deepgram provides industry-leading speech-to-text capabilities. Portkey 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://api.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://api.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://app.portkey.ai/model-catalog/providers)
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`)

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

***

## Using with Portkey SDK

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

```python Python theme={"system"}
from portkey_ai import Portkey

portkey = Portkey(
    api_key="PORTKEY_API_KEY",
    provider="openai",
    custom_host="https://api.deepgram.com/v1",
    Authorization="Token DEEPGRAM_API_KEY"
)

# Use with audio transcription
# Note: Specific implementation depends on your use case
```

```javascript Node.js theme={"system"}
import Portkey from 'portkey-ai';

const portkey = new Portkey({
    apiKey: 'PORTKEY_API_KEY',
    provider: 'openai',
    customHost: 'https://api.deepgram.com/v1',
    Authorization: 'Token DEEPGRAM_API_KEY'
});

// Use with audio transcription
// Note: Specific implementation depends on your use case
```

***

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

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

***

## Next Steps

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

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

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

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

For complete SDK documentation:

> [card] [SDK Reference](https://docs.portkey.ai/docs/api-reference/sdk/list.md)
>
> Complete Portkey SDK documentation

***

> [card] [Portkey is now PRISMA AIRS AI Gateway. See it in action.](https://www.paloaltonetworks.in/ai-security/ai-gateway?utm_source=portkey\&utm_medium=referral\&utm_campaign=prisma_airs\&utm_content=docs_nav#contact)
>
> Contact Us


## Related topics

- [August](https://docs.portkey.ai/docs/changelog/2026/august.md)
- [Gateway to Other APIs](https://docs.portkey.ai/docs/api-reference/inference-api/gateway-for-other-apis.md)
- [Enterprise Gateway](https://docs.portkey.ai/docs/changelog/enterprise.md)
- [Frontend](https://docs.portkey.ai/docs/changelog/frontend.md)
- [Supported Providers](https://docs.portkey.ai/docs/api-reference/inference-api/supported-providers.md)


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