Deepgram Cost TuningSAFE
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
Overview
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
4f83675ca38aOBSERVED · 2026-10-08Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| claude-code | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
--- name: deepgram-cost-tuning description: 'Optimize Deepgram costs and usage for budget-conscious deployments. Use when reducing transcription costs, implementing usage controls, or optimizing pricing tier utilization. Trigger: "deepgram cost", "reduce deepgram spending", "deepgram pricing", "deepgram budget", "optimize deepgram usage", "deepgram billing". ' allowed-tools: Read, Write, Edit, Bash(ffmpeg:*) version: 1.13.0 license: MIT author: Jeremy Longshore <[email protected]> tags: - saas - deepgram - cost-optimization - billing compatibility: Designed for Claude Code --- # Deepgram Cost Tuning ## Prerequisites - An aggregate usage/cost baseline, approved budget owner, delivery/quality SLO, and data/retention policy. - Synthetic fixtures and a reversible optimization/change record. ## Examples Compare aggregate duration, model, concurrency, and error data in a development/staging workload, change one approved model or batching parameter, and observe the quality/latency/cost tradeoff. Revert if quality or reliability drops; do not reduce retention, privacy, or consent safeguards merely to lower spend. ## Overview Optimize Deepgram API costs through smart model selection, audio preprocessing to reduce billable minutes, usage monitoring via the Deepgram API, budget guardrails, and feature-aware cost estimation. Deepgram bills per audio minute processed. ## Deepgram Pricing (2026) | Product | Model | Price/Minute | Notes | |---------|-------|-------------|-------| | STT (Batch) | Nova-3 | $0.0043 | Best accuracy | | STT (Batch) | Nova-2 | $0.0043 | Proven stable | | STT (Streaming) | Nova-3 | $0.0059 | Real-time | | STT (Streaming) | Nova-2 | $0.0059 | Real-time | | STT (Batch) | Base | $0.0048 | Fastest | | STT (Batch) | Whisper | $0.0048 | Multilingual | | TTS | Aura-2 | Pay-per-character | See TTS pricing | | Intelligence | Summarize/Topics/Sentiment | Included with STT | No extra cost | **Add-on costs:** - Diarization: +$0.0044/min - Multichannel: billed per channel ## Instructions ### Step 1: Budget-Aware Transcription Service ```typescript import { createClient } from '@deepgram/sdk'; interface BudgetConfig { monthlyLimitUsd: number; warningThreshold: number; // 0.0-1.0 (e.g., 0.8 = warn at 80%) costPerMinute: number; // Base STT cost } class BudgetAwareTranscriber { private client: ReturnType<typeof createClient>; private config: BudgetConfig; private monthlySpendUsd = 0; private monthlyMinutes = 0; constructor(apiKey: string, config: BudgetConfig) { this.client = createClient(apiKey); this.config = config; } async transcribe(source: any, options: any) { // Estimate cost before transcription const estimatedCost = this.estimateCost(options); const projected = this.monthlySpendUsd + estimatedCost; if (projected > this.config.monthlyLimitUsd) { throw new Error( `Budget exceeded: $${this.monthlySpendUsd.toFixed(2)} spent, ` + `$${this.config.monthlyLimitUsd} limit` ); } if (projected > this.config.monthlyLimitUsd * this.config.warningThreshold) { console.warn( `Budget warning: ${((projected / this.config.monthlyLimitUsd) * 100).toFixed(0)}% ` + `of $${this.config.monthlyLimitUsd} limit` ); } const { result, error } = await this.client.listen.prerecorded.transcribeUrl( source, options ); if (error) throw error; // Track actual usage const duration = result.metadata.duration / 60; // Convert to minutes const actualCost = this.calculateCost(duration, options); this.monthlyMinutes += duration; this.monthlySpendUsd += actualCost; return result; } private estimateCost(options: any): number { // Conservative estimate — assume 5 minutes per file return this.calculateCost(5, options); } private calculateCost(minutes: number, options: any): number { let cost = minutes * this.config.costPerMinute; if (options.diarize) cost += minutes * 0.0044; // Diarization add-on return cost; } getUsageSummary() { return { minutesUsed: this.monthlyMinutes.toFixed(1), spentUsd: this.monthlySpendUsd.toFixed(4), remainingUsd: (this.config.monthlyLimitUsd - this.monthlySpendUsd).toFixed(4), utilizationPercent: ((this.monthlySpendUsd / this.config.monthlyLimitUsd) * 100).toFixed(1), }; } } // Usage: const transcriber = new BudgetAwareTranscriber(process.env.DEEPGRAM_API_KEY!, { monthlyLimitUsd: 100, warningThreshold: 0.8, costPerMinute: 0.0043, }); ``` ### Step 2: Reduce Billable Minutes with Audio Preprocessing ```bash # Remove silence — can save 10-40% of billable minutes ffmpeg -i input.wav \ -af "silenceremove=stop_periods=-1:stop_duration=0.5:stop_threshold=-30dB" \ -ar 16000 -ac 1 -acodec pcm_s16le \ trimmed.wav # Speed up audio (1.25x) — saves 20% of billable minutes # Deepgram handles slightly sped-up audio well ffmpeg -i input.wav \ -filter:a "atempo=1.25" \ -ar 16000 -ac 1 -acodec pcm_s16le \ faster.wav ``` ```typescript import { execSync } from 'child_process'; function measureSavings(inputPath: string) { // Get original duration const origDuration = parseFloat( execSync(`ffprobe -v quiet -show_entries format=duration -of csv=p=0 "${inputPath}"`) .toString().trim() ); // Remove silence execSync(`ffmpeg -y -i "${inputPath}" \ -af "silenceremove=stop_periods=-1:stop_duration=0.5:stop_threshold=-30dB" \ -ar 16000 -ac 1 -acodec pcm_s16le /tmp/trimmed.wav 2>/dev/null`); const trimmedDuration = parseFloat( execSync(`ffprobe -v quiet -show_entries format=duration -of csv=p=0 /tmp/trimmed.wav`) .toString().trim() ); const savings = ((1 - trimmedDuration / origDuration) * 100).toFixed(1); const costSaved = ((origDuration - trimmedDuration) / 60 * 0.0043).toFixed(4); console.log(`Original: ${origDuration.toFixed(1)}s`); console.log(`Trimmed: ${trimmedDuration.toFixed
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (0)
No findings outside the package's declared scope.
Gates applied: no_behavioural_pass.
4f83675ca38afull audit observations/trust-audit/skill/jeremylongshore__deepgram-cost-tuning.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 4f83675ca38a | SAFE | B | 89 | first audit |
Questions
What does the Deepgram Cost Tuning skill do?
Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.
Is Deepgram Cost Tuning safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Deepgram Cost Tuning access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
Which assistants does Deepgram Cost Tuning work with?
Its documentation mentions claude-code. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (4f83675ca38a), read on 2026-10-08. The repository is watched, and a new audit runs when it changes — this is the first audit.