VoiceGateway // DOCS

voicegw costs

Display cost summaries from the gateway's request log.

voicegw costs

Display cost summaries from the gateway's request log.

Purpose

The costs command queries the SQLite database to show how much you have spent on voice AI requests. It breaks costs down by provider and by model, and can be filtered by project and time period.

Syntax

Shell
voicegw costs [OPTIONS]

Options

FlagShortTypeDefaultDescription
--config-cstringnullPath to voicegw.yaml. Auto-discovered if omitted.
--project-pstringnullFilter costs to a specific project ID.
--weekbooleanfalseShow the weekly summary instead of today.
--monthbooleanfalseShow the monthly summary instead of today.

When both --week and --month are omitted, the default period is today. If both are provided, --month takes precedence.

Prerequisites

Cost tracking must be enabled in voicegw.yaml:

voicegw.yaml
cost_tracking:
  enabled: true
  db_path: ~/.config/voicegateway/voicegw.db

If cost tracking is disabled, the command prints a warning and exits.

Output

The command displays:

  1. A header with the period and optional project filter.
  2. The total cost in USD.
  3. A By Provider table with cost and request count per provider.
  4. A By Model table with cost and request count per model.

If no requests have been recorded, it prints "No requests recorded yet."

Examples

Show today's costs

Shell
voicegw costs
Plain text
Cost Summary (today)
Total: $1.2345

       By Provider
┌──────────┬─────────┬──────────┐
│ Provider │ Cost    │ Requests │
├──────────┼─────────┼──────────┤
│ deepgram │ $0.5123 │ 42       │
│ openai   │ $0.7222 │ 18       │
└──────────┴─────────┴──────────┘

Show weekly costs for a project

Shell
voicegw costs --week --project tonys-pizza

Show monthly costs

Shell
voicegw costs --month

Use a custom config path

Shell
voicegw costs -c /etc/voicegateway/voicegw.yaml --week

Exit Codes

CodeMeaning
0Success (including when cost tracking is disabled -- prints warning).
1Config failed to load.

On this page