Skip to content

EcoAIStop paying for the same AI response twice.

Open-source caching SDK for AI apps. Drop-in wrapper for OpenAI, Anthropic, and Gemini. Zero infrastructure. Instant savings.

Install โ€‹

bash
npm install eco-ai
bash
pip install ecoai-python

eco-ai on npm ยท ecoai-python on PyPI

Quickstart โ€‹

typescript
import { EcoAI } from 'eco-ai';
import OpenAI from 'openai';

const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const eco = new EcoAI({ client: openai });

// Identical to openai.chat.completions.create โ€” cached automatically
const response = await eco.chat.completions.create({
  model: 'gpt-4o',
  messages: [{ role: 'user', content: 'Summarise the water cycle.' }],
});
python
from openai import OpenAI
from ecoai import EcoAI

client = OpenAI()
eco = EcoAI(client=client)

# Identical to client.chat.completions.create โ€” cached automatically
response = eco.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Summarise the water cycle."}],
)
Before EcoAI  โ†’  38 identical calls  โ†’  $4.26 spent  โ†’  142,000 tokens used
After EcoAI   โ†’  1 real call + 37 cached  โ†’  $0.11 spent  โ†’  97% saved

Released under the MIT License.