> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withhopper.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pricing

> LLM \$1/\$3 per M tokens, TTS \$30/M characters, STT \$0.30/audio-hour; \$5 free credits on signup

Billing is prepaid credits, metered per request. Signup grants **\$5** in credits.

| Modality | Model          | Price                                        |
| -------- | -------------- | -------------------------------------------- |
| LLM      | `gemma-4-31b`  | \$1 / M input tokens, \$3 / M output tokens  |
| TTS      | `omnivoice`    | \$30 / M characters                          |
| STT      | `nemotron-asr` | \$0.30 / audio-hour (\$0.005 / audio-minute) |

## How each modality meters

* **LLM** — token counts from the response's `usage` object, priced at \$1 per million input tokens and \$3 per million output tokens.
* **TTS** — characters of the submitted transcript, counted before pronunciation-dictionary alias expansion. A transcript that expands from 3,000 to 8,000 characters bills 3,000.
* **STT** — audio seconds computed from received bytes: `seconds = bytes / (sample_rate × 2)` (PCM16 mono). Streaming sessions settle every 60 s and at close.

## Top-ups

Add credits at [withhopper.com/console/billing](https://withhopper.com/console/billing). Payments go through Stripe Checkout; amounts from \$5 to \$10,000. Credits land when the Stripe webhook fires, typically seconds after checkout.

## Spend headers

Metered responses carry up to two headers, 6-decimal USD strings:

* `x-hopper-request-cost-usd` — cost of this request
* `x-hopper-credits-remaining-usd` — credit balance

| Route                                              | Headers      | Semantics                                                                              |
| -------------------------------------------------- | ------------ | -------------------------------------------------------------------------------------- |
| LLM, non-streaming                                 | both         | Exact, computed from the response's `usage`. Absent if the upstream returned no usage. |
| LLM, streaming                                     | credits only | Pre-request balance. Cost is unknown until the stream ends, so no cost header.         |
| TTS (`/tts/bytes`, `/tts/sse`, `/v1/audio/speech`) | both         | Exact. Cost is priced on the submitted transcript, known before the call.              |
| STT batch (`/v1/audio/transcriptions`)             | both         | Exact, from received audio bytes.                                                      |
| STT WebSocket                                      | none         | Usage settles server-side every 60 s and at close.                                     |

Both headers are CORS-exposed via `Access-Control-Expose-Headers`.

## Out of credits

At zero balance, every metered route — including the STT WebSocket upgrade — returns 402:

```json theme={null}
{"error":{"message":"You have run out of credits. Contact us to add more.","type":"insufficient_quota","code":"insufficient_quota","param":null}}
```

An STT streaming session that hits zero mid-session closes with WebSocket code **1008** ("insufficient credits").
