Optimization & Savings · 3 min · Updated 2026-09-13

How pre-query pricing works

See the cost before you run

The problem

Provider dashboards show costs after the fact. By the time you see the bill, the money is spent.

How Tokeven helps

When you ask for an estimate, the pre-send advisor prices a call before you send it:

  1. Token estimation - counts prompt tokens locally
  2. Model pricing - looks up the per-token rate for your chosen model
  3. Alternatives - shows what the same call would cost on other models, with a confidence score for the task type

Estimates are opt-in: nothing is priced unless you call the advisor, and nothing about the call you make changes unless you choose a different model.

Three ways to ask

  • •In Claude Code or another MCP client - the tokeven_estimate tool (setup)
  • •In code - tracked.estimate(model=..., messages=[...]) on a wrapped client
  • •From the terminal - tokeven estimate --model claude-opus-4-8 "your prompt"

All three run entirely on your machine; the prompt is not sent to Tokeven.

In practice

The advisor returns a table: the current model's estimated cost first, then cheaper alternatives across Claude, OpenAI, Gemini and Grok, each with an estimated cost and a confidence score. That makes cost a visible input to your model choice, not a surprise on the bill.

Track your real costs

Calculators estimate. The dashboard shows what you actually spend and where you can save.