[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78ZC84BXT96RYDZTR4FK79E":3,"skill-same:01M78ZC84BXT96RYDZTR4FK79E":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":6,"ownerHtmlUrl":39,"ownerBlogUrl":40,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M78ZC84BXT96RYDZTR4FK79E","deepgram-cost-tuning",null,"Optimize Deepgram costs and usage for budget-conscious deployments.\nUse when reducing transcription costs, implementing usage controls,\nor optimizing pricing tier utilization.\nTrigger: \"deepgram cost\", \"reduce deepgram spending\", \"deepgram pricing\",\n\"deepgram budget\", \"optimize deepgram usage\", \"deepgram billing\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--deepgram-pack--deepgram-cost-tuning\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: deepgram-cost-tuning\ndescription: |\n  Optimize Deepgram costs and usage for budget-conscious deployments.\n  Use when reducing transcription costs, implementing usage controls,\n  or optimizing pricing tier utilization.\n  Trigger: \"deepgram cost\", \"reduce deepgram spending\", \"deepgram pricing\",\n  \"deepgram budget\", \"optimize deepgram usage\", \"deepgram billing\".\nallowed-tools: Read, Write, Edit, Bash(ffmpeg:*)\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ncompatible-with: claude-code, codex, openclaw\ntags: [saas, deepgram, cost-optimization, billing]\n---\n# Deepgram Cost Tuning\n\n## Overview\nOptimize 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.\n\n## Deepgram Pricing (2026)\n\n| Product | Model | Price\u002FMinute | Notes |\n|---------|-------|-------------|-------|\n| STT (Batch) | Nova-3 | $0.0043 | Best accuracy |\n| STT (Batch) | Nova-2 | $0.0043 | Proven stable |\n| STT (Streaming) | Nova-3 | $0.0059 | Real-time |\n| STT (Streaming) | Nova-2 | $0.0059 | Real-time |\n| STT (Batch) | Base | $0.0048 | Fastest |\n| STT (Batch) | Whisper | $0.0048 | Multilingual |\n| TTS | Aura-2 | Pay-per-character | See TTS pricing |\n| Intelligence | Summarize\u002FTopics\u002FSentiment | Included with STT | No extra cost |\n\n**Add-on costs:**\n- Diarization: +$0.0044\u002Fmin\n- Multichannel: billed per channel\n\n## Instructions\n\n### Step 1: Budget-Aware Transcription Service\n\n```typescript\nimport { createClient } from '@deepgram\u002Fsdk';\n\ninterface BudgetConfig {\n  monthlyLimitUsd: number;\n  warningThreshold: number;  \u002F\u002F 0.0-1.0 (e.g., 0.8 = warn at 80%)\n  costPerMinute: number;     \u002F\u002F Base STT cost\n}\n\nclass BudgetAwareTranscriber {\n  private client: ReturnType\u003Ctypeof createClient>;\n  private config: BudgetConfig;\n  private monthlySpendUsd = 0;\n  private monthlyMinutes = 0;\n\n  constructor(apiKey: string, config: BudgetConfig) {\n    this.client = createClient(apiKey);\n    this.config = config;\n  }\n\n  async transcribe(source: any, options: any) {\n    \u002F\u002F Estimate cost before transcription\n    const estimatedCost = this.estimateCost(options);\n    const projected = this.monthlySpendUsd + estimatedCost;\n\n    if (projected > this.config.monthlyLimitUsd) {\n      throw new Error(\n        `Budget exceeded: $${this.monthlySpendUsd.toFixed(2)} spent, ` +\n        `$${this.config.monthlyLimitUsd} limit`\n      );\n    }\n\n    if (projected > this.config.monthlyLimitUsd * this.config.warningThreshold) {\n      console.warn(\n        `Budget warning: ${((projected \u002F this.config.monthlyLimitUsd) * 100).toFixed(0)}% ` +\n        `of $${this.config.monthlyLimitUsd} limit`\n      );\n    }\n\n    const { result, error } = await this.client.listen.prerecorded.transcribeUrl(\n      source, options\n    );\n    if (error) throw error;\n\n    \u002F\u002F Track actual usage\n    const duration = result.metadata.duration \u002F 60;  \u002F\u002F Convert to minutes\n    const actualCost = this.calculateCost(duration, options);\n    this.monthlyMinutes += duration;\n    this.monthlySpendUsd += actualCost;\n\n    return result;\n  }\n\n  private estimateCost(options: any): number {\n    \u002F\u002F Conservative estimate — assume 5 minutes per file\n    return this.calculateCost(5, options);\n  }\n\n  private calculateCost(minutes: number, options: any): number {\n    let cost = minutes * this.config.costPerMinute;\n    if (options.diarize) cost += minutes * 0.0044;  \u002F\u002F Diarization add-on\n    return cost;\n  }\n\n  getUsageSummary() {\n    return {\n      minutesUsed: this.monthlyMinutes.toFixed(1),\n      spentUsd: this.monthlySpendUsd.toFixed(4),\n      remainingUsd: (this.config.monthlyLimitUsd - this.monthlySpendUsd).toFixed(4),\n      utilizationPercent: ((this.monthlySpendUsd \u002F this.config.monthlyLimitUsd) * 100).toFixed(1),\n    };\n  }\n}\n\n\u002F\u002F Usage:\nconst transcriber = new BudgetAwareTranscriber(process.env.DEEPGRAM_API_KEY!, {\n  monthlyLimitUsd: 100,\n  warningThreshold: 0.8,\n  costPerMinute: 0.0043,\n});\n```\n\n### Step 2: Reduce Billable Minutes with Audio Preprocessing\n\n```bash\n# Remove silence — can save 10-40% of billable minutes\nffmpeg -i input.wav \\\n  -af \"silenceremove=stop_periods=-1:stop_duration=0.5:stop_threshold=-30dB\" \\\n  -ar 16000 -ac 1 -acodec pcm_s16le \\\n  trimmed.wav\n\n# Speed up audio (1.25x) — saves 20% of billable minutes\n# Deepgram handles slightly sped-up audio well\nffmpeg -i input.wav \\\n  -filter:a \"atempo=1.25\" \\\n  -ar 16000 -ac 1 -acodec pcm_s16le \\\n  faster.wav\n```\n\n```typescript\nimport { execSync } from 'child_process';\n\nfunction measureSavings(inputPath: string) {\n  \u002F\u002F Get original duration\n  const origDuration = parseFloat(\n    execSync(`ffprobe -v quiet -show_entries format=duration -of csv=p=0 \"${inputPath}\"`)\n      .toString().trim()\n  );\n\n  \u002F\u002F Remove silence\n  execSync(`ffmpeg -y -i \"${inputPath}\" \\\n    -af \"silenceremove=stop_periods=-1:stop_duration=0.5:stop_threshold=-30dB\" \\\n    -ar 16000 -ac 1 -acodec pcm_s16le \u002Ftmp\u002Ftrimmed.wav 2>\u002Fdev\u002Fnull`);\n\n  const trimmedDuration = parseFloat(\n    execSync(`ffprobe -v quiet -show_entries format=duration -of csv=p=0 \u002Ftmp\u002Ftrimmed.wav`)\n      .toString().trim()\n  );\n\n  const savings = ((1 - trimmedDuration \u002F origDuration) * 100).toFixed(1);\n  const costSaved = ((origDuration - trimmedDuration) \u002F 60 * 0.0043).toFixed(4);\n\n  console.log(`Original: ${origDuration.toFixed(1)}s`);\n  console.log(`Trimmed: ${trimmedDuration.toFixed(1)}s`);\n  console.log(`Savings: ${savings}% (${costSaved}\u002Ffile at $0.0043\u002Fmin)`);\n}\n```\n\n### Step 3: Query Deepgram Usage API\n\n```typescript\nimport { createClient } from '@deepgram\u002Fsdk';\n\nasync function getUsageDashboard(projectId: string) {\n  const client = createClient(process.env.DEEPGRAM_API_KEY!);\n\n  \u002F\u002F Get usage for current month\n  const now = new Date();\n  const monthStart = new Date(now.getFullYear(), now.getMonth(), 1);\n\n  const { result } = await client.manage.getUsage(projectId, {\n    start: monthStart.toISOString(),\n    end: now.toISOString(),\n  });\n\n  \u002F\u002F Aggregate by model\n  const byModel: Record\u003Cstring, { minutes: number; cost: number }> = {};\n  for (const entry of (result as any).results ?? []) {\n    const model = entry.model ?? 'unknown';\n    if (!byModel[model]) byModel[model] = { minutes: 0, cost: 0 };\n    byModel[model].minutes += (entry.hours ?? 0) * 60 + (entry.minutes ?? 0);\n  }\n\n  console.log('=== Monthly Usage ===');\n  for (const [model, data] of Object.entries(byModel)) {\n    const cost = data.minutes * 0.0043;\n    console.log(`${model}: ${data.minutes.toFixed(1)} min ($${cost.toFixed(2)})`);\n  }\n\n  \u002F\u002F Monthly projection\n  const dayOfMonth = now.getDate();\n  const daysInMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0).getDate();\n  const totalMinutes = Object.values(byModel).reduce((s, d) => s + d.minutes, 0);\n  const projectedMinutes = (totalMinutes \u002F dayOfMonth) * daysInMonth;\n  const projectedCost = projectedMinutes * 0.0043;\n\n  console.log(`\\nProjected monthly: ${projectedMinutes.toFixed(0)} min ($${projectedCost.toFixed(2)})`);\n}\n```\n\n### Step 4: Cost-Optimized Model Selection\n\n```typescript\nfunction recommendModel(params: {\n  qualityNeeded: 'high' | 'medium' | 'low';\n  isRealtime: boolean;\n  languages: string[];\n  budgetPerMinute?: number;\n}): { model: string; pricePerMin: number; reason: string } {\n  const { qualityNeeded, isRealtime, languages, budgetPerMinute } = params;\n\n  \u002F\u002F Multilingual -> Whisper\n  if (languages.length > 1 || !['en', 'es', 'fr', 'de'].includes(languages[0])) {\n    return { model: 'whisper-large', pricePerMin: 0.0048, reason: 'Multilingual support' };\n  }\n\n  \u002F\u002F Budget constraint\n  if (budgetPerMinute !== undefined && budgetPerMinute \u003C 0.005) {\n    return { model: 'nova-2', pricePerMin: 0.0043, reason: 'Best price per quality' };\n  }\n\n  \u002F\u002F Real-time -> Nova-3 (streaming price $0.0059\u002Fmin)\n  if (isRealtime) {\n    return { model: 'nova-3', pricePerMin: 0.0059, reason: 'Best real-time accuracy' };\n  }\n\n  \u002F\u002F Quality based\n  switch (qualityNeeded) {\n    case 'high':\n      return { model: 'nova-3', pricePerMin: 0.0043, reason: 'Highest accuracy' };\n    case 'medium':\n      return { model: 'nova-2', pricePerMin: 0.0043, reason: 'Good accuracy, proven' };\n    case 'low':\n      return { model: 'base', pricePerMin: 0.0048, reason: 'Fastest processing' };\n  }\n}\n```\n\n### Step 5: Feature Cost Awareness\n\n```typescript\n\u002F\u002F Feature cost breakdown per minute of audio\nconst featureCosts: Record\u003Cstring, { cost: number; description: string }> = {\n  \u002F\u002F Free features (included with STT)\n  smart_format:   { cost: 0,      description: 'Punctuation + paragraphs + numerals' },\n  punctuate:      { cost: 0,      description: 'Punctuation only' },\n  paragraphs:     { cost: 0,      description: 'Paragraph formatting' },\n  summarize:      { cost: 0,      description: 'AI summary (included with STT)' },\n  detect_topics:  { cost: 0,      description: 'Topic detection (included)' },\n  sentiment:      { cost: 0,      description: 'Sentiment analysis (included)' },\n  intents:        { cost: 0,      description: 'Intent recognition (included)' },\n  redact:         { cost: 0,      description: 'PII redaction (included)' },\n\n  \u002F\u002F Paid add-ons\n  diarize:        { cost: 0.0044, description: 'Speaker identification (+$0.0044\u002Fmin)' },\n  multichannel:   { cost: 0.0043, description: 'Per-channel billing (1x STT cost per channel)' },\n};\n\nfunction estimateJobCost(params: {\n  durationMinutes: number;\n  model: string;\n  features: string[];\n  channels?: number;\n}): number {\n  const baseCost = params.durationMinutes * 0.0043;\n  let addOnCost = 0;\n\n  for (const feature of params.features) {\n    addOnCost += (featureCosts[feature]?.cost ?? 0) * params.durationMinutes;\n  }\n\n  \u002F\u002F Multichannel: billed per channel\n  const channelMultiplier = params.channels ?? 1;\n\n  return (baseCost + addOnCost) * channelMultiplier;\n}\n\n\u002F\u002F Example: 60 min meeting with diarization\n\u002F\u002F estimateJobCost({ durationMinutes: 60, model: 'nova-3', features: ['diarize'] })\n\u002F\u002F = (60 * 0.0043) + (60 * 0.0044) = $0.258 + $0.264 = $0.522\n```\n\n## Output\n- Budget-aware transcription with auto-blocking\n- Audio preprocessing to reduce billable minutes\n- Usage dashboard via Deepgram API\n- Cost-optimized model recommendation\n- Feature cost breakdown with estimation\n\n## Cost Optimization Quick Wins\n\n| Strategy | Savings | Effort |\n|----------|---------|--------|\n| Remove silence from audio | 10-40% | Low (ffmpeg one-liner) |\n| Disable diarization when not needed | ~50% | Low (remove option) |\n| Use callback for long files | Indirect (no timeouts) | Low |\n| Cache repeated transcriptions | 20-60% | Medium (Redis) |\n| Speed up audio 1.25x | 20% | Low (ffmpeg) |\n| Use Nova-2 instead of Nova-3 | 0% (same price) | None |\n| Batch pre-recorded vs streaming | 37% ($0.0043 vs $0.0059) | Medium |\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Budget exceeded | No controls | Enable budget check before transcription |\n| Unexpected charges | Diarization always on | Make diarization opt-in |\n| Usage API empty | Wrong project ID | Get ID from `getProjects()` |\n| Cost spike | Batch job without limits | Set concurrency limits + budget cap |\n\n## Resources\n- [Deepgram Pricing](https:\u002F\u002Fdeepgram.com\u002Fpricing)\n- [Usage API](https:\u002F\u002Fdevelopers.deepgram.com\u002Freference\u002Fget-usage)\n- [Cost Optimization Guide](https:\u002F\u002Fdevelopers.deepgram.com\u002Fdocs\u002Fcost-optimization)\n","# Deepgram Cost Tuning\n\n## Overview\nOptimize 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.\n\n## Deepgram Pricing (2026)\n\n| Product | Model | Price\u002FMinute | Notes |\n|---------|-------|-------------|-------|\n| STT (Batch) | Nova-3 | $0.0043 | Best accuracy |\n| STT (Batch) | Nova-2 | $0.0043 | Proven stable |\n| STT (Streaming) | Nova-3 | $0.0059 | Real-time |\n| STT (Streaming) | Nova-2 | $0.0059 | Real-time |\n| STT (Batch) | Base | $0.0048 | Fastest |\n| STT (Batch) | Whisper | $0.0048 | Multilingual |\n| TTS | Aura-2 | Pay-per-character | See TTS pricing |\n| Intelligence | Summarize\u002FTopics\u002FSentiment | Included with STT | No extra cost |\n\n**Add-on costs:**\n- Diarization: +$0.0044\u002Fmin\n- Multichannel: billed per channel\n\n## Instructions\n\n### Step 1: Budget-Aware Transcription Service\n\n```typescript\nimport { createClient } from '@deepgram\u002Fsdk';\n\ninterface BudgetConfig {\n  monthlyLimitUsd: number;\n  warningThreshold: number;  \u002F\u002F 0.0-1.0 (e.g., 0.8 = warn at 80%)\n  costPerMinute: number;     \u002F\u002F Base STT cost\n}\n\nclass BudgetAwareTranscriber {\n  private client: ReturnType\u003Ctypeof createClient>;\n  private config: BudgetConfig;\n  private monthlySpendUsd = 0;\n  private monthlyMinutes = 0;\n\n  constructor(apiKey: string, config: BudgetConfig) {\n    this.client = createClient(apiKey);\n    this.config = config;\n  }\n\n  async transcribe(source: any, options: any) {\n    \u002F\u002F Estimate cost before transcription\n    const estimatedCost = this.estimateCost(options);\n    const projected = this.monthlySpendUsd + estimatedCost;\n\n    if (projected > this.config.monthlyLimitUsd) {\n      throw new Error(\n        `Budget exceeded: $${this.monthlySpendUsd.toFixed(2)} spent, ` +\n        `$${this.config.monthlyLimitUsd} limit`\n      );\n    }\n\n    if (projected > this.config.monthlyLimitUsd * this.config.warningThreshold) {\n      console.warn(\n        `Budget warning: ${((projected \u002F this.config.monthlyLimitUsd) * 100).toFixed(0)}% ` +\n        `of $${this.config.monthlyLimitUsd} limit`\n      );\n    }\n\n    const { result, error } = await this.client.listen.prerecorded.transcribeUrl(\n      source, options\n    );\n    if (error) throw error;\n\n    \u002F\u002F Track actual usage\n    const duration = result.metadata.duration \u002F 60;  \u002F\u002F Convert to minutes\n    const actualCost = this.calculateCost(duration, options);\n    this.monthlyMinutes += duration;\n    this.monthlySpendUsd += actualCost;\n\n    return result;\n  }\n\n  private estimateCost(options: any): number {\n    \u002F\u002F Conservative estimate — assume 5 minutes per file\n    return this.calculateCost(5, options);\n  }\n\n  private calculateCost(minutes: number, options: any): number {\n    let cost = minutes * this.config.costPerMinute;\n    if (options.diarize) cost += minutes * 0.0044;  \u002F\u002F Diarization add-on\n    return cost;\n  }\n\n  getUsageSummary() {\n    return {\n      minutesUsed: this.monthlyMinutes.toFixed(1),\n      spentUsd: this.monthlySpendUsd.toFixed(4),\n      remainingUsd: (this.config.monthlyLimitUsd - this.monthlySpendUsd).toFixed(4),\n      utilizationPercent: ((this.monthlySpendUsd \u002F this.config.monthlyLimitUsd) * 100).toFixed(1),\n    };\n  }\n}\n\n\u002F\u002F Usage:\nconst transcriber = new BudgetAwareTranscriber(process.env.DEEPGRAM_API_KEY!, {\n  monthlyLimitUsd: 100,\n  warningThreshold: 0.8,\n  costPerMinute: 0.0043,\n});\n```\n\n### Step 2: Reduce Billable Minutes with Audio Preprocessing\n\n```bash\n# Remove silence — can save 10-40% of billable minutes\nffmpeg -i input.wav \\\n  -af \"silenceremove=stop_periods=-1:stop_duration=0.5:stop_threshold=-30dB\" \\\n  -ar 16000 -ac 1 -acodec pcm_s16le \\\n  trimmed.wav\n\n# Speed up audio (1.25x) — saves 20% of billable minutes\n# Deepgram handles slightly sped-up audio well\nffmpeg -i input.wav \\\n  -filter:a \"atempo=1.25\" \\\n  -ar 16000 -ac 1 -acodec pcm_s16le \\\n  faster.wav\n```\n\n```typescript\nimport { execSync } from 'child_process';\n\nfunction measureSavings(inputPath: string) {\n  \u002F\u002F Get original duration\n  const origDuration = parseFloat(\n    execSync(`ffprobe -v quiet -show_entries format=duration -of csv=p=0 \"${inputPath}\"`)\n      .toString().trim()\n  );\n\n  \u002F\u002F Remove silence\n  execSync(`ffmpeg -y -i \"${inputPath}\" \\\n    -af \"silenceremove=stop_periods=-1:stop_duration=0.5:stop_threshold=-30dB\" \\\n    -ar 16000 -ac 1 -acodec pcm_s16le \u002Ftmp\u002Ftrimmed.wav 2>\u002Fdev\u002Fnull`);\n\n  const trimmedDuration = parseFloat(\n    execSync(`ffprobe -v quiet -show_entries format=duration -of csv=p=0 \u002Ftmp\u002Ftrimmed.wav`)\n      .toString().trim()\n  );\n\n  const savings = ((1 - trimmedDuration \u002F origDuration) * 100).toFixed(1);\n  const costSaved = ((origDuration - trimmedDuration) \u002F 60 * 0.0043).toFixed(4);\n\n  console.log(`Original: ${origDuration.toFixed(1)}s`);\n  console.log(`Trimmed: ${trimmedDuration.toFixed(1)}s`);\n  console.log(`Savings: ${savings}% (${costSaved}\u002Ffile at $0.0043\u002Fmin)`);\n}\n```\n\n### Step 3: Query Deepgram Usage API\n\n```typescript\nimport { createClient } from '@deepgram\u002Fsdk';\n\nasync function getUsageDashboard(projectId: string) {\n  const client = createClient(process.env.DEEPGRAM_API_KEY!);\n\n  \u002F\u002F Get usage for current month\n  const now = new Date();\n  const monthStart = new Date(now.getFullYear(), now.getMonth(), 1);\n\n  const { result } = await client.manage.getUsage(projectId, {\n    start: monthStart.toISOString(),\n    end: now.toISOString(),\n  });\n\n  \u002F\u002F Aggregate by model\n  const byModel: Record\u003Cstring, { minutes: number; cost: number }> = {};\n  for (const entry of (result as any).results ?? []) {\n    const model = entry.model ?? 'unknown';\n    if (!byModel[model]) byModel[model] = { minutes: 0, cost: 0 };\n    byModel[model].minutes += (entry.hours ?? 0) * 60 + (entry.minutes ?? 0);\n  }\n\n  console.log('=== Monthly Usage ===');\n  for (const [model, data] of Object.entries(byModel)) {\n    const cost = data.minutes * 0.0043;\n    console.log(`${model}: ${data.minutes.toFixed(1)} min ($${cost.toFixed(2)})`);\n  }\n\n  \u002F\u002F Monthly projection\n  const dayOfMonth = now.getDate();\n  const daysInMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0).getDate();\n  const totalMinutes = Object.values(byModel).reduce((s, d) => s + d.minutes, 0);\n  const projectedMinutes = (totalMinutes \u002F dayOfMonth) * daysInMonth;\n  const projectedCost = projectedMinutes * 0.0043;\n\n  console.log(`\\nProjected monthly: ${projectedMinutes.toFixed(0)} min ($${projectedCost.toFixed(2)})`);\n}\n```\n\n### Step 4: Cost-Optimized Model Selection\n\n```typescript\nfunction recommendModel(params: {\n  qualityNeeded: 'high' | 'medium' | 'low';\n  isRealtime: boolean;\n  languages: string[];\n  budgetPerMinute?: number;\n}): { model: string; pricePerMin: number; reason: string } {\n  const { qualityNeeded, isRealtime, languages, budgetPerMinute } = params;\n\n  \u002F\u002F Multilingual -> Whisper\n  if (languages.length > 1 || !['en', 'es', 'fr', 'de'].includes(languages[0])) {\n    return { model: 'whisper-large', pricePerMin: 0.0048, reason: 'Multilingual support' };\n  }\n\n  \u002F\u002F Budget constraint\n  if (budgetPerMinute !== undefined && budgetPerMinute \u003C 0.005) {\n    return { model: 'nova-2', pricePerMin: 0.0043, reason: 'Best price per quality' };\n  }\n\n  \u002F\u002F Real-time -> Nova-3 (streaming price $0.0059\u002Fmin)\n  if (isRealtime) {\n    return { model: 'nova-3', pricePerMin: 0.0059, reason: 'Best real-time accuracy' };\n  }\n\n  \u002F\u002F Quality based\n  switch (qualityNeeded) {\n    case 'high':\n      return { model: 'nova-3', pricePerMin: 0.0043, reason: 'Highest accuracy' };\n    case 'medium':\n      return { model: 'nova-2', pricePerMin: 0.0043, reason: 'Good accuracy, proven' };\n    case 'low':\n      return { model: 'base', pricePerMin: 0.0048, reason: 'Fastest processing' };\n  }\n}\n```\n\n### Step 5: Feature Cost Awareness\n\n```typescript\n\u002F\u002F Feature cost breakdown per minute of audio\nconst featureCosts: Record\u003Cstring, { cost: number; description: string }> = {\n  \u002F\u002F Free features (included with STT)\n  smart_format:   { cost: 0,      description: 'Punctuation + paragraphs + numerals' },\n  punctuate:      { cost: 0,      description: 'Punctuation only' },\n  paragraphs:     { cost: 0,      description: 'Paragraph formatting' },\n  summarize:      { cost: 0,      description: 'AI summary (included with STT)' },\n  detect_topics:  { cost: 0,      description: 'Topic detection (included)' },\n  sentiment:      { cost: 0,      description: 'Sentiment analysis (included)' },\n  intents:        { cost: 0,      description: 'Intent recognition (included)' },\n  redact:         { cost: 0,      description: 'PII redaction (included)' },\n\n  \u002F\u002F Paid add-ons\n  diarize:        { cost: 0.0044, description: 'Speaker identification (+$0.0044\u002Fmin)' },\n  multichannel:   { cost: 0.0043, description: 'Per-channel billing (1x STT cost per channel)' },\n};\n\nfunction estimateJobCost(params: {\n  durationMinutes: number;\n  model: string;\n  features: string[];\n  channels?: number;\n}): number {\n  const baseCost = params.durationMinutes * 0.0043;\n  let addOnCost = 0;\n\n  for (const feature of params.features) {\n    addOnCost += (featureCosts[feature]?.cost ?? 0) * params.durationMinutes;\n  }\n\n  \u002F\u002F Multichannel: billed per channel\n  const channelMultiplier = params.channels ?? 1;\n\n  return (baseCost + addOnCost) * channelMultiplier;\n}\n\n\u002F\u002F Example: 60 min meeting with diarization\n\u002F\u002F estimateJobCost({ durationMinutes: 60, model: 'nova-3', features: ['diarize'] })\n\u002F\u002F = (60 * 0.0043) + (60 * 0.0044) = $0.258 + $0.264 = $0.522\n```\n\n## Output\n- Budget-aware transcription with auto-blocking\n- Audio preprocessing to reduce billable minutes\n- Usage dashboard via Deepgram API\n- Cost-optimized model recommendation\n- Feature cost breakdown with estimation\n\n## Cost Optimization Quick Wins\n\n| Strategy | Savings | Effort |\n|----------|---------|--------|\n| Remove silence from audio | 10-40% | Low (ffmpeg one-liner) |\n| Disable diarization when not needed | ~50% | Low (remove option) |\n| Use callback for long files | Indirect (no timeouts) | Low |\n| Cache repeated transcriptions | 20-60% | Medium (Redis) |\n| Speed up audio 1.25x | 20% | Low (ffmpeg) |\n| Use Nova-2 instead of Nova-3 | 0% (same price) | None |\n| Batch pre-recorded vs streaming | 37% ($0.0043 vs $0.0059) | Medium |\n\n## Error Handling\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| Budget exceeded | No controls | Enable budget check before transcription |\n| Unexpected charges | Diarization always on | Make diarization opt-in |\n| Usage API empty | Wrong project ID | Get ID from `getProjects()` |\n| Cost spike | Batch job without limits | Set concurrency limits + budget cap |\n\n## Resources\n- [Deepgram Pricing](https:\u002F\u002Fdeepgram.com\u002Fpricing)\n- [Usage API](https:\u002F\u002Fdevelopers.deepgram.com\u002Freference\u002Fget-usage)\n- [Cost Optimization Guide](https:\u002F\u002Fdevelopers.deepgram.com\u002Fdocs\u002Fcost-optimization)\n",{"name":5,"tags":24,"author":29,"license":15,"version":30,"description":31,"allowed-tools":32,"compatible-with":33},[25,26,27,28],"saas","deepgram","cost-optimization","billing","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Optimize Deepgram costs and usage for budget-conscious deployments.\nUse when reducing transcription costs, implementing usage controls,\nor optimizing pricing tier utilization.\nTrigger: \"deepgram cost\", \"reduce deepgram spending\", \"deepgram pricing\",\n\"deepgram budget\", \"optimize deepgram usage\", \"deepgram billing\".\n","Read, Write, Edit, Bash(ffmpeg:*)","claude-code, codex, openclaw","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--deepgram-pack--deepgram-cost-tuning",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill deepgram-cost-tuning",{"tool":49,"command":50},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill deepgram-cost-tuning",{"tool":52,"command":53},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill deepgram-cost-tuning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--deepgram-pack--deepgram-cost-tuning\u002FSKILL.md",true,[],[58,65,72,79,86,94],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":90,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]