Using Deepgram Management API (Rust SDK)
Use this skill for project/account administration against Deepgram's Manage APIs.
When to use this product
- Listing or updating projects.
- Managing project API keys, members, scopes, invitations, balances, and usage.
- Explaining which admin surfaces are available in the current crate.
Authentication
For a management-only install:
[dependencies]
deepgram = { version = "0.10.0", default-features = false, features = ["manage"] }
tokio = { version = "1", features = ["full"] }
let dg = deepgram::Deepgram::new(std::env::var("DEEPGRAM_API_KEY")?)?;
- Manage APIs require a regular API key with
Token auth.
- Temporary auth tokens created via
auth().grant(...) do not work for Manage APIs.
Quick start
Quick start: projects + usage
use deepgram::{
manage::{projects::options::Options as ProjectOptions, usage::get_usage_options},
Deepgram,
};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let api_key = std::env::var("DEEPGRAM_API_KEY")?;
let project_id = std::env::var("DEEPGRAM_PROJECT_ID")?;
let dg = Deepgram::new(&api_key)?;
let projects = dg.projects().list().await?;
println!("{projects:#?}");
let project = dg.projects().get(&project_id).await?;
println!("{project:#?}");
let update = ProjectOptions::builder()
.name("The Transcribinator")
.company("Doofenshmirtz Evil Incorporated")
.build();
let message = dg.projects().update(&project_id, &update).await?;
println!("{}", message.message);
let usage_options = get_usage_options::Options::builder().build();
let usage = dg.usage().get_usage(&project_id, &usage_options).await?;
println!("{usage:#?}");
Ok(())
}
Key parameters
- Project APIs:
projects().list(), get(project_id), update(project_id, &options), delete(project_id).
- Key APIs:
keys().list(project_id), get(project_id, key_id), create(project_id, &options), delete(project_id, key_id).
- Member APIs:
members().list_members(project_id), remove_member(project_id, member_id).
- Scope APIs:
scopes().get_scope(project_id, member_id), update_scope(project_id, member_id, scope).
- Billing APIs:
billing().list_balance(project_id), get_balance(project_id, balance_id).
- Usage APIs:
usage().list_requests(...), get_request(...), get_usage(...), get_fields(...).
- Invitation API:
invitations().leave_project(project_id).
API reference (layered)
- In-repo
src/manage/projects.rs
src/manage/keys.rs
src/manage/members.rs
src/manage/scopes.rs
src/manage/billing.rs
src/manage/usage.rs
src/manage/invitations.rs
examples/manage/*.rs
- OpenAPI
- Raw spec:
https://developers.deepgram.com/openapi.yaml
- Examples:
https://developers.deepgram.com/reference/manage/usage/get, https://developers.deepgram.com/reference/manage/keys/list
- AsyncAPI
- Not applicable for the Rust crate's current management surface
- Context7
/llmstxt/developers_deepgram_llms_txt
- Product docs
https://developers.deepgram.com/reference/
https://developers.deepgram.com/docs/create-additional-api-keys
Gotchas
- Use API keys, not temp tokens.
auth().grant(...) explicitly does not authorize Manage APIs.
- Examples in
examples/manage/ are useful, but source files are the source of truth. Prefer src/manage/*.rs when you need exact method names and return types.
- Admin traffic stays on hosted Deepgram. Even with
with_base_url(...), billing/usage/key-management still target https://api.deepgram.com.
Example files in this repo
examples/manage/projects.rs
examples/manage/keys.rs
examples/manage/members.rs
examples/manage/scopes.rs
examples/manage/billing.rs
examples/manage/usage.rs
examples/manage/invitations.rs
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-rust-management-api3description: Use when implementing Deepgram project, key, member, scope, billing, invitation, or usage operations from the Rust SDK, including manage feature flags and the real Deepgram::projects/keys/members/scopes/billing/usage APIs.4---56# Using Deepgram Management API (Rust SDK)78Use this skill for project/account administration against Deepgram's Manage APIs.910## When to use this product1112- Listing or updating projects.13- Managing project API keys, members, scopes, invitations, balances, and usage.14- Explaining which admin surfaces are available in the current crate.1516## Authentication1718For a management-only install:1920```toml21[dependencies]22deepgram = { version = "0.10.0", default-features = false, features = ["manage"] }23tokio = { version = "1", features = ["full"] }24```2526```rust27let dg = deepgram::Deepgram::new(std::env::var("DEEPGRAM_API_KEY")?)?;28```2930- Manage APIs require a regular API key with `Token` auth.31- Temporary auth tokens created via `auth().grant(...)` do **not** work for Manage APIs.3233## Quick start3435## Quick start: projects + usage3637```rust38use deepgram::{39 manage::{projects::options::Options as ProjectOptions, usage::get_usage_options},40 Deepgram,41};4243#[tokio::main]44async fn main() -> Result<(), Box<dyn std::error::Error>> {45 let api_key = std::env::var("DEEPGRAM_API_KEY")?;46 let project_id = std::env::var("DEEPGRAM_PROJECT_ID")?;47 let dg = Deepgram::new(&api_key)?;4849 let projects = dg.projects().list().await?;50 println!("{projects:#?}");5152 let project = dg.projects().get(&project_id).await?;53 println!("{project:#?}");5455 let update = ProjectOptions::builder()56 .name("The Transcribinator")57 .company("Doofenshmirtz Evil Incorporated")58 .build();59 let message = dg.projects().update(&project_id, &update).await?;60 println!("{}", message.message);6162 let usage_options = get_usage_options::Options::builder().build();63 let usage = dg.usage().get_usage(&project_id, &usage_options).await?;64 println!("{usage:#?}");6566 Ok(())67}68```6970## Key parameters7172- Project APIs: `projects().list()`, `get(project_id)`, `update(project_id, &options)`, `delete(project_id)`.73- Key APIs: `keys().list(project_id)`, `get(project_id, key_id)`, `create(project_id, &options)`, `delete(project_id, key_id)`.74- Member APIs: `members().list_members(project_id)`, `remove_member(project_id, member_id)`.75- Scope APIs: `scopes().get_scope(project_id, member_id)`, `update_scope(project_id, member_id, scope)`.76- Billing APIs: `billing().list_balance(project_id)`, `get_balance(project_id, balance_id)`.77- Usage APIs: `usage().list_requests(...)`, `get_request(...)`, `get_usage(...)`, `get_fields(...)`.78- Invitation API: `invitations().leave_project(project_id)`.7980## API reference (layered)81821. **In-repo**83 - `src/manage/projects.rs`84 - `src/manage/keys.rs`85 - `src/manage/members.rs`86 - `src/manage/scopes.rs`87 - `src/manage/billing.rs`88 - `src/manage/usage.rs`89 - `src/manage/invitations.rs`90 - `examples/manage/*.rs`912. **OpenAPI**92 - Raw spec: `https://developers.deepgram.com/openapi.yaml`93 - Examples: `https://developers.deepgram.com/reference/manage/usage/get`, `https://developers.deepgram.com/reference/manage/keys/list`943. **AsyncAPI**95 - Not applicable for the Rust crate's current management surface964. **Context7**97 - `/llmstxt/developers_deepgram_llms_txt`985. **Product docs**99 - `https://developers.deepgram.com/reference/`100 - `https://developers.deepgram.com/docs/create-additional-api-keys`101102## Gotchas1031041. **Use API keys, not temp tokens.** `auth().grant(...)` explicitly does not authorize Manage APIs.1052. **Examples in `examples/manage/` are useful, but source files are the source of truth.** Prefer `src/manage/*.rs` when you need exact method names and return types.1063. **Admin traffic stays on hosted Deepgram.** Even with `with_base_url(...)`, billing/usage/key-management still target `https://api.deepgram.com`.107108## Example files in this repo109110- `examples/manage/projects.rs`111- `examples/manage/keys.rs`112- `examples/manage/members.rs`113- `examples/manage/scopes.rs`114- `examples/manage/billing.rs`115- `examples/manage/usage.rs`116- `examples/manage/invitations.rs`117118## Central product skills119120For 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:121122```bash123npx skills add deepgram/skills124```125126This SDK ships language-idiomatic code skills; `deepgram/skills` ships cross-language product knowledge (see `api`, `docs`, `recipes`, `examples`, `starters`, `setup-mcp`).