Menu

UsageTap Compress

Early Access

Use less context. Keep what the task needs.

Compact structured application context during model calls, or turn large reusable sources into smaller, task-ready context. Protect the facts, values, structure, and behavior that must remain with editable Quality Checks—and use the original input at runtime when those checks do not pass.

Deterministic first · Protected content · Editable Quality Checks · Runtime fallback

Start free · No saving, no compression charge · See pricing

Runtime compressionFail-open ready
Before1,248 tokens
After782 tokens
Required content preserved466 saved tokens

Separate JSON and long-text benchmarks · Evidence through November 9, 2026

Fewer tokens. Lower cost. Answers checked.

TL;DR: strong JSON savings with correct answers; long text benefits from selective compression, with observed quality limits. Cost savings below include compression fees.

Structured JSON

10 existing tasks / 9 source inputs · Revalidated separately

fewer context tokens
43.6%
vs original formatted JSON
lower modeled cost
31.3%
After compression fees

30/30 full-service answers correct. All 30 transformed representations reconstruct the original data exactly.

Already minified? Another 16.4% fewer context tokens and 3.7% net cost saving.

Long text

100 expanded tasks / 97 contexts · Aggressiveness 0.50

fewer context tokens
27.4%
On 43 accepted compressions
lower modeled cost
15.7%
On 43 accepted compressions, after fees

Across all 100 tasks, including 56 guard fallbacks and 1 policy skip: 8.1% fewer context tokens and 4.9% lower modeled cost overall.

106/109 candidate answers correct on resolved accepted comparisons vs 109/109 original controls. Three corroborated regressions across two news questions; 20/129 accepted comparisons remain unresolved.

Correct answers are the primary outcome. Source damage helps explain errors or fragility; damaged wording with a correct answer is not an observed answer regression.

Knowing what not to compress matters. Some inputs should stay uncompressed to preserve required information. JSON skipped the lossy model stage on all 10 inputs and kept its structural savings. Long text returned 56 guard fallbacks and one policy skip. In targeted gentler follow-ups, preserving the Mali source produced three correct repeated answers at each setting.

Sample, quality and cost assumptions

JSON and long text have separate denominators and no pooled savings average. Long-text accepted-input averages include quality failures and exclude fallbacks/skips; overall results include every decision. Each cohort uses three answer repeats with GPT-6.1 Terra at medium reasoning. JSON retains the original 120 answers across four conditions: both newer Terra-low and Sol-low reviewers agreed they were correct, using 22 review calls including calibration. No new JSON compression or answer generation occurred. Long text covers 20 tasks each from HotpotQA, MultiNews, MuSiQue, Qasper and QMSum.

Gentler follow-ups on the two selected news cases produced 6/6 correct candidate answers per setting at 0.30, 0.25 and 0.15. Accepted VX cost savings were 7.2%, 6.6% and 2.1% respectively; Mali returned original text. These are exploratory results, not a new 100-task result or a proven safe default. Recorded guard reasons do not establish 57 proven errors prevented. An additional declining pair on identical preserved input is generation variation, not verified compression-caused loss.

Frozen API rates dated November 8, 2026 price application prompts, measured answer output and compression fees, with cold input and no remaining free compression allowance. These are API-equivalent scenarios, not subscription invoice savings. Offline review overhead is separate. The tested forced model-assisted long-text setting differs from the product’s deterministic-first default.

GPU resources for training and benchmarking can be hard for startups to access. We’re grateful to the Google for Startups Cloud Program for welcoming UsageTap as a member and helping make benchmark hosting possible. Membership does not imply Google’s endorsement of UsageTap or these results.

During the model call

Runtime Compression

Compact JSON, HTML, structured application data, tool output, and dynamic messages immediately before they are sent to the model.

Reusable definition: Compression Policy

  • Deterministic structural compaction first
  • Optional Deep Text Compression
  • Protected content and fallback behavior
  • Before-and-after token and latency reporting

Before content is stored or reused

Compression Jobs

Turn large sources into task-ready context, then benchmark prompt, model, and reasoning configurations against representative work. Choose the lowest measured cost per task that clears your Quality Checks, not the candidate that merely uses the fewest tokens.

Reusable definition: Compression Recipe

  • Cost per task optimization across models
  • Quality Checks for the required quality bar
  • Reusable, versioned Compression Recipes
  • One-off and batch execution

Choose the workflow

When should each path run?

