In short
You can't meter hardware you don't control, so estimate instead: log input and output tokens per call and use a tool such as EcoLogits, which wraps your AI client and reports estimated energy and emissions per request. Label the figures as estimates, state the method, and replace them with supplier-reported numbers when you can get them.
Steps
- Log the model, input tokens and output tokens for every call, tagged with the feature that made it.
- Wrap your AI client with an estimator such as EcoLogits to get energy and emissions per request.
- Store the estimate next to latency and cost in your logs or dashboards.
- Review the heaviest features and prompts at each release.
- Ask your supplier for measured figures and swap them in when available.
Estimate from tokens, log it per call, and be clear it is an estimate. Hosted AI services give you no power meter, so heavy features and wasteful prompts stay invisible unless you build a number yourself.
Why tokens?
Energy rises with how much a model reads and writes. Epoch AI's bottom-up estimate puts a typical ChatGPT query at about 0.3 Wh, rising to about 2.5 Wh with a 10,000-token input and almost 40 Wh with a 100,000-token input. Your own token logs therefore tell you far more than any headline average.
Which tool should I use?
CodeCarbon's own guidance draws the line: use CodeCarbon for code running on hardware you manage, and EcoLogits for calls to remote generative AI services. EcoLogits wraps the client libraries of common AI providers and returns estimated energy and global-warming impact for each request, based on the model and token counts.
What should I record with each estimate?
- the model and version, and the tool version used to estimate;
- input and output tokens;
- the feature or workflow that made the call;
- whether the call succeeded, so you can count energy per successful task.
Common mistakes
- Treating estimates as measurements. The model sizes and hardware behind closed models are often assumed. Give a range and say so.
- Ignoring retries and agent loops. One user request can trigger many calls; see tracking energy per task.
- Never asking the supplier. See asking an AI company for its energy figures.
More on methods and boundaries in how to measure AI energy.
Sources
- EcoLogits documentation, EcoLogits (2025)
- When to use CodeCarbon, CodeCarbon (2025)
- How much energy does ChatGPT use?, Epoch AI (2025)
Related
How do I track AI energy per task rather than in total?
Pick a functional unit such as per document or per successful task, log energy and quality against it, and report it next to the total.
How do I ask an AI company for its energy figures?
What to ask an AI provider about energy, carbon and water per request, how to judge the answer, and why asking helps even when the reply is incomplete.
How do I calculate a Software Carbon Intensity score for an AI feature?
Work out an SCI score for an AI feature: energy times grid intensity, plus embodied emissions, divided by a functional unit such as per request.
How to measure the energy and carbon of AI
A practical guide to metering or estimating the energy and carbon of AI work: tools, system boundaries, per-task metrics and honest uncertainty.