Deepgram on the AI Gateway: STT, TTS, Cost and Governance
.png)
Built for Speed: ~10ms Latency, Even Under Load
Blazingly fast way to build, track and deploy your models!
- Handles 350+ RPS on just 1 vCPU — no tuning needed
- Production-ready with full enterprise support
What Deepgram is
Deepgram is a speech-to-text and text-to-speech provider built for real-time, production voice. Its current flagship transcription model, Nova-3, handles both pre-recorded and streaming audio, with smart formatting, diarization, and multilingual support. On the output side, Aura turns text into natural speech for voice agents and IVR.
Within any transaction of the voice app, they occupy opposite sides; the caller says something, then Nova-3 converts the audio signal into text, an LLM infers from that information, and then Aura (or other TTS engine) says the result aloud. With Deepgram being quick and accurate, it is becoming the default tool for both transcription hops and increasingly speech hops.
The problem lies in the practice. Deepgram is yet another vendor, with yet another API key, yet another SDK, yet another expense — and since it is billed based on the time and number of characters transcribed and not by tokens, it is not part of your spending tracking of LLM. But for one design it will be okay. In an enterprise with a team of voice bots, it’s a case of governance failure.
Deepgram pricing
Here is the pay-as-you-go rate card for the models you are most likely to use.

Two things to note. First, the unit is not the token. STT is billed per minute of audio, TTS per 1,000 characters of input text. That mismatch is exactly why voice cost tends to escape token-based dashboards. Second, streaming costs more than batch — real-time transcription runs higher than pre-recorded, so a live voice agent is priced differently from an offline transcription pipeline. New accounts get $200 in free credit to start [VERIFY current rates and credit at deepgram.com/pricing; promotional streaming prices have fluctuated].
Why run Deepgram through a gateway
A voice agent is not one model call — it is a chain, and every hop is a provider you pay, monitor, and can have fail on you. Putting the whole chain behind one gateway turns that sprawl into a single governed path.

Routing Deepgram through the TrueFoundry AI Gateway gives you four things you do not get calling it directly:
- One API key and endpoint for STT, TTS, and the LLM in between. Your app holds a TrueFoundry key; the gateway holds the Deepgram key. Rotating or revoking Deepgram access is a gateway change, not a redeploy.
- Unified cost tracking that includes audio. The gateway meters Deepgram usage per minute and per character and shows it alongside your LLM spend, attributed by team, user, and request.
- Fallback and load-balancing across STT or TTS providers. If Deepgram is rate-limited or degraded, a virtual model can fail over to another transcription provider without a code change.
- Access control and guardrails applied uniformly — the same collaborator model, the same policies, across every provider.
STT and TTS, one endpoint
Deepgram is not the only speech provider the gateway supports, which is what makes fallback and comparison possible.

Deepgram, Cartesia, ElevenLabs, Google Vertex, and Smallest AI are called through the gateway’s provider proxy using each one’s native SDK, while OpenAI, Azure, and Groq use the OpenAI-compatible API. That means you keep Deepgram’s exact feature set — you are not flattening it to a lowest-common-denominator API — while still getting one key, one bill, and one failover layer.
Where teams get this wrong
They track LLM cost and forget audio. Token dashboards miss per-minute and per-character spend entirely. On a busy voice product, transcription and speech can rival the LLM bill — and nobody sees it until finance asks.
They hardcode the Deepgram key in each service. Every voice service holding its own Deepgram credential means rotation is a redeploy and there is no central place to cap or attribute usage.
They have no failover for the voice hops. Teams build LLM fallback and leave STT/TTS as single points of failure. If Deepgram has a bad minute, the whole agent goes mute.
They confuse streaming and batch pricing. Running a real-time agent on the assumption of batch rates understates cost. Streaming is priced higher; model it that way.
How to add Deepgram in TrueFoundry
Setup is three steps. From the dashboard, go to AI Gateway → Models and select Deepgram.

Add your Deepgram account with its API key, name it, optionally set a custom base URL, and add collaborators for access control.

Then add the model with its Display name, Model ID, and Model type. One important detail: for Deepgram, the Model ID and Display name must be identical.
Once it is added, you call Deepgram with its own native SDK, pointed at the gateway’s provider-proxy URL:

