Transcribe audio using Deepgram’s speech-to-text model
Nova-3 (deepgram/nova-3) is a audio-stt model from Deepgram, released 2025-06-05. Pricing via AIgateway: $0.0052 per minute. Capabilities: streaming, async. Call it via https://api.aigateway.sh/v1/audio/transcriptions — set model="deepgram/nova-3". Best for: Call-center transcription, Voice agents, Meeting transcription.
curl https://api.aigateway.sh/v1/audio/transcriptions \
-H "Authorization: Bearer $AIGATEWAY_API_KEY" \
-F model="deepgram/nova-3" \
-F file="@audio.mp3"/v1/jobs/<id>, or have the result pushed to your webhook_url. Best for long files and batch pipelines.# Submit (returns immediately with a job id)
curl -X POST https://api.aigateway.sh/v1/audio/transcriptions \
-H "Authorization: Bearer $AIGATEWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepgram/nova-3","audio_url":"https://example.com/audio.wav","async":true}'
# -> {"id":"<job_id>","status":"processing"}
# Poll for the transcript
curl https://api.aigateway.sh/v1/jobs/<job_id> \
-H "Authorization: Bearer $AIGATEWAY_API_KEY"
# ...or skip polling: pass "webhook_url" and we POST the signed result when ready
# {"model":"deepgram/nova-3","audio_url":"...","webhook_url":"https://you.example.com/hook"}// Realtime WebSocket. Browsers pass the key as ?api_key=
const ws = new WebSocket(
"wss://api.aigateway.sh/v1/realtime?model=deepgram/nova-3&encoding=linear16&sample_rate=16000&interim_results=true&api_key=" + AIGATEWAY_API_KEY,
);
ws.onmessage = (e) => {
const msg = JSON.parse(e.data);
if (msg.type === "Results") {
console.log(msg.channel.alternatives[0].transcript, msg.is_final);
}
};
// stream raw audio frames (linear16 PCM @ 16 kHz):
// ws.send(pcmChunk)
// ...then end the stream:
ws.send(JSON.stringify({ type: "CloseStream" }));# multipart/form-data — use curl -F or SDK file upload model="deepgram/nova-3" file=@audio.mp3 response_format=json # or "verbose_json", "text", "srt", "vtt" language=en # optional
{
"text": "Hello from AIgateway.",
"language": "en",
"duration": 1.82
}from openai import OpenAI
client = OpenAI(base_url="https://api.aigateway.sh/v1", api_key="sk-aig-...")
with open("audio.mp3", "rb") as f:
r = client.audio.transcriptions.create(model="deepgram/nova-3", file=f)
print(r.text)