Skip to main content

Cost analytics

Availability

Open core · self-host + all Splyntra Cloud plans

Every llm_call span carries token usage, and Splyntra turns that usage into a dollar figure attributed to the run, the model, and the project. Cost analytics is part of the core and is available on every plan.

From tokens to cost

Cost is computed from the token counts on each model call and the per-model pricing you configure. The spend on each llm_call span rolls up into its run, and runs roll up into per-model and per-project totals shown on the Costs screen.

Where usage is read from

Splyntra reads token usage from the model call's own response — the same usage object the provider returns — so auto-instrumented calls need no extra work.

  • Auto-instrumented calls (via instrument) capture usage directly from the provider SDK's response.
  • Manually traced LLM functions should return a dict/object with a usage key. Splyntra reads prompt_tokens and completion_tokens from it for cost attribution. See Manual instrumentation.
{
"usage": { "prompt_tokens": 812, "completion_tokens": 143 }
}

If a traced LLM function omits usage, its latency and structure are still recorded — only the cost figure is missing.

Model pricing

Cost depends on the price of each model's input and output tokens. The Costs screen includes Manage model pricing, where you set the rates Splyntra uses to convert token counts into dollars. Update pricing there when a provider changes rates or when you add a model.

Budgets

Cost budgets are available on every plan. Pair them with cost-overrun rules on the Alerts screen to be notified when a project's spend crosses a threshold, alongside the risk-threshold alerts.

Next steps