from deepgram import DeepgramClient
from deepgram.environment import DeepgramClientEnvironment
TFY_API_KEY = "your-tfy-api-key"
env = DeepgramClientEnvironment(
base="{GATEWAY_BASE_URL}/stt/{deepgramProviderAccountName}",
production="",
agent="",
)
client = DeepgramClient(
api_key="dummy",
environment=env,
headers={"x-tfy-api-key": TFY_API_KEY},
)
# Transcribe a remote URL with Nova-3
response = client.listen.v1.media.transcribe_url(
url="https://dpgr.am/spacewalk.wav",
model="nova-3",
smart_format=True,
)
print(response)
The application holds a TrueFoundry key (dummy stands in for the Deepgram key, which lives in the gateway). You keep smart_format, diarize, language selection, and every other Deepgram parameter — the gateway proxies them through untouched.
A worked example: a support voice agent
A company runs a phone-support voice agent: 20,000 calls a month, averaging 4 minutes of streaming transcription and about 2,500 characters of spoken response per call, with an LLM turn in between.
Rough monthly math at pay-as-you-go rates:
- Nova-3 streaming STT: 20,000 × 4 min × $0.0077 ≈ $616
- Aura-2 TTS: 20,000 × 2.5 (thousand chars) × $0.030 ≈ $1,500
- LLM turn: tracked in the same dashboard, whatever model you route to
The point is that two-thirds of this voice bill is audio, not the LLM — and without gateway-level metering, that $2,100+ of Deepgram spend sits in a separate invoice, unattributed to the team or feature driving it. Through the gateway, it is one line item you can break down, cap, and optimize, right next to the model cost.
Gotchas worth knowing
- Model ID must equal Display name. Deepgram is strict about this in TrueFoundry; mismatches fail.
- Use the provider-proxy URL. Deepgram goes through {GATEWAY_BASE_URL}/stt/{accountName} with the native SDK, not the OpenAI-compatible path.
- Streaming ≠ batch pricing. Budget real-time agents at the streaming rate.
- STT with no reported duration costs zero to track. Cost tracking takes STT duration from the provider response; if a provider does not report it, the gateway records usage but no billable seconds — verify your numbers for edge cases.
- Add a TTS/STT fallback. Use a virtual model so a Deepgram outage fails over instead of muting the agent.
Related reading
- Cartesia and the TrueFoundry AI Gateway: native passthrough for voice
- Why specialized observability is non-negotiable for production voice AI
- Resemble AI voice models on TrueFoundry
- LLM cost tracking: a practical solution
- Multi-model routing on the AI Gateway
- What is LLM fallback?
Conclusion
Deepgram is an easy provider to adopt and an easy one to lose track of. The model is fast, the SDK is clean, and the per-minute price looks small — until you have a fleet of voice agents, a Deepgram bill nobody reconciles, and no failover when transcription has a bad minute.
Routing Deepgram through the TrueFoundry AI Gateway closes that gap without giving up anything: native SDK, full feature set, plus one key, unified audio-and-LLM cost tracking, access control, and fallback across providers. Your voice stack becomes one governed path instead of three.
TrueFoundry AI Gateway delivers ~3–4 ms latency, handles 350+ RPS on 1 vCPU, scales horizontally with ease, and is production-ready, while LiteLLM suffers from high latency, struggles beyond moderate RPS, lacks built-in scaling, and is best for light or prototype workloads.


Recent Blogs
Frequently asked questions
What is Deepgram used for?
Deepgram provides speech-to-text (Nova-3) and text-to-speech (Aura) for real-time and pre-recorded audio. It is commonly used for voice agents, call transcription, meeting notes, and IVR, where low latency and accuracy matter.
How much does Deepgram cost?
Pay-as-you-go, Nova-3 transcription is about $0.0043 per minute pre-recorded and $0.0077 per minute streaming; Aura-2 text-to-speech is $0.030 per 1,000 characters (Aura-1 is $0.015). Audio is billed per minute and per character, not per token.
Can I use the Deepgram API through the TrueFoundry AI Gateway?
Yes. Add Deepgram as a model account, then call it with Deepgram’s native SDK pointed at the gateway’s provider-proxy URL. You keep Deepgram’s full feature set while gaining one key, unified cost tracking, and fallback.
Does the gateway track Deepgram (audio) cost?
Yes. The gateway meters STT per minute of audio and TTS per character, and shows that spend alongside LLM cost, attributed by model, team, user, and request.
Can I fail over from Deepgram to another STT provider?
Yes. Create a virtual model with the Audio Transcription type spanning multiple providers; the gateway load-balances and fails over across them without a code change.
Does this run in my own cloud?
Yes. TrueFoundry’s data plane runs in your VPC or on-prem, so audio and usage data stay in your environment.











.png)




.png)
.png)
.png)
.png)
.png)









