← Back to the journal

DataFocus · Journal

How to Estimate LLM API Spend for a Self-Hosted AI Analytics Platform

DataFocus OT is free to self-host, but the model service is a separate bill. A worksheet for sizing it: which actions call the model, how many tokens each uses, and how to revisit the estimate as prices fall.

Estimate the model bill by counting only the actions that call a model, multiplying each by its tokens per call and its monthly volume, and pricing the total at your provider's per-token rates. DataFocus OT itself is free to self-host, but its own cost note says you still pay for servers, model calls and third-party services, so the model API is a separate line item. Most analytics traffic does not need a model at all, which makes the estimate smaller and easier to bound than it first looks. This post gives a worksheet you can fill in with your own volumes and your provider's current price list.

Where is the model called, and where is it not?

DataFocus OT runs on your own servers, and administrators configure the large-language-model service it uses. That is the source of the line item: the platform is yours, the model service is whichever one you point it at. If you choose an external model, the product brief advises confirming what is sent to it under your data policy, which is worth settling before you budget, because it may constrain which providers you can price at all.

The second fact that shapes the estimate is that a real compute engine sits underneath (Apache Doris in Flash; Trino and others in Heavy), and answers come from the SQL that actually ran rather than from figures estimated by a language model. The engine does the arithmetic. The model, when it is involved, translates language into a query or writes narrative around results. Query execution consumes your servers, not tokens.

The Heavy manual's Data Search chapter shows the split. A user picks a table, types column names and keywords such as "Sales by Region", and the system calculates the result and chooses a chart. That path is a structured search statement, and nothing in the manual describes it calling a model. The model enters when input is not made of standard column names and keywords: the system then asks FocusGPT to parse it into a search statement and shows a prompt with a Revert action. For a standard statement, FocusGPT also parses it in the background and may replace it. So even "standard" searches can generate some model traffic, and the worksheet should include a small background-parsing term rather than assuming zero.

Which workloads belong in the inventory?

List every way people and systems reach the model. The first five rows below follow the Heavy manual; the last is a placeholder for any agent you connect yourself:

WorkloadModel involvementWhat drives volume
Data Search, standard statementsBackground parsing onlySearches per day
Data Search, free-form inputParsing into a search statementShare of searches typed as sentences
Smart Q&A (FocusGPT)Picks the table, queries it, replies with how the input was parsedQuestions per user per day
Research reports, StandardReport generationReports per month
Research reports, Deep (compatibility mode)Deeper multi-step analysis, takes longerDeep reports per month
External agent sessionsWhatever the agent's own model consumesSessions per month, tool calls per session

Two caveats. First, Smart Q&A usually takes a minute or two according to the manual, and the page warns that content is generated by AI; the manual advises checking important conclusions in Data Search. That check is a standard search, which adds at most the small background-parsing term, not a second full model call. Second, an external agent bills against the agent's own model account, which may not be the one your administrators configured. Decide up front whether that spend sits in this budget or in the team that runs the agent, and keep the row so it is not forgotten.

How do I build the token worksheet?

Use one row per workload and four columns you fill from your own environment.

  1. Calls per month (C): from usage logs, or from a headcount-based guess for a new deployment.
  2. Input tokens per call (I): the question, schema or table context, and any instructions.
  3. Output tokens per call (O): the parsed statement or the written reply.
  4. Calls per task (K): 1 for single-shot parsing, higher for multi-step reports and agent loops.

Monthly cost per row is C × K × (I × input price + O × output price), with prices per token taken from your provider's current list. Sum the rows. Providers usually price input and output separately, so keep them as two columns.

Here is an illustrative, not run, example. Consider a hypothetical team of 40 analysts. Take 200 free-form searches per day, about 22 working days a month, so C is 4,400 parsing calls. If a parsing call is around 1,500 input and 100 output tokens (an assumption, not a measurement), the row is 6.6 million input and 0.44 million output tokens per month. A Smart Q&A row might use 600 questions, each with larger context. A deep report row might use 30 reports with K set to 8 steps. Notice what dominates: the rows with high K and long context, not the high-volume parsing rows. In most worksheets of this shape, a handful of reports outweigh thousands of parsed searches, so measure those first.

Add three margins before you present the number:

  • Retries and failures: a flat 10 to 20 percent is a common planning allowance, adjusted once you have logs.
  • Context growth: schemas get wider as you add tables, and input tokens per call rise with them.
  • Adoption: new users ask more questions in the first months. Use a low, expected and high scenario rather than one figure.

How do price trends and model tiers change the estimate?

Epoch AI's March 2025 data insight on LLM inference price trends found that the price of inference at a fixed performance level fell at rates from 9x to 900x per year, depending on the performance milestone. That range is wide and is measured for a fixed capability level, not for any single provider's list price, so it is not a forecast for your invoice. It does support two planning habits.

First, do not lock a three-year budget to today's price list. Re-price the worksheet when you renew or switch models. Second, because the fall is at a given capability, the cheap tier today often matches what the expensive tier did a year or two earlier. Parsing a sentence into a search statement is a narrow task, so test whether a smaller, cheaper model handles it acceptably before assigning your most capable model to every row. Reserve the stronger tier for Deep research reports, where the multi-step analysis is the point. Because the manuals do not describe choosing a model per feature, treat the model service as a deployment-level choice and test the trade-off on a copy of your real questions before you commit.

A decision rule that works for many teams: start every row on the cheaper tier, promote a row only when reviewers reject its output, and record why.

How do I monitor spend and revisit the estimate?

An estimate is only useful if you compare it with actuals.

  • Use the provider's usage dashboard or API key-level reporting to see tokens per day. Give the analytics platform its own key so its spend is not mixed with other projects.
  • Compare actual tokens per call with your I and O assumptions after the first month and correct the worksheet.
  • Set a spend alert at a fraction of the monthly budget and a hard cap if your provider supports one.
  • Review the share of free-form versus standard searches. If many users type sentences, a short training session on standard column-and-keyword searches reduces parsing calls and also gives results you can verify directly.
  • Re-run the price comparison each quarter, using the trend above as the reason to check.

When this approach falls short

The worksheet assumes you can read token counts from your provider. If several teams share one model gateway, attribution takes extra work. External agents are the hardest row, since their loops depend on the agent's design, so treat that row as a range and watch it first. Finally, the manual does not give per-call token figures for any feature, so every I and O value above is yours to measure.

Next step

Both editions are free to download and self-host; the download page lists them, and each edition's release notes list system requirements and supported platforms. The DataFocus OT product brief explains the self-hosted model and the engines underneath.