AI Token Calculations

HI Team,

Curious how people calculate/estimate the cost of your AI Gemini or equivalent usage?

I’m keen to use AI, but trying to figure out what it’s going to cost me from a usage perspective vs. the tokens, as it’s always a pay-per-use environment.

Advise Please.
Stephan

Approx Number of chars / 4

Once you’re hooked up to an LLM you can check the prompt on the api side for exact numbers.

You’ll need >8K toks for most realistic workloads but it does get you a ton of entities.

In HA your context contains:

The exposed ents, Friendly name, entity_id, state and all alias metadata (not devices, ents)
The tool loadout (intent_scripts and all exposed scripts, including full text of all tool descriptions (1024 chars) and attribute descriptions (128 char ea). Up to 128 tools
And added context i your prompt (you will need to do this - see Friday’s Party for more info look a the grandma’s cardboard box problem…)

My prompt for Friday is currently hovering somewhere north of 16k of context +ents I suspect around 32Kish…