Voice Billing

How voice requests are priced and surfaced on invoices: provider passthrough per minute and per character, prepaid credits, limits, and metering.

Voice requests use the same API key and the same prepaid credit balance as chat. What differs is the pricing unit: voice components are metered in minutes and characters rather than tokens.

Like everything on Xantly, voice usage is billed at exact provider cost. There is no per-minute platform fee and no markup on voice usage; the only platform fee is the 3% charged when you top up credits.

This page documents how Xantly bills voice, enforces limits, and surfaces costs back to you.


Cost breakdown

A single voice turn is billed as the sum of up to three components:

ComponentPricing modelWhere the cost comes from
Speech-to-Text (STT)Per minute of input audioProvider passthrough
LLM inferencePer token (same as chat)The model dispatched inside the voice pipeline
Text-to-Speech (TTS)Per 1M charactersProvider passthrough

All three are pure provider passthrough: Xantly debits your credit balance exactly what the underlying provider charged, at the provider's own rates.

Chat models called inside the voice pipeline are priced per token like any other chat completion, and voice responses served from the semantic cache are billed at the flat cache rate of $0.25 per million tokens instead of the provider price.


Limits and overrides

Voice limits are operational guardrails, not pricing tiers. Every organization gets default limits for voice RPM, monthly audio minutes, and concurrent sessions, and each one can be adjusted per organization via org_settings:

Need higher limits? Raise them from the dashboard or through an enterprise contract; the metered rate does not change.


Limit enforcement order

For every voice request, Xantly runs these checks in order. The first one that fails returns an error and the request does not count toward any other limit:

  1. Monthly budget cap: the same budget:usage:{org_id}:general:{YYYY-MM} pool as chat. Returns 402 Payment Required when exceeded.
  2. Monthly voice minutes limit: the org's configured limit, if set. Returns 429 Too Many Requests ("Voice audio minutes quota exceeded").
  3. Credit floor: your balance must be at least $0.05 to start a voice request. Returns 402 Payment Required.
  4. Concurrent session limit: the org's concurrency limit. Returns 429 ("Voice concurrent session limit reached").
  5. Voice RPM (sliding window): enforced by the rate limit middleware.

When a voice request fails mid-pipeline (e.g. STT succeeds, TTS fails), Xantly bills for the stages that completed via the partial cost accumulator. You are never charged for work the provider never did, but you are also never refunded for work that was successfully billed upstream.


Cost visibility headers

Every successful voice response includes detailed cost + routing metadata headers:

HeaderExample valueMeaning
X-Xantly-Cost-USD0.00324Total charge for this request (provider cost)
X-Xantly-STT-ProviderdeepgramWhich STT provider actually ran
X-Xantly-STT-Modeldeepgram/nova-2Which STT model was dispatched
X-Xantly-TTS-ProviderelevenlabsWhich TTS provider actually ran
X-Xantly-TTS-Modelelevenlabs/eleven_flash_v2_5Which TTS model was dispatched
X-Xantly-STT-Latency-Ms82.4STT stage latency
X-Xantly-Inference-Latency-Ms147.2LLM inference latency
X-Xantly-TTS-Latency-Ms54.1TTS stage latency
X-Xantly-Model-Usedgroq/llama-3.3-70bThe chat model that served inference inside the pipeline
X-Xantly-Lane-UsedFastLaneWhether BaRP routed through the fast lane or delegation lane
X-Xantly-Cache-Hittruetrue when the voice semantic cache served the response (billed at the flat cache rate, not the provider price)

Anomaly thresholds

Xantly runs automatic cost-anomaly detection on every voice request. If a request exceeds either of the thresholds below, a warning is logged to the Admin Portal for operator review. The thresholds are configurable at deploy time:

Environment variableDefaultMeaning
VOICE_ANOMALY_COST_PER_MIN_THRESHOLD0.66Maximum provider cost per minute of audio before firing an alert (3x premium stack expected max)
VOICE_ANOMALY_SINGLE_REQUEST_THRESHOLD5.0Maximum provider cost for a single voice request before firing an alert

A third sanity check, "STT completed in <10ms for >5 seconds of audio", is always enabled and not tunable. It catches broken duration tracking in STT provider responses.


Usage metering

Voice minutes are metered continuously from the gateway and drawn from the same prepaid credit balance as chat. There is no separate voice subscription and nothing to activate: if you have an API key and a positive balance, you can call voice. Voice line items appear in the same usage ledger and dashboards as chat, broken down per stage (STT, inference, TTS).


Next steps