Cost tracking

Saaya breaks down cost into the three numbers your finance team actually wants, per-token (LLM), per-minute (voice / TTS / STT / avatar), and per-session (everything else). The dashboard slices it by agent, version, channel, and any custom tag.

How costs are computed

Every session emits cost line items in real time: input tokens, output tokens, audio minutes per provider, avatar seconds, KB retrieval ops. Saaya converts to your billing currency at the daily reference rate, applies your contract's rates, and writes the totals to the session record.

Budgets and alerts

budget.ts
await saaya.budgets.create({
  scope: { agentId: "agt_2N3rH..." },
  limit: { period: "monthly", amount: 5000, currency: "USD" },
  alerts: [
    { at: 0.5, channels: ["email", "slack"] },
    { at: 0.8, channels: ["email", "slack"] },
    { at: 1.0, channels: ["email", "slack"], action: "pause-campaigns" },
  ],
});

Chargeback exports

For internal chargeback (one Saaya org, many product lines), tag every session with a cost-center attribute. The chargeback export rolls cost up by tag and produces a CSV / Parquet file that drops straight into your accounting tool.

Provider visibility

Costs are split by provider, useful when comparing OpenAI vs. Anthropic, or ElevenLabs vs. Cartesia. The Cost Explorer shows side-by-side spend; A/B routing lets you actually run the comparison instead of guessing.

Budgets pause campaigns, not live calls

A `pause-campaigns` action stops new campaign rows from being dispatched but does not cut off in-flight conversations. Customers in a session always finish, that is the contract.
Was this page helpful?