CodeCarbon vs EcoLogits vs SAEF: which one measures what

For engineers and sustainability leads choosing between three tools that sound alike. Published by SOMA AI, which makes SAEF, so check each claim against the linked page. Checked on .

Last updated

Part of the SOMA AI Emission Factors cluster.

CodeCarbon, EcoLogits or SAEF: which one measures what?

CodeCarbon measures the energy of code that runs on your own hardware, EcoLogits is an open-source library that estimates the impact of generative AI inference calls to provider APIs, and SAEF, the emission factors published by SOMA AI in Barcelona, gives per-token factors by model class and cloud region for the AI APIs and tools a company buys. They answer different questions and the order here is not a ranking. SOMA AI publishes this page and SAEF is one of the three, so read the linked documentation of each.

How do the three compare?

From each publisher's own pages, read on 29 November 2026. "Not stated" means the pages we read did not say. The order is not a ranking.
CodeCarbonEcoLogitsSAEF (SOMA AI)
What it coversCode running on local hardwareGenerative AI inference requests made to provider APIsAI a company buys, by model class and region, from tokens or spend
How it gets a numberEstimates power from CPU, GPU and RAM and applies regional carbon intensity. On Linux it reads Intel RAPL counters when it can and otherwise estimates from CPU loadBottom-up model of inference impact, read from the response object after a requestTokens times a published per-million-token factor, with a range
Hosted API callsNo. Its docs point to EcoLogits for themYes. Providers listed include Anthropic, Cohere, Google Gemini, Hugging Face Hub, Mistral AI and OpenAIYes, from logged token counts
Measured or estimatedEstimated from hardware powerEstimated, and its methodology page cites a lack of open provider dataEstimated, with a published method and uncertainty
Impacts beyond carbonNot statedGWP, ADPe, primary energy and water consumption criteriaCO2e, electricity and water
CostNot statedNot statedNot in the factor table. The free SOMA AI calculator shows list-price cost beside the estimates
LicenceMITMPL-2.0Non-commercial data licence, commercial licence available from SOMA AI
Maintained byVolunteers and contributors, supported by the Code Carbon nonprofitVolunteers with sponsor support, part of the Code Carbon nonprofit initiativeSOMA AI

Sources are CodeCarbon on GitHub and its documentation, EcoLogits documentation, its repository and methodology, and the saef package.

When is CodeCarbon the right tool?

When you train or run a model on machines you control, such as a laptop, a server or a cloud instance you manage. CodeCarbon sits in your code and reports energy and emissions for that run. Its scope stops at your hardware, so it cannot see what a provider's data centre does when you call an API.

When is EcoLogits the right tool?

When developers want a per-request impact estimate inside the application that calls a provider API. EcoLogits wraps the supported provider clients and returns the estimate with the response. Its methodology covers inference only, and it excludes training, networking and end-user devices.

When is SAEF the right tool?

When a company needs a citable, versioned figure for AI it purchases, including seat-licensed tools where no token log exists, and wants to total it by month, model class and region. The factors are on the factors page and the method on the methodology page. The free AI footprint calculator applies them to seats, tokens or spend and shows list-price cost beside the estimate. Limits worth knowing. SAEF does not measure anything, it classifies models into size classes and applies published assumptions, and it does not read a provider's real energy data because providers do not publish it per customer.

Can you combine them?

Yes, because they cover different parts of an AI inventory. A team might use CodeCarbon for its own GPU jobs, EcoLogits or the saef package for API calls in code, and SAEF through the calculator for staff seats and invoices. Do not add a measured and an estimated figure without labelling which is which. The wider field is on the AI carbon footprint tools compared page, and the code for logging API usage is in how to track emissions from AI API calls.

What does this page not claim?

  • That any of the three is more accurate than another. They estimate different things from different inputs.
  • That a feature marked not stated does not exist. It means the pages we read did not say.
  • That EcoLogits or CodeCarbon figures and SAEF figures are interchangeable for the same call.
  • Anything about these tools beyond what their official pages said on 29 November 2026.

Short answers

What is the difference between CodeCarbon and EcoLogits?
CodeCarbon estimates the electricity of code running on hardware you control, from CPU, GPU and RAM power, and applies regional carbon intensity. EcoLogits estimates the environmental impact of generative AI inference requests made to provider APIs. CodeCarbon's own documentation sends users of remote GenAI APIs to EcoLogits.
Can CodeCarbon measure OpenAI or Claude API calls?
No. CodeCarbon's documentation says it does not track hosted GenAI API calls and points to EcoLogits for them. An API call runs on the provider's servers, so there is no local hardware for CodeCarbon to read.
What does SAEF add to EcoLogits and CodeCarbon?
SAEF, the SOMA AI Emission Factors, is a published table of per-token emission factors by model class and cloud region, with a CSV, a Python package and a free calculator that adds list-price cost. It suits a company that wants to estimate the AI it buys, for example API usage and seat-licensed tools, from token counts or spend. It is an estimate, not a measurement, and SOMA AI publishes it.
Which one should I use for a sustainability report?
It depends on what the AI is. For your own GPUs, a measured figure from CodeCarbon fits. For API calls in code, EcoLogits or SAEF give per-call or per-token estimates. For purchased AI at company level, with a citable dataset and a version, SAEF is built for that. Many teams use two of them for different parts of the inventory.
Are the three tools free?
CodeCarbon is MIT-licensed and EcoLogits is MPL-2.0, both open source. SOMA AI's calculator is free to use. The SAEF data and the saef package are published under non-commercial licences, so use inside a company needs a commercial licence from SOMA AI.

Keep reading