All docs

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

Health check endpoint. Returns a 200 status when the proxy is running.

curl http://localhost:8080/squeezr/health

Response:

{
  "status": "ok",
  "version": "1.17.0",
  "uptime": 7351
}

GET /squeezr/stats

Returns statistics about proxy usage, compression savings, and cache performance.

curl http://localhost:8080/squeezr/stats

GET /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/a3f2b1

Returns 404 if the ID is not found (expired or from a previous session).

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:

ToolEnv varUpstream
Claude Code / AiderANTHROPIC_BASE_URL=http://localhost:8080https://api.anthropic.com
Gemini CLIGEMINI_API_BASE_URL=http://localhost:8080https://generativelanguage.googleapis.com
CodexHTTPS_PROXY=http://localhost:8081 (per-session)wss://chatgpt.com (via MITM)
OllamaDetected via dummy API keyhttp://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 Tool

Headers

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.