OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Evaluation & Observability

Ecologits

Ecologits is an open-source Python library that estimates energy consumption and environmental impacts associated with generative AI model use through APIs.

Independent OpenViST project profile, based on linked sources.

Ecologits — OpenViST project profile in AI Evaluation & Observability.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Ecologits when your Python application calls a supported generative AI API and you want impact estimates exposed with the response. For local compute, the project points users to CodeCarbon.

Who it is for

  • Python developers integrating generative AI provider APIs into applications.
  • Teams that want energy and environmental estimates alongside API inference activity.

Documented uses

  • Attach estimated energy use and environmental-impact values to supported provider API responses.
  • Collect estimates to compare or report impacts across API-based generative AI usage.
Before you choose

Requirements & limits

  • The README lists integrations for Anthropic, Cohere, Google GenAI, Hugging Face Hub, Mistral, and OpenAI.
  • Provider integration is installed using a provider-specific package extra.
  • The project documents estimates, not direct measurements, and the cited README does not describe the estimation methodology.
  • The repository specifies the Mozilla Public License 2.0.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Add impact estimates to an OpenAI API call

Install Ecologits, initialize its OpenAI integration, and read estimated energy and emissions from a chat-completions response.

Before you start

  • Python environment
  • OpenAI client library
  • OpenAI API key

Steps

  1. Install Ecologits with the OpenAI integration using the command below.

    Documented command
    pip install ecologits[openai]
  2. Import EcoLogits and OpenAI, then initialize tracking with EcoLogits.init(providers=["openai"]).

  3. Create the OpenAI client with an API key and make a chat-completions request.

  4. Read the response impact fields for energy consumption in kWh and greenhouse-gas emissions in kgCO2eq.

Expected outcome

The response exposes estimated energy and greenhouse-gas impact values for the inference.

Guide limitations

  • The example covers OpenAI chat completions; consult provider documentation for other integrations.
  • The README describes the values as estimates and does not specify their calculation methodology.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 October 2026
Original website title
mlco2/ecologits · Official homepage title · retained in its source language

Related options

CodeCarbon — The Ecologits README points to CodeCarbon for tracking local compute emissions.

EcoLogits.js — A related project listed in the Ecologits README for environmental-impact estimates in JavaScript and TypeScript.