Inspiration
"Stop thanking ChatGPT..."
...Something we are hearing more often nowadays.
A forbidden act. A wasteful act.
Tons of water: WASTED.
CO₂: EMITTED.
Electricity: ALSO WASTED.
The Earth's wonderful resources are being eaten up for every instance that we use unoptimized, excessively large prompts, useless chat histories and searches.
Our goal was to fix this: to make it super easy to cut these emissions and resource depletions with the simple click of a button. AI is the future (and present), and true sustainability will soon depend on how intelligently we use it.
With EcoToken, you can Start Prompting like a 10x Engineer and Environmentalist.
What it does
After the user writes their prompt (into an LLM/search engine), there is an OPTIMIZE button that, when clicked, refines the prompt to reduce its token expenditure. The amount of tokens saved is then returned to the user, and also converted to a calculated amount of water, CO₂ and electricity savings, which are displayed in the chrome extension.
- With the IEA projecting datacentre electricity ~2× by 2030 and LBNL showing accelerated U.S. growth, token-efficient prompting is a pragmatic lever companies can pull today without waiting for hardware cycles.
How we built it
Backend:
- Node.js (built-in http, global fetch)
- dotenv for server/.env
- jsonwebtoken for Snowflake KEYPAIR_JWT
- RSA keypair files in server/rsa_key.p8/rsa_key.pub
- API endpoints: POST/api/optimize
Core logic:
- Generates a Snowflake JWT (RS256) using SNOWFLAKE_* envs and the private key.
- Calls Snowflake SQL API POST https://{SNOWFLAKE_HTTP_ACCOUNT}.snowflakecomputing.com/api/v2/statements.
- Persists input samples into ${SNOWFLAKE_DATABASE}.${SNOWFLAKE_LOG_SCHEMA}.PROMPT_TUNING (best-effort).
- Calls stored procedure ${SNOWFLAKE_DATABASE}.${SNOWFLAKE_SCHEMA}.OPTIMIZE(tag, raw_filter, model).
- Unwraps SQL API response (handles both rowset and data formats).
- Logs analytics via ${SNOWFLAKE_DATABASE}.${SNOWFLAKE_SCHEMA}.LOG_STATS_TEST (best-effort).
- Returns JSON (optimized text and optional stats).
Frontend:
- Next.js with React
- TypeScript as primary language
- Styling done with Tailwind CSS
- Radix UI components and icons from Lucide React
- Vite build system used for chrome extension
- Chrome extension with Manifest V3
Challenges we ran into
A major challenge was our initial unfamiliarity with Snowflake API, which was overcome after lots of trial-and-error, lots of documentation and youtube videos that had an outdated UI (LOL). Converting our initial frontend into a condensed Chrome extension version was another challenge.
Accomplishments that we're proud of
- Fully familiarizing ourselves with Snowflake API and integrating Cortex into our work
- Learning about the impact of accumulated flawed prompts in daily AI usage and sharing this with our peers
What we learned
That by prompting efficiently (with our extension), especially in AI Chats with a long history, you (and the planet) end up getting amazing results. We learned to have fun while developing, bouncing ideas off of each other, designing, going to the workshops, attending the ramen challenge and fitness challenge with the pressure of a hard deadline and meeting up with other amazing MLH hackers!
Being a part of the tenth iteration of HTV was such a privilege!
What's next for EcoToken
Scaling EcoToken to massive companies will result in significant reductions in AI's environmental impact. The professional development and sharing of this tool to a larger user base will maximize energy savings.
Research & Citations
O’Brien, Matt, and Hannah Fingerhut. “Artificial Intelligence Technology behind ChatGPT Was Built in Iowa — with a Lot of Water.” AP News, 9 Sept. 2023, https://apnews.com/article/chatgpt-gpt4-iowa-ai-water-consumption-microsoft-f551fde98083d17a7e8d904f8be822c4.
Langley, Hugh. “Google’s Water Use Is Soaring. AI Is Only Going to Make It Worse.” Business Insider, 24 July 2023, https://www.businessinsider.com/google-water-use-soaring-ai-make-it-worse-data-centers-2023-7. Accessed 5 Oct. 2025.
Li, Pengfei, Jianyi Yang, Mohammad A. Islam, and Shaolei Ren. “Making AI Less ‘Thirsty’: Uncovering and Addressing the Secret Water Footprint of AI Models.” arXiv, 6 Apr. 2023, https://arxiv.org/abs/2304.03271.
You, Josh. “How Much Energy Does ChatGPT Use?” Epoch AI: Gradient Updates, 7 Feb. 2025, https://epoch.ai/gradient-updates/how-much-energy-does-chatgpt-use.
Yañez-Barnuevo, Miguel. “Data Centers and Water Consumption.” Environmental and Energy Study Institute (EESI), 25 June 2025, https://www.eesi.org/articles/view/data-centers-and-water-consumption.
Google. “2025 Environmental Report.” Sustainability.Google, 2025, https://sustainability.google/reports/google-2025-environmental-report/.
International Energy Agency. “AI Is Set to Drive Surging Electricity Demand from Data Centres While Offering the Potential to Transform How the Energy Sector Works.” IEA, 10 Apr. 2025, https://www.iea.org/news/ai-is-set-to-drive-surging-electricity-demand-from-data-centres-while-offering-the-potential-to-transform-how-the-energy-sector-works.
Built With
- html/css
- lucide-react
- manifest-v3
- next.js
- node.js
- python
- react
- snowflake
- sql
- tailwind-css
- typescript
- vite




Log in or sign up for Devpost to join the conversation.