@anant2507/aitol
v1.0.1
Published
AI Token Optimization Layer — reduce LLM API costs by 40–66%
Maintainers
Readme
AITOL — AI Token Optimization Layer
Reduce your LLM API costs by 40–66% with one command.
AITOL is a local proxy that sits between your AI tools and the LLM API. It compresses prompts, caches semantic duplicates, and routes to the cheapest capable model — automatically.
Install
npm install -g aitolQuick Start
aitol init # enter your API keys
aitol start # start proxy on localhost:4141
aitol status # see live savingsConnect Your Tools
aitol plugin add cursor # Cursor
aitol plugin add claude-code # Claude Code
aitol plugin add vscode # VS Code
aitol plugin add chrome # ChatGPT / Claude.ai / GeminiHow It Works
- Semantic Cache — returns cached responses for similar prompts (66%+ hit rate)
- MRL Compression — compresses natural language prompts by 45–56%
- CCE Compression — compresses code-heavy prompts by 34–44%
- Smart Routing — picks the cheapest model that fits the task
Proxy Endpoints
Point any OpenAI or Anthropic SDK at AITOL:
// OpenAI SDK
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
baseURL: "http://localhost:4141/openai"
});
// Anthropic SDK
const anthropic = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
baseURL: "http://localhost:4141/anthropic"
});Links
- Website: https://aitol.dev
- GitHub: https://github.com/Anant2507/AITOL
- Docs: https://aitol.dev/docs