QuestionRuntime CompressionCompression Jobs
Does the content change on each request?UsuallyUsually not, or slowly
Does it run in the model-call path?YesNo
Is low latency essential?YesUsually less important
Typical contentJSON, HTML, tools, messagesTranscripts, profiles, histories, documents
OutputSent immediately to a modelStored or reused later

Shared quality layer

Verify what must remain

Describe the facts, values, structure, and behavior that a result cannot afford to lose. UsageTap turns those requirements into editable Quality Checks, tests candidate transformations, and reports which checks passed.

  • Do not remove or change financial values.
  • Preserve names, dates, identifiers, and percentages.
  • Retain facts required to answer future questions.
  • Return valid JSON matching the required schema.
  • Keep all mandatory constraints and prohibitions.

Compression Jobs

Lower cost per task. Keep the quality.

A Compression Recipe defines the goal, expected source, transformation, output format, execution settings, and Quality Checks. A Compression Job executes that reusable definition against one source or a batch.

Optimize the task, not the token count.

Models can use different token amounts to complete the same task, so raw token count is a poor cross-model optimization target. Compression Jobs measures cost per task and recommends the lowest-cost configuration only after it clears your required quality bar.

Compression Recipe
The reusable, versioned definition.
Compression Job
A one-off or batch execution of a published Recipe.
Compressed Result
The smaller, task-ready output that can be stored or reused.

UsageTap Meter + UsageTap Compress

Measure the workload. Reduce selected context.

Meter shows where AI usage and input cost accumulate. Compress reduces the context behind selected workloads while Meter continues to track and control their usage.

Explore UsageTap Meter →

Lower input costs

Send fewer billable input tokens through OpenRouter or directly to your model provider.

Faster long-context responses

Reduce the amount of context the model has to process on suitable workloads.

Better model focus

Remove duplicated and low-value context so important instructions and facts stand out.

Before and after

See what the model no longer needs to read.

Original

1,248

tokens

Compressed

782

tokens

Removed

37%

of input

Repeated background and low-value restatements are removed or rewritten.

Protected instructions, values and identifiers remain unchanged.

Illustrative example. Results vary by prompt, workload and model.

The outcome is visible without playback; the short product film shows the transformation in action.

Continue in a private compression workbench.

Run up to 100 volatile-prompt compression tests plus progressive Prompt Review for stable instructions without creating an account.

Open the free trial

Production lesson · FocusedFit.ai

The best compression result was fixing the application.

FocusedFit.ai tested Runtime Compression in shadow mode against a roughly 150 KB context payload. Inspection exposed truncated source data and duplicated raw and structured content.

After fixing the application, the payload fell to roughly 40 KB by size. UsageTap estimated only another 3–5% reduction from Runtime Compression, so the team left it off.

Read the case study →
Context investigated
~150 KB

Before the application fix

Tightly structured payload
~40 KB

Approximately 73% smaller by size

Further reduction estimated
3–5%

So Runtime Compression stayed off

Good optimization isn't about maximizing compression. It's about sending the model only what the task needs.

Application context first

Built for the context AI applications actually send.

Conversation history

Reduce growing histories in assistants, support products and copilots.

Agent and tool output

Trim verbose tool responses, logs and repeated execution context before the next model call.

RAG results

Remove repetition and low-value retrieved text while retaining important facts, instructions and citations.

Application context

Compact structured records, tenant configuration, JSON and other application state included in prompts.

Also useful forLong documentsTranscriptsOther text-heavy inputs

Provider-neutral integration

Keep your provider. Send it smaller prompts.

Choose OpenAI, Anthropic, UsageTap Gateway, or OpenRouter. Add the UsageTap SDK, call Compress over HTTPS, or use the same language-agnostic flow from Python.

View SDK setup options →

Provider or route

Integration style

Your selection

Keep the OpenRouter SDK and add the UsageTap SDK to compress context.

Install
npm install @usagetap/sdk openai
OpenRouter · UsageTap SDK
import OpenAI from "openai";
import { withCompression } from "@usagetap/sdk/openrouter";

const provider = new OpenAI({
  baseURL: "https://openrouter.ai/api/v1",
  apiKey: process.env.OPENROUTER_API_KEY,
});

// Set USAGETAP_ENVIRONMENT=production (or test) in the server deployment.
const openrouter = withCompression(provider, {
  apiKey: process.env.USAGETAP_API_KEY,
  minContextTokens: 1_000,
});

const response = await openrouter.chat.completions.create({
  model: "anthropic/claude-sonnet-4",
  messages,
});

Simple prepaid pricing

Start free. Pay only for tokens Compress removes.

No subscription or credit card is required. Real-time Compress is part of the same prepaid UsageTap Balance as Meter and optional AI-powered work.

See all UsageTap pricing →
Free allowance
5M tokens saved/month
After the allowance
$0.30 per 1M tokens saved
No saved tokens
No Compression usage charge

A category-level comparison

Not all prompt reduction works the same way.

CategoryContext-window truncationGeneral text compressionUsageTap Compress
Primary purposeMake an oversized request fit within a model limitShorten prose such as documents, websites and transcriptsOptimize dynamic context assembled by AI applications
Common inputsMessages selected by positionNatural-language textConversation history, RAG, tool output and structured application context
Protected contentContent may be removed based on locationDepends on the implementationExplicitly protect important instructions, values, identifiers and structures
Skip decisionPrimarily triggered by context limitsOften attempts compression on the supplied textCan skip unsuitable or uneconomic candidates
InspectionLimited visibility into removed contextDepends on the implementationInspect original input, output, token counts and transformations
FallbackRemoved content is not sentDepends on the implementationUse the original input when validation fails

Runtime safeguards

Protect, inspect, and fall back.

Protect exact instructions, identifiers, values, and structures; inspect the result; and use the original input when validation fails.

Protect what matters

Keep exact instructions, identifiers, numbers, code and structured content intact.

Skip poor candidates

Do not compress prompts that are already efficient or unsuitable.

Inspect every result

See the original input, compressed output, token counts and transformations.

Use the original when checks fail

When validation fails, UsageTap sends the original prompt.

Workload evaluation

Prove it on your own prompts.

We’ll evaluate 50–100 representative OpenRouter requests and show saved tokens, compression latency, end-to-end latency, quality results, and fallback rate before you change production traffic.

Get an OpenRouter prompt review

Savings calculator

Model your prompt savings.

Your first 5M saved tokens are free each month. After that, UsageTap deducts $0.30 per 1M saved tokens. Compare that charge with your downstream input-token cost to estimate the net saving for your workload.

Downstream model

Loading the latest model prices…

1M1B
Reduction assumption

Choose an assumption for your workload. Results vary.

Your input

25M

tokens

Saved

6.25M

tokens

Sent after compression

18.75M

tokens

Billable saved

1.3M

after free allowance

Original downstream input cost
—
Input cost after compression
—
Estimated input-cost savings
—
UsageTap Balance deduction$0.30 per 1M billable tokens saved
—
UsageTap Compress costPublished saved-token price is all-in
—
Estimated net savings after UsageTap Compress
—

Included Compress access is limited to 30 requests per minute. Custom terms can include different operating limits.

Practical questions about Compress

How is UsageTap different from OpenRouter context truncation?+

Context truncation helps an oversized request fit by removing messages or content, commonly based on position or limits. UsageTap is an additional optimization layer that evaluates eligible context before routing, protects selected content, exposes the transformation and can skip poor candidates.

Does UsageTap replace OpenRouter?+

No. Keep your OpenRouter client, model choices, routing and provider fallbacks. UsageTap wraps the client and sends OpenRouter a smaller prompt when compression is suitable.

Does compression always make a request faster?+

No. Sending fewer tokens can reduce model processing time, especially for long-context workloads, but compression itself also takes time. The net result depends on the prompt, model and deployment, so evaluate end-to-end latency on representative requests.

Can prompt compression improve response quality?+

Removing repetition and irrelevant context can help a model focus on important information, but it is not a universal quality improvement. Quality must be evaluated against the specific application workload.

What content can UsageTap protect?+

You can protect exact instructions, identifiers, numbers, code, structured data, citations and other spans your application needs to preserve.

What happens when a prompt should not be compressed?+

UsageTap can skip prompts that are already efficient, unsuitable or uneconomic. If validation fails, your integration can use the original input instead.

Can I inspect the compressed prompt?+

Yes. Inspect the original input, compressed output, token counts, decision metadata and transformations before deciding how to use the result.

How is Compress priced?+

The first 5 million saved tokens each month are free. After that, Compress deducts $0.30 of UsageTap Balance per 1 million saved tokens. The published saved-token rate is all-in; no additional UsageTap percentage fee is added. Skipped requests, unchanged results, compression errors and fallback to the original prompt record zero saved-token usage.

Is UsageTap Compress separate from UsageTap Meter?+

Yes. Compress works on its own. Use Meter for customer usage economics, Compress for prompt input efficiency, or both when your application needs both capabilities.

Make your next LLM request smaller.

Start free · No saving, no compression charge · See pricing

UsageTap Compress | Context reduction with Quality Checks