NULL Trim Guide (50–85% Token Saver)

NULL Trim deterministically compresses bloated JSON, noisy server logs, CSV tables, and Markdown/text before you send context to an LLM—reducing input token usage by 50–85% with zero LLM calls and exact before/after token telemetry (1 credit per compression).

Deterministic Zero-LLM Compression: No foundation model is called during compression. Keys, repeated log frames, and whitespace boilerplate are compacted in milliseconds with exact tokens_before, tokens_after, and savings_percent returned.

REST API: POST /v1/trim

curl -X POST https://api.nullpk.com/v1/trim \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer nullpk_live_your_key" \
  -d '{
    "content": "...",
    "mode": "auto",
    "max_tokens": 1200,
    "query": "error timeout",
    "json_format": "auto"
  }'

Compression Modes & Parameters

MCP Tool: nullpk_trim_context

Available natively on our Streamable HTTP MCP endpoint (https://api.nullpk.com/mcp) and via @nullpk/mcp-server. Pass content and optional mode, max_tokens, query, keep_keys, drop_keys, or json_format.

View NULL Trim Overview & Live Playground →