Documentation
Klood Project is a hosted compression API at https://api.kloodproject.com. One curl install — your agents send traffic to Klood first, then to your provider with your API keys.
Install sets
*_BASE_URL env vars — no SDK, no Python scripts, no custom code.
Quick start
curl -fsSL https://kloodproject.com/install.sh | bash
# open a new terminal
claude # or codex, aider, …
Keep your ANTHROPIC_API_KEY / OPENAI_API_KEY. Install only changes base URLs — not your keys.
Dashboard & usage tracking
Create a free account at kloodproject.com/dashboard with email and password. First 100M tokens saved are free.
- Sign up on the dashboard.
- Copy your personal API key from the dashboard.
- Re-run install with your key:
curl -fsSL https://kloodproject.com/install.sh | bash -s -- --klood-key klood_your_key_here
This embeds your key in the proxy URL so compression events appear in your dashboard. Install without a key still works — usage just won’t be tracked.
For Cursor with tracking: use https://api.kloodproject.com/klood_your_key/v1 (OpenAI) and https://api.kloodproject.com/klood_your_key (Anthropic).
What install puts on your machine
| What | Purpose |
|---|---|
| Shell env file (sourced from profile) | ANTHROPIC_BASE_URL, OPENAI_BASE_URL, … |
~/.zshrc / .bashrc | Loads ~/.headroom-proxy/env.sh |
No local proxy daemon — compression runs on api.kloodproject.com.
Cursor setup
Cursor’s desktop app does not read shell env vars. After install, paste these in Settings → Models:
| Model type | Base URL |
|---|---|
| OpenAI (GPT) | https://api.kloodproject.com/v1 |
| Anthropic (Claude) | https://api.kloodproject.com |
Use your normal provider API keys in Cursor. All other CLI tools (Claude Code, Codex, Aider, …) work after install with no extra steps.
How routing works
| Wire | Env var | API base |
|---|---|---|
| Anthropic | ANTHROPIC_BASE_URL | https://api.kloodproject.com |
| OpenAI-compat | OPENAI_BASE_URL | https://api.kloodproject.com/v1 |
Manual override
# Claude Code
ANTHROPIC_BASE_URL=https://api.kloodproject.com claude
# Cursor / OpenAI-compatible
OPENAI_BASE_URL=https://api.kloodproject.com/v1
Debug & troubleshooting → — load env vars if the proxy does not work.
Proxy endpoints
Agents talk to Klood using standard provider API shapes. Klood compresses, then forwards to your provider:
| Endpoint | Used by |
|---|---|
GET /health | Health check |
POST /v1/messages | Claude Code, Anthropic wire |
POST /v1/chat/completions | Cursor, Codex, OpenAI-compat tools |
What Klood compresses
- Tool outputs — JSON, search results, command output (SmartCrusher)
- Code — AST-aware compression, keeps structure (CodeCompressor)
- Logs & diffs — build output, stack traces, git diffs
- RAG chunks & files — retrieved context before it fills the window
- CCR — originals cached; model can retrieve full text when needed
Add another tool
Most agents accept a custom API base URL. Add a block to config/clients.json or contact us with the env var name your tool uses.