API Endpoints
Squeezr exposes several HTTP endpoints for health checks, statistics, and the expand mechanism, alongside the transparent proxy that forwards requests to LLM providers.
Management endpoints
GET /squeezr/health
Enhanced health check endpoint. Returns proxy status, circuit breaker state, bypass mode, compression mode, and expand store pressure.
curl http://localhost:8080/squeezr/healthResponse:
{
"status": "ok",
"version": "1.22.0",
"uptime_seconds": 7351,
"mode": "normal",
"bypassed": false,
"circuit_breaker": {
"state": "closed",
"consecutive_failures": 0,
"total_trips": 0,
"last_success_ago_s": 12
},
"expand_store": {
"size": 42,
"pressure": "low"
},
"compression": {
"requests": 156,
"savings_pct": 34.2
}
}GET /squeezr/stats
Returns statistics about proxy usage, compression savings, and cache performance.
curl http://localhost:8080/squeezr/statsGET /squeezr/expand/:id
Retrieves the full original content for a compressed block. This is used internally by the squeezr_expand tool, but can also be called directly for debugging.
curl http://localhost:8080/squeezr/expand/a3f2b1Returns 404 if the ID is not found (expired or from a previous session).
GET /squeezr/dashboard
Serves the built-in web dashboard UI. Open http://localhost:8080/squeezr/dashboard in your browser to access the interactive dashboard with real-time stats, project history, and configuration management.
GET /squeezr/limits
Returns current rate limit status for all configured providers, including remaining requests, token budgets, and reset timestamps.
curl http://localhost:8080/squeezr/limitsGET /squeezr/project
Returns information about the currently active project: name, path, configuration overrides, and per-project compression statistics.
curl http://localhost:8080/squeezr/projectGET /squeezr/events
Server-Sent Events (SSE) stream for real-time proxy activity. The dashboard uses this endpoint to show live compression events as they happen.
curl -N http://localhost:8080/squeezr/eventsEvents include: compression (each compressed request), stats (periodic stats updates), and session (session start/end).
GET /squeezr/bypass
Returns the current bypass mode state.
curl http://localhost:8080/squeezr/bypass
# => { "bypassed": false }POST /squeezr/bypass
Toggles or sets bypass mode. Send {"enabled": true} to enable, {"enabled": false} to disable, or an empty body to toggle. Runtime-only — resets on proxy restart.
curl -X POST http://localhost:8080/squeezr/bypass \
-H 'content-type: application/json' \
-d '{"enabled": true}'
# => { "bypassed": true }POST /squeezr/config
Changes the compression mode at runtime without restart.
curl -X POST http://localhost:8080/squeezr/config \
-H 'content-type: application/json' \
-d '{"mode": "aggressive"}'
# => { "ok": true, "mode": "aggressive" }Proxy behavior
Squeezr sits transparently between your coding tool and the upstream API. Your tools point at http://localhost:8080 and Squeezr automatically routes to the correct provider:
| Tool | Env var | Upstream |
|---|---|---|
| Claude Code / Aider | ANTHROPIC_BASE_URL=http://localhost:8080 | https://api.anthropic.com |
| Gemini CLI | GEMINI_API_BASE_URL=http://localhost:8080 | https://generativelanguage.googleapis.com |
| Codex | HTTPS_PROXY=http://localhost:8081 (per-session) | wss://chatgpt.com (via MITM) |
| Ollama | Detected via dummy API key | http://localhost:11434 |
Request flow
Coding Tool
|
| POST http://localhost:8080/v1/messages
v
Squeezr Proxy (localhost:8080)
|
| 1. Parse request body
| 2. Run compression pipeline (3 layers)
| 3. Inject expand tool definition
| 4. Forward to upstream API
|
| POST https://api.anthropic.com/v1/messages
v
Anthropic API
|
| Stream response chunks
v
Squeezr Proxy
|
| Pass-through (no modification to response)
v
Coding ToolHeaders
Squeezr forwards all request headers to the upstream, except Host (rewritten to match the upstream), Content-Length (recalculated after compression), and Expect (stripped for Node.js v24 compatibility). Response headers are returned unmodified.