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

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.

Results vary by prompt, workload and model.

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

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,
});

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