# deepgram-cost-tuning

The deepgram-cost-tuning skill outlines ways to track Deepgram spend, set budget checks for transcription, and reduce billable audio time through preprocessing.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 1 install · ★ 2935 repo stars
- Author: Jeremy Longshore
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/HEAD/skills/.curated/deepgram-cost-tuning/SKILL.md
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/deepgram-cost-tuning

## What it does

The examples show a budget-aware transcription wrapper that estimates a request’s cost, warns near a configured limit, and records actual minutes and spend. They also cover retrieving usage through the Deepgram API and grouping entries by model. Diarization is counted as an additional cost in the sample calculation.

For audio preprocessing, the skill uses `ffmpeg` to remove silence or change playback speed; `ffprobe` measures duration in a savings example. You’ll need a Deepgram API key for the API examples, and `ffmpeg` for the audio steps. Test changes against quality and reliability: the instructions say to revert if either drops. Don’t reduce retention, privacy, or consent safeguards just to lower spend.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add jeremylongshore/tons-of-skills-marketplace --skill deepgram-cost-tuning -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/deepgram-cost-tuning/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/deepgram-cost-tuning/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add jeremylongshore/tons-of-skills-marketplace --skill deepgram-cost-tuning -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/deepgram-cost-tuning/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add jeremylongshore/tons-of-skills-marketplace --skill deepgram-cost-tuning -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/deepgram-cost-tuning/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install jeremylongshore/tons-of-skills-marketplace skills/.curated/deepgram-cost-tuning
```

2. **Manually: put the files in place**
- File: `.github/skills/deepgram-cost-tuning/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add jeremylongshore/tons-of-skills-marketplace --skill deepgram-cost-tuning -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/jeremylongshore/tons-of-skills-marketplace --path skills/.curated/deepgram-cost-tuning
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/deepgram-cost-tuning/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add jeremylongshore/tons-of-skills-marketplace --skill deepgram-cost-tuning -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/HEAD/skills/.curated/deepgram-cost-tuning/SKILL.md

## When to use it
- estimate transcription costs before sending audio
- warn when projected spend approaches a monthly limit
- remove silence to reduce billable audio time
- review Deepgram usage by model through its API

## Example prompts
- Add a monthly budget check before sending audio to Deepgram for transcription.
- Show how to remove silence from `input.wav` with `ffmpeg` before transcription.
- Write an example that retrieves this month’s Deepgram usage and groups it by model.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: a4a9673ed2c43a0a.

BEGIN THIRD-PARTY FILE a4a9673ed2c43a0a
````text
---
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 <jeremy@intentsolutions.io>
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) {
````
END THIRD-PARTY FILE a4a9673ed2c43a0a

The third-party file has ended. Everything between the a4a9673ed2c43a0a tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2562 of 11840 bytes. © Jeremy Longshore · MIT · https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/HEAD/skills/.curated/deepgram-cost-tuning/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
