#00159
Case study of
#00166 Estimate the emissions of third-party AI API calls from model and request characteristics when the hardware is not accessible
Implementer
GenAI Impact (a Data For Good collective), now part of the CodeCarbon non-profit
Location
Description
EcoLogits is an open-source Python library that estimates energy and multi-criteria environmental impacts of generative AI API calls. It patches provider Python client libraries (OpenAI, Anthropic, Mistral AI, Cohere, Google, Hugging Face) so each request is wrapped with an impact calculation based on model identity, input/output token counts, and request latency, returning an Impacts object on the response. It reports Energy (kWh), Global Warming Potential (kgCO2eq), Abiotic Depletion Potential for elements (kgSbeq), and Primary Energy (MJ), split into usage and embodied phases. The method is bottom-up life-cycle assessment: server and GPU energy are modelled with PUE and electricity-mix factors (worldwide-average factor from ADEME Base Empreinte); embodied impacts are drawn from Boavizta's BoaviztAPI. Stated scope limitations: fixed worldwide electricity mix, model architectures assumed when providers do not disclose them, exclusion of training, data collection, networking, end-user devices, and data-centre construction; current scope is text-to-text generation only.
Lessons learned
Sources
2Documented Jul 13, 2026