Account Management Commands

Manage projects, API keys, team members, and usage with the dg CLI.

Account commands are flag-based: the action is a flag, not a subcommand. Run dg keys --help, dg projects --help, or dg members --help for the full set.

Projects

List Projects

dg projects --list

Switch Project

dg projects --set-default <project-id>
dg projects --current

API Keys

List Keys

dg keys --list

Create Key

dg keys --create --comment "ci-runner"
dg keys --create --comment "production" --scopes member --tags prod

--scopes takes comma-separated scope names and defaults to member. See Working With Roles & API Scopes for what each scope grants.

Delete Key

dg keys --delete <key-id>

Use --dry-run to preview:

dg keys --delete <key-id> --dry-run

Team Members

List Members

dg members --list
dg members --invites # Pending invites

Invite Member

dg members --invite user@example.com --scope admin

Available scopes: owner, admin, member. See Working With Roles & API Scopes.

Remove Member

dg members --remove <member-id> --yes
dg members --revoke-invite user@example.com --yes

Usage

View Usage

dg usage
dg usage --start-date 2024-01-01 --end-date 2024-01-31
dg usage --current-month

Export Usage

-o belongs to dg itself, so it goes before the subcommand name:

dg -o json usage > usage.json
dg -o csv usage > usage.csv

Billing

View Balance

dg billing
dg billing --balances

Direct API Access

Use dg api to call any Deepgram API endpoint. The endpoint is positional; set the method with -X and body fields with -f:

dg api /v1/projects
dg api -X POST /v1/listen -f url=https://example.com/audio.mp3

Authentication is handled automatically.