High-speed input prompt context compression
Strip redundant semantic tokens, whitespace bloat, and RAG document noise before payloads reach your frontier model endpoint.
Measured across RAG context, agent tool calls, and developer prompts.
In-memory deterministic compression with zero external network hops.
Bit-for-bit guarantees on all isolated code and structured blocks.
The production engineering challenge
Large RAG documents, multi-turn chat histories, and massive agent tool schemas consume tens of thousands of tokens per call. Due to BPE sub-token splitting, repetitive formatting characters and word structures inflate context windows and multiply API costs.
Technical architecture & mechanics
Sub-token whitespace and delimiter normalization
Normalizes repetitive spaces, indentations, and punctuation clusters that cause modern BPE tokenizers to generate fragmented sub-tokens.
Semantic entropy pruning
Identifies and eliminates low-information words and conversational filler from user and system instructions while retaining key entities and directives.
Safe Vault code isolation
Locks source code, JSON schemas, SQL queries, and variable placeholders bit-for-bit so they bypass text compression completely.
Direct Input Compression API
Architecture comparison
| Evaluation metric | Curtly.dev gateway | Traditional / naive approach |
|---|---|---|
| Compression Speed | < 2ms in-memory execution | 150-400ms via secondary LLM summarizers |
| Code & JSON Safety | Safe Vault isolation ensures 0% corruption | Frequent truncation of quotes, brackets, and variables |
| Cost Overhead | Included in lightweight flat plan | Requires paying for extra summarizer model tokens |
Frequently asked questions
Explore related platform features
Ready to optimize your AI infrastructure?
Start optimizing in 60 seconds with a 1-line baseURL change. Free tier available with zero credit card required.