Compliance and sustainability Research-backed JavaScript

ai-carbon-reportTurn LLM usage logs into an energy, carbon and water report

ai-carbon-report turns OpenAI, Anthropic, Gemini, Bedrock and OpenRouter usage into energy, carbon and water estimates per model, feature and month, with low-to-high ranges, GHG Protocol Scope 3 labels and every factor sourced.

npx npx ai-carbon-report usage.jsonl --grid USA

Free · MIT license · runs on your machine · no signup npm ↗GitHub ↗

How ai-carbon-report works

Large customers, investors and EU sustainability rules are starting to ask what a company’s AI use costs the climate. Most teams either leave it out or guess from the invoice.

ai-carbon-report reads what actually drives the energy: how many tokens each model read, wrote and reasoned. Point it at your own call logs or the usage export from OpenAI or Anthropic, tell it where the models run, and it gives you energy, emissions and water per model, feature and month. Every number has a range, every factor has a source, and the report says which part rests on a known model size and which on an estimate.

It also shows where the energy goes, so you can see whether reasoning tokens, long prompts or a missing prompt cache are the real cost, and fix them.

You get a ready-to-paste Markdown section with the method, boundary and sources, and a CSV for carbon accounting software.

Try it

npx ai-carbon-report usage.jsonl --grid USA --md ai-carbon.md --csv ai-carbon.csv

Free and open source under the MIT license. Need your AI footprint measured and reduced for a report or a customer audit? Book a call.

Agent skill included

Let your AI coding agent run ai-carbon-report for you

The ai-carbon-report skill works with Claude Code, Codex, Cursor, Gemini CLI and other agents that read SKILL.md files. It runs the tool, explains each finding in plain words and helps you fix it.

npx skills add MuhammadAhmadZia/ai-carbon-report --skill ai-carbon-report

Using the Claude or ChatGPT apps instead? Download the skill ZIP from the GitHub releases page and upload it under Skills.

See all 30 agent skills →

Questions about ai-carbon-report

How accurate is it?

It is an estimate, not a meter reading. For open models with a published size it follows a line fitted to production-serving measurements published in Joule in 2026, and it predicts a model not used in the fit within 4%. For GPT, Claude and Gemini, whose sizes are not published, it uses a size class, so every figure comes with a low-to-high range and the report says how much rests on each kind of data.

Which scope do AI API calls belong to?

Under the GHG Protocol, using a model through a provider's API is a purchased service: Scope 3, Category 1. If you run models on your own servers, the electricity is Scope 2, and you should meter it.

Why not just multiply my AI bill by an emission factor?

You can, and the report shows that spend-based figure as a cross-check. But a per-dollar factor averages all hosting services and cannot tell a small model from a reasoning model. Token counts can.

Does it include training the model?

No. It covers the electricity, emissions and cooling water of answering your requests. Training, hardware manufacturing and internet transfer are outside the boundary, and the report says so.

UN Sustainable Development Goals

How each tool maps to SDG targets →

Want this set up and tuned for your store?

The tools are free. If you would rather have the checks run, the findings fixed and the results measured for you, that is what I do for clients.