Skip to main content
Deepgram provides industry-leading speech-to-text capabilities. Portkey allows you to use Deepgram’s API with full observability and reliability features.
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:
cURL
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:
cURL
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
  2. Select Deepgram
  3. Enter your Deepgram API key
  4. Set the custom host to https://api.deepgram.com/v1
  5. Name your provider (e.g., deepgram)

Complete Setup Guide

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

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

Explore the complete Deepgram API documentation

Next Steps

For complete SDK documentation:

SDK Reference

Complete Portkey SDK documentation