Deepgram CLI — Getting Started
Deepgram CLI — Getting Started
Transcribe audio, synthesize speech, and manage your Deepgram account — all from your terminal.
The dg CLI gives you full access to Deepgram APIs from your terminal. Transcribe files, stream live audio, synthesize speech, analyze text, and manage your Deepgram account — without writing a single line of code.
Prerequisites
- Python 3.10 or later
- A Deepgram API key (get one free)
Quick Start
Core Workflows
Transcribe audio
Text-to-speech
Text intelligence
Account management
Output Formats
The CLI defaults to human-readable output in the terminal. Use -o or --output to switch formats:
When stdout is a pipe, the CLI automatically switches to JSON.
Agent-Friendly Mode
The CLI auto-detects AI agent environments (Claude Code, Aider, OpenAI Codex, Gemini) and adjusts its behavior:
- Disables interactive prompts
- Routes status messages to stderr
- Defaults to JSON output
To explicitly enable agent-friendly mode:
To get machine-readable parameter documentation:
Next Steps
- Install the CLI — More installation methods including pip, pipx, and Homebrew
- Authenticate — Learn about authentication options
- Speech-to-Text — Full transcription reference
- Text-to-Speech — Full TTS reference