Using Deepgram Management API (Python SDK)
Administrative REST endpoints at api.deepgram.com/v1/projects, /v1/models, and reusable agent configuration storage. Project-scoped resources live under client.manage.v1.projects.* (keys, members, members.invites, usage, billing, models, requests). Global models at client.manage.v1.models. Think-model discovery at client.agent.v1.settings.think.models. Reusable agent configs at client.voice_agent.configurations.*.
When to use this product
- Discover / pin models:
client.manage.v1.models.list() returns the active STT/TTS set.
- Project admin: list/get/update/delete/leave projects.
- API key lifecycle: list/create/delete project keys.
- Member + invite management: add/remove members, manage roles, send/revoke invites.
- Usage + billing: query request volume, balances.
- Reusable Voice Agent configs: persist the
agent block of a Settings message on the server, reference by agent_id. The stored blob is the agent object only (listen / think / speak providers + prompt), not the full AgentV1Settings.
Use a different skill when:
- You want to actually talk to an agent →
deepgram-python-voice-agent.
- You want to transcribe or synthesize → STT/TTS skills.
Authentication
from dotenv import load_dotenv
load_dotenv()
from deepgram import DeepgramClient
client = DeepgramClient()
Header: Authorization: Token <api_key>. All methods are REST.
Quick start — projects + models
# Projects
projects = client.manage.v1.projects.list()
for p in projects.projects:
print(p.project_id, p.name)
project = client.manage.v1.projects.get(project_id=projects.projects[0].project_id)
client.manage.v1.projects.update(project_id=project.project_id, name="New name")
# client.manage.v1.projects.delete(project_id=...) # irreversible
# client.manage.v1.projects.leave(project_id=...)
# Models
models = client.manage.v1.models.list()
print("STT:", [m.canonical_name for m in models.stt])
print("TTS:", [m.canonical_name for m in models.tts])
# Include deprecated/outdated models
older = client.manage.v1.models.list(include_outdated=True)
# Per-project model access
project_models = client.manage.v1.projects.models.list(project_id=project.project_id)
Quick start — keys / members / invites / usage / billing
All project-scoped resources live under client.manage.v1.projects.*:
# Keys — `create` takes a single `request=` payload, not top-level kwargs
keys = client.manage.v1.projects.keys.list(project_id=pid)
client.manage.v1.projects.keys.create(
project_id=pid,
request={"comment": "CI key", "scopes": ["usage:write"]},
)
client.manage.v1.projects.keys.delete(project_id=pid, key_id=kid)
# Members + invites (invites are nested under members; method is `create`, not `send`)
members = client.manage.v1.projects.members.list(project_id=pid)
invites = client.manage.v1.projects.members.invites.list(project_id=pid)
client.manage.v1.projects.members.invites.create(project_id=pid, email="new@example.com", scope="member")
# Usage (get, not list) + billing balances (nested)
usage = client.manage.v1.projects.usage.get(project_id=pid)
usage_breakdown = client.manage.v1.projects.usage.breakdown.list(project_id=pid)
balance = client.manage.v1.projects.billing.balances.get(project_id=pid)
See examples/51-55 for each sub-module.
Quick start — Voice Agent configurations
# List reusable configs
configs = client.voice_agent.configurations.list(project_id=pid)
# Create: `config` is a JSON string of the `agent` BLOCK ONLY — not the full
# Settings message. Do NOT include top-level Settings fields like `audio`;
# those are sent at connect-time in the live Settings message. The stored
# `agent_id` later replaces the inline `agent` object in a Settings message.
import json
config_json = json.dumps({
"listen": {"provider": {"type": "deepgram", "model": "nova-3"}},
"think": {"provider": {"type": "open_ai", "model": "gpt-4o-mini"}, "prompt": "..."},
"speak": {"provider": {"type": "deepgram", "model": "aura-2-asteria-en"}},
})
created = client.voice_agent.configurations.create(
project_id=pid,
config=config_json,
metadata={"label": "support-en"},
)
print(created.agent_id)
# Update metadata (immutable config body — create a new one to change behavior)
client.voice_agent.configurations.update(project_id=pid, agent_id=created.agent_id, metadata={"label": "v2"})
# Get / delete agent_id=created.agent_id)
# client.voice_agent.configurations.delete(project_id=pid, agent_id=...)
Think-provider model discovery (which LLMs Agent supports):
think_models = client.agent.v1.settings.think.models.list()
Async equivalent
from deepgram import AsyncDeepgramClient
client = AsyncDeepgramClient()
projects = await client.manage.v1.projects.list()
API reference (layered)
- In-repo reference:
reference.md — "Manage V1 Projects/Keys/Members/Invites/Usage/Billing/Models", "Voice Agent Configurations".
- OpenAPI (REST): https://developers.deepgram.com/openapi.yaml
- Context7: library ID
/llmstxt/developers_deepgram_llms_txt.
- Product docs:
Gotchas
Token auth, not Bearer.
- Project-scoped resources are nested under
.projects.*. There is no top-level client.manage.v1.keys / .members / .invites / .usage / .billing. Use client.manage.v1.projects.keys, ...projects.members, ...projects.members.invites, ...projects.usage, ...projects.billing.balances, and ...projects.requests for request logs. The only top-level client.manage.v1.* namespaces are projects and models.
- Think-model discovery is on the Agent client, not Manage:
client.agent.v1.settings.think.models.list(). There is no client.manage.v1.agent.*.
- Agent config body is a JSON STRING on create, not a nested object. Pass
config=json.dumps(...).
- Agent config is the
agent block only, not the full Settings message. Do not include top-level fields like audio — those go in the live Settings message at connect time.
- Agent configs are immutable — you cannot edit the config body. Create a new one to change behavior. Only metadata is mutable.
- Use
include_outdated=True on models.list() when pinning older models.
- Delete is irreversible. Wire tests typically comment out destructive calls.
- Project-scoped vs global models:
client.manage.v1.models.list() returns all; client.manage.v1.projects.models.list(project_id=...) returns what the project can access.
- Returned agent configs are uninterpolated — raw stored JSON string. Parse before use.
Example files in this repo
examples/50-management-projects.py
examples/51-management-keys.py
examples/52-management-members.py
examples/53-management-invites.py
examples/54-management-usage.py
examples/55-management-billing.py
examples/56-management-models.py
tests/wire/test_manage_v1_projects.py
tests/wire/test_manage_v1_models.py
tests/wire/test_voiceAgent_configurations.py
Related skills
deepgram-python-voice-agent — run an agent (use a config created here)
Central product skills
For cross-language Deepgram product knowledge — the consolidated API reference, documentation finder, focused runnable recipes, third-party integration examples, and MCP setup — install the central skills:
npx skills add deepgram/skills
This SDK ships language-idiomatic code skills; deepgram/skills ships cross-language product knowledge (see api, docs, recipes, examples, starters, setup-mcp).
1---2name: deepgram-python-management-api3description: Use when writing or reviewing Python code in this repo that calls Deepgram Management APIs - projects, API keys, members, invites, usage, billing, models, and reusable Voice Agent configurations. Covers `client.manage.v1.projects`, project-scoped resources under `client.manage.v1.projects.*` (keys, members, members.invites, usage, billing, models, requests), global `client.manage.v1.models`, think-model discovery at `client.agent.v1.settings.think.models`, and `client.voice_agent.configurations.*`. Use `deepgram-python-voice-agent` when you want to run an agent interactively, this skill to PERSIST/LIST agent configs. Triggers include "management API", "list projects", "API keys", "members", "usage stats", "billing", "list models", "agent configurations", "manage.v1".4---56# Using Deepgram Management API (Python SDK)78Administrative REST endpoints at `api.deepgram.com/v1/projects`, `/v1/models`, and reusable agent configuration storage. Project-scoped resources live under `client.manage.v1.projects.*` (keys, members, members.invites, usage, billing, models, requests). Global models at `client.manage.v1.models`. Think-model discovery at `client.agent.v1.settings.think.models`. Reusable agent configs at `client.voice_agent.configurations.*`.910## When to use this product1112- **Discover / pin models**: `client.manage.v1.models.list()` returns the active STT/TTS set.13- **Project admin**: list/get/update/delete/leave projects.14- **API key lifecycle**: list/create/delete project keys.15- **Member + invite management**: add/remove members, manage roles, send/revoke invites.16- **Usage + billing**: query request volume, balances.17- **Reusable Voice Agent configs**: persist the **`agent` block** of a Settings message on the server, reference by `agent_id`. The stored blob is the `agent` object only (listen / think / speak providers + prompt), not the full `AgentV1Settings`.1819**Use a different skill when:**20- You want to actually talk to an agent → `deepgram-python-voice-agent`.21- You want to transcribe or synthesize → STT/TTS skills.2223## Authentication2425```python26from dotenv import load_dotenv27load_dotenv()2829from deepgram import DeepgramClient30client = DeepgramClient()31```3233Header: `Authorization: Token <api_key>`. All methods are REST.3435## Quick start — projects + models3637```python38# Projects39projects = client.manage.v1.projects.list()40for p in projects.projects:41 print(p.project_id, p.name)4243project = client.manage.v1.projects.get(project_id=projects.projects[0].project_id)44client.manage.v1.projects.update(project_id=project.project_id, name="New name")45# client.manage.v1.projects.delete(project_id=...) # irreversible46# client.manage.v1.projects.leave(project_id=...)4748# Models49models = client.manage.v1.models.list()50print("STT:", [m.canonical_name for m in models.stt])51print("TTS:", [m.canonical_name for m in models.tts])5253# Include deprecated/outdated models54older = client.manage.v1.models.list(include_outdated=True)5556# Per-project model access57project_models = client.manage.v1.projects.models.list(project_id=project.project_id)58```5960## Quick start — keys / members / invites / usage / billing6162All project-scoped resources live under `client.manage.v1.projects.*`:6364```python65# Keys — `create` takes a single `request=` payload, not top-level kwargs66keys = client.manage.v1.projects.keys.list(project_id=pid)67client.manage.v1.projects.keys.create(68 project_id=pid,69 request={"comment": "CI key", "scopes": ["usage:write"]},70)71client.manage.v1.projects.keys.delete(project_id=pid, key_id=kid)7273# Members + invites (invites are nested under members; method is `create`, not `send`)74members = client.manage.v1.projects.members.list(project_id=pid)75invites = client.manage.v1.projects.members.invites.list(project_id=pid)76client.manage.v1.projects.members.invites.create(project_id=pid, email="new@example.com", scope="member")7778# Usage (get, not list) + billing balances (nested)79usage = client.manage.v1.projects.usage.get(project_id=pid)80usage_breakdown = client.manage.v1.projects.usage.breakdown.list(project_id=pid)81balance = client.manage.v1.projects.billing.balances.get(project_id=pid)82```8384See `examples/51-55` for each sub-module.8586## Quick start — Voice Agent configurations8788```python89# List reusable configs90configs = client.voice_agent.configurations.list(project_id=pid)9192# Create: `config` is a JSON string of the `agent` BLOCK ONLY — not the full93# Settings message. Do NOT include top-level Settings fields like `audio`;94# those are sent at connect-time in the live Settings message. The stored95# `agent_id` later replaces the inline `agent` object in a Settings message.96import json97config_json = json.dumps({98 "listen": {"provider": {"type": "deepgram", "model": "nova-3"}},99 "think": {"provider": {"type": "open_ai", "model": "gpt-4o-mini"}, "prompt": "..."},100 "speak": {"provider": {"type": "deepgram", "model": "aura-2-asteria-en"}},101})102created = client.voice_agent.configurations.create(103 project_id=pid,104 config=config_json,105 metadata={"label": "support-en"},106)107print(created.agent_id)108109# Update metadata (immutable config body — create a new one to change behavior)110client.voice_agent.configurations.update(project_id=pid, agent_id=created.agent_id, metadata={"label": "v2"})111112# Get / delete113one = client.voice_agent.configurations.get(project_id=pid, agent_id=created.agent_id)114# client.voice_agent.configurations.delete(project_id=pid, agent_id=...)115```116117Think-provider model discovery (which LLMs Agent supports):118119```python120think_models = client.agent.v1.settings.think.models.list()121```122123## Async equivalent124125```python126from deepgram import AsyncDeepgramClient127client = AsyncDeepgramClient()128projects = await client.manage.v1.projects.list()129```130131## API reference (layered)1321331. **In-repo reference**: `reference.md` — "Manage V1 Projects/Keys/Members/Invites/Usage/Billing/Models", "Voice Agent Configurations".1342. **OpenAPI (REST)**: https://developers.deepgram.com/openapi.yaml1353. **Context7**: library ID `/llmstxt/developers_deepgram_llms_txt`.1364. **Product docs**:137 - https://developers.deepgram.com/reference/manage/projects/list138 - https://developers.deepgram.com/reference/manage/models/list139 - https://developers.deepgram.com/reference/voice-agent/agent-configurations/list-agent-configurations140 - https://developers.deepgram.com/reference/voice-agent/agent-configurations/create-agent-configuration141 - https://developers.deepgram.com/reference/voice-agent/think-models142143## Gotchas1441451. **`Token` auth, not `Bearer`.**1462. **Project-scoped resources are nested under `.projects.*`.** There is no top-level `client.manage.v1.keys` / `.members` / `.invites` / `.usage` / `.billing`. Use `client.manage.v1.projects.keys`, `...projects.members`, `...projects.members.invites`, `...projects.usage`, `...projects.billing.balances`, and `...projects.requests` for request logs. The only top-level `client.manage.v1.*` namespaces are `projects` and `models`.1473. **Think-model discovery is on the Agent client**, not Manage: `client.agent.v1.settings.think.models.list()`. There is no `client.manage.v1.agent.*`.1484. **Agent config body is a JSON STRING on create**, not a nested object. Pass `config=json.dumps(...)`.1495. **Agent config is the `agent` block only**, not the full Settings message. Do not include top-level fields like `audio` — those go in the live Settings message at connect time.1506. **Agent configs are immutable** — you cannot edit the config body. Create a new one to change behavior. Only metadata is mutable.1517. **Use `include_outdated=True`** on `models.list()` when pinning older models.1528. **Delete is irreversible.** Wire tests typically comment out destructive calls.1539. **Project-scoped vs global models**: `client.manage.v1.models.list()` returns all; `client.manage.v1.projects.models.list(project_id=...)` returns what the project can access.15410. **Returned agent configs are uninterpolated** — raw stored JSON string. Parse before use.155156## Example files in this repo157158- `examples/50-management-projects.py`159- `examples/51-management-keys.py`160- `examples/52-management-members.py`161- `examples/53-management-invites.py`162- `examples/54-management-usage.py`163- `examples/55-management-billing.py`164- `examples/56-management-models.py`165- `tests/wire/test_manage_v1_projects.py`166- `tests/wire/test_manage_v1_models.py`167- `tests/wire/test_voiceAgent_configurations.py`168169## Related skills170171- `deepgram-python-voice-agent` — run an agent (use a config created here)172173## Central product skills174175For cross-language Deepgram product knowledge — the consolidated API reference, documentation finder, focused runnable recipes, third-party integration examples, and MCP setup — install the central skills:176177```bash178npx skills add deepgram/skills179```180181This SDK ships language-idiomatic code skills; `deepgram/skills` ships cross-language product knowledge (see `api`, `docs`, `recipes`, `examples`, `starters`, `setup-mcp`).