Cost

Prompt Compression

Fewer tokens upstream, without changing the meaning

Prompt compression strips filler and politeness from prompts before they are forwarded, cutting upstream token spend. Every rewrite is guarded by a semantic safety gate, so the meaning never changes, if the gate cannot confirm the rewrite, the original is sent.

Highlights

  • Three tiers: rule filler-stripping by default, opt-in aggressive rules, and an optional LLM rewrite
  • Semantic safety gate: compressed text must match the original (cosine 0.92+) or the original is kept
  • Fail-closed: a rejected or unavailable gate never sends a worse prompt
  • Savings must exceed the minimum (5%) or the rewrite is skipped
  • Tokens saved per transaction, with a 24h total on the dashboard
  • Per-model override and a global toggle (off by default); chat and /v1/messages only
Lower spend
Fewer tokens upstream, smaller bills
Meaning intact
A semantic gate verifies every rewrite
Fail-closed
A rejected rewrite sends the original
Your control
Global toggle and per-model override

See prompt compression in your environment

The AI-FW gateway deploys into your own environment in minutes. Talk to us for a guided demo or jump straight into the docs.