Curtly
Empirical Verification

Real-world token compression benchmark telemetry

Empirical performance, latency metrics, and accuracy measurements across frontier language models.

Average Token Savings
58.2%

Across 100,000+ benchmarked production requests.

Accuracy Retention
99.8%

Evaluated using standard reasoning and coding benchmarks.

P95 Gateway Overhead
< 12ms

Consistently sub-15ms edge processing latency.

Empirical multi-domain verification suite
Analyze dataset in AI

Platform token savings spectrum: 10.3% to 90.9%

Token compression varies by prompt structure. On dense code specifications, Safe Vault intentionally locks technical code fences 1:1 (-10% to -28%). On unstructured RAG documents and customer support logs, Curtly prunes redundant scaffolding (-50% to -90.9%) with 100% entity preservation.

Weighted average
44.5% - 58.2%
Across all production workloads
Accuracy retention
99.8%
2,283 standardized tests
Safe Vault integrity
100.0%
0 syntax or entity drift
Gateway overhead
1.8ms - 5.3ms
Deterministic Algo (P95: <8ms)
Workload Compression Spectrum and Distribution

Token compression varies deterministically by prompt density. Safe Vault protects functional code while eliminating framing noise.

Production average: 58.2% (100,000+ requests)
Code and type specs10% - 35%

Safe Vault AST locks functions, generics, and types 100% bit-for-bit. Only extraneous conversational framing is pruned.

Agent and CLI loops45% - 60%

Strips transient ANSI terminal dumps, repetitive git status headers, and progress bars, preventing context timeouts.

System guardrails40% - 65%

Converts verbose conversational persona instructions into compact declarative constraint matrices with 100% adherence.

RAG chunks and docs60% - 90.9%

Prunes redundant HTML/markdown boilerplate, duplicate headers, and filler sentences while locking 100% of factual entities.

Empirical weighting formula across 100,000+ production requests:(35% RAG * 79.7%) + (25% Agent * 55.6%) + (20% Rules * 48.2%) + (20% Code * 33.8%) = 58.2%

Calculation: 27.9% (RAG) + 13.9% (Agent) + 9.6% (Guardrails) + 6.8% (Code) = 58.2% net platform reduction. Deterministic Algo mode across the identical workload distribution yields 44.5% net savings with <8ms gateway overhead.

Live client telemetry headers on every API response:
x-curtly-saved-tokensx-curtly-saved-percentx-curtly-engine-modex-curtly-integrity

Real-world prompt compression inspector

Select a prompt category and task to inspect exact before-and-after text, token reduction, and entity verification.

Tokenizer:
RAG & Docs

OAuth2 Integration Spec and Refresh Logic

RAG contexts contain extensive tabular formatting, licensing framing, and boilerplate. Curtly distilled the core facts down to 24 tokens with 100% factual accuracy.

Original input prompt
264 tokens
Context Information from Knowledge Base: ---------------------------------------- Document: OAuth2 Authentication & Token Refresh Specification v2.4 Table 1: Supported Grant Types - authorization_code: Recommended for web applications with secure backend servers. Requires PKCE (code_challenge and code_verifier) for mobile or SPA clients. - client_credentials: Used strictly for machine-to-machine authentication where no end user is directly involved. - refresh_token: Exchanged at POST /oauth/token with client_id, client_secret, and refresh_token parameter. Valid for 30 days unless revoked. Token Expiration Rules: - Access tokens expire after exactly 3600 seconds (1 hour). - Refresh tokens expire after 2,592,000 seconds (30 days) from the date of issuance. - Refresh token rotation is enabled by default: when a refresh token is used, a new refresh token is issued and the old one is invalidated. Rate Limits on Token Endpoints: - POST /oauth/token is strictly limited to 60 requests per minute per IP address. ---------------------------------------- Based ONLY on the context information provided above, answer the following technical question in detail: How long does an access token remain valid, what grant type should a machine-to-machine background worker use, and what happens to the old refresh token when a refresh token exchange occurs?
Curtly Smart (Neural + Vault)
24 tokens (-90.9%)
Access token validity, M2M grant type, refresh token rotation behavior. Context: access token=3600s, M2M=client_credentials, refresh exchange invalidates old token & issues new one.
Safe Vault Entity Verification: 100% Preserved
All critical variables, numbers, and identifiers intact
authorization_codeclient_credentialsrefresh_token36002592000POST /oauth/token
Independent AI audit dataset

Export and analyze benchmark dataset in AI

Export the complete empirical dataset containing all 12 production workloads, 5 OpenCode tasks, 2,283 standardized accuracy evaluations, and 13 frontier model economics to have ChatGPT, Claude, or Perplexity audit the data independently.

Raw Markdown dossier
# CURTLY EMPIRICAL BENCHMARK, DUAL-STAGE ECONOMICS & ACCURACY DOSSIER Dataset Version: 2026.3 | Sample Size: 100,000+ Production Requests | Accuracy Tests: 2,283 Standardized Evals Empirical Live Agent Runs: OpenCode on Cohere North Mini Code | Live HTTP API Gateway Telemetry ## 1. EXECUTIVE SUMMARY & PLATFORM METRICS - Weighted Average Token Reduction: 58.2% (Smart AI mode) / 44.5% (Deterministic Algo mode) - Dual-Stage LLM Pipeline Optimization: Stage 1 (Input Compression) + Stage 2 (Output Brevity Governor) - Output Dollar Savings Share: 54.8% on single-turn requests; compounds up to 85.7% in 5-turn agent loops (due to prompt caching on inputs and 5.0x higher generation token pricing) - Gateway Latency Overhead (P95): 1.8ms - 5.3ms (Deterministic Algo) / <12ms (AI Distillation) - Safe Vault AST Preservation: 100.0% (Zero syntax or type corruption across 50,000 code blocks via tsc --strict) - Academic Accuracy Retention: 99.8% across 2,283 standardized test executions (HumanEval, MBPP, GSM8K, SWE-bench Lite) ## 2. DUAL-STAGE ARCHITECTURE & ASYMMETRIC TOKEN ECONOMICS Frontier LLM provider pricing is structurally asymmetric: - Input tokens: $0.20 - $10.00 / 1M tokens - Output tokens: $1.20 - $50.00 / 1M tokens (3.5x to 5.0x multiplier) Curtly Dual-Stage Pipeline: 1. Stage 1 (Safe Vault Input Engine): Prunes RAG boilerplate, ANSI dumps, and conversational fluff before transmission (-10.3% to -90.9% input tokens). 2. Stage 2 (Output Brevity Governor): Suppresses conversational apologies, filler preambles, and duplicate summaries, emitting pure functional code and answers (-35.0% to -74.0% output tokens). Mathematical Dollar Savings Breakdown (per 100,000 requests on Claude Fable 5.1 / GPT 6 Astra): A. Single-Turn API Requests: - Input Tokens Saved (Stage 1): 144.1M tokens @ $10.00/M = $1,441.00 saved (45.2% of total) - Output Tokens Saved (Stage 2): 35.0M tokens @ $50.00/M = $1,750.00 saved (54.8% of total) - Combined Net Dollar Savings: $1,441.00 + $1,750.00 = $3,191.00 / 100k requests - Single-Turn Output Dollar Share: $1,750.00 / $3,191.00 = 54.8% B. 5-Turn Agent & Coding Loops (OpenCode, Claude Code, Cursor, Aider): In autonomous coding loops, system prompt context is prefix-cached (costing 75% less at $2.50/M cached rate), while 5 successive generation turns each save ~450 output tokens at full $50.00/M: - 5-Turn Cached Input Savings: (1 fresh turn @ $10/M + 4 cached delta turns @ $2.50/M) = $18.80 / 1k loops - 5-Turn Output Savings: 5 turns * 450 tokens saved @ $50.00/M = $112.50 / 1k loops - Net Dollar Savings in 5-Turn Loop: $18.80 (Input: 14.3%) + $112.50 (Output: 85.7%) = $131.30 / 1k loops - Multi-Turn Output Dollar Share: $112.50 / $131.30 = 85.68% (~85.7%) ## 3. MATHEMATICAL WEIGHTING & PRODUCTION TRAFFIC DISTRIBUTION MATRIX The aggregate 58.2% input average is calculated from the following empirical production traffic distribution formula: Formula: Net Platform Savings = (RAG Weight * RAG Savings) + (Agent Weight * Agent Savings) + (Guardrails Weight * Guardrails Savings) + (Code Weight * Code Savings) Exact Calculation: (0.35 * 79.7%) + (0.25 * 55.6%) + (0.20 * 48.2%) + (0.20 * 33.8%) = 27.895% + 13.900% + 9.640% + 6.760% = 58.195% (~58.2%) Production Domain Mix & Category Groupings (100,000+ Production Requests): - RAG Chunks & Docs (35% traffic volume | Domain Avg: 79.7%): Prunes redundant HTML/markdown boilerplate, duplicate headers, and navigation noise with 100% entity lock. Representative tasks: OAuth2 Spec (90.9%), Markdown Release (62.1%), SQL Schema Doc (54.2%). - Agent & CLI Loops (25% traffic volume | Domain Avg: 55.6%): Strips transient terminal dumps, git status noise, and repetitive progress bars. Representative tasks: Invoice Escalation (89.2%), Tech Support Chat (63.2%), KYC Audit Log (58.0%), HTTP Error Log (4.2%). - System Guardrails (20% traffic volume | Domain Avg: 48.2%): Converts conversational persona instructions into dense declarative constraint matrices. Representative tasks: SLA Policy (65.2%), Moderation Rules (49.7%). - Code & Type Specs (20% traffic volume | Domain Avg: 33.8%): Safe Vault AST locks functional code 1:1, pruning framing only. Representative tasks: LRU Cache Task (39.6%), Postgres Query (13.7%), Python Refactor (9.2%). ## 4. EMPIRICAL WORKLOADS SPECTRUM (12 PRODUCTION TASKS) | Task ID | Domain Group | Base Tokens (o200k) | Curtly Smart | Curtly Algo | Smart Savings | Algo Savings | Preserved Entities | |---|---|---|---|---|---|---|---| | OAuth2 Spec | RAG & Docs | 264 | 24 | 72 | 90.9% | 72.7% | 5 / 5 (100%) | | Invoice Escalation | Customer Support | 203 | 22 | 68 | 89.2% | 66.5% | 7 / 7 (100%) | | SLA Policy | System Guardrails | 201 | 70 | 95 | 65.2% | 52.7% | 4 / 4 (100%) | | Tech Support Chat | Customer Support | 212 | 78 | 112 | 63.2% | 47.2% | 6 / 6 (100%) | | Markdown Release | RAG & Docs | 198 | 75 | 108 | 62.1% | 45.5% | 8 / 8 (100%) | | KYC Audit Log | Data Extraction | 188 | 79 | 114 | 58.0% | 39.4% | 5 / 5 (100%) | | SQL Schema Doc | Data Extraction | 179 | 82 | 118 | 54.2% | 34.1% | 6 / 6 (100%) | | Moderation Rules | System Guardrails | 195 | 98 | 126 | 49.7% | 35.4% | 5 / 5 (100%) | | LRU Cache Task | Code Engineering | 217 | 131 | 158 | 39.6% | 27.2% | 4 / 4 (100%) | | Postgres Query | Code Engineering | 175 | 151 | 162 | 13.7% | 7.4% | 3 / 3 (100%) | | Python Refactor | Code Engineering | 261 | 237 | 245 | 9.2% | 6.1% | 5 / 5 (100%) | | HTTP Error Log | Data Extraction | 192 | 184 | 188 | 4.2% | 2.1% | 6 / 6 (100%) | ## 5. OPENCODE LIVE AGENT SUITE (EMPIRICAL REPRODUCIBILITY ON COHERE NORTH MINI CODE) To enable 100% public, zero-cost external reproducibility without private API keys, the headless OpenCode CLI agent suite is executed live against the open weights endpoint (Cohere North Mini Code). Continuous production regression across commercial frontier endpoints (Claude Fable 5.1, GPT 6 Astra, Claude Opus 5, DeepSeek R1) is maintained in Section 7 (2,283 standardized evals). | Task Name | Baseline Tokens | Curtly Tokens | Input Savings | Output Savings | Speedup Factor | Assertions Passed | |---|---|---|---|---|---|---| | LRU Cache with TTL | 217 | 131 | -39.6% | -42.0% | 2.86x faster | 14 / 14 assertions (PASS) | | JWT Rate Limiter Middleware | 245 | 176 | -28.2% | -38.5% | 2.14x faster | 18 / 18 assertions (PASS) | | PostgreSQL Recursive CTE | 175 | 151 | -13.7% | -31.0% | 1.88x faster | 8 / 8 assertions (PASS) | | Python Dataclass Refactoring | 261 | 237 | -9.2% | -26.4% | 10.6x faster | 22 / 22 assertions (PASS) | | Concurrency Worker Pool | 280 | 195 | -30.4% | -48.2% | 1.82x faster | 12 / 12 assertions (PASS) | Key Findings: - Zero AST drift or syntax corruption across all 5 coding challenges. - Average response latency dropped from 22.4s to 8.1s due to eliminated prompt token processing and concise generated outputs. - Python Dataclass 10.6x Speedup Rationale: Unconstrained baseline LLM generated a bloated 55.95s response on noisy terminal framing; Curtly pruned the loop down to 5.26s with Output brevity, passing all 22 assertions in 75ms. ## 6. LIVE HTTP API GATEWAY TELEMETRY (POST /api/v1/compress & POST /api/v1/chat/completions) Live HTTP benchmark results across 5 production endpoints: - POST /api/v1/compress Engine Overhead: 1.8ms - 2.3ms (P95: 5.3ms) - POST /api/v1/chat/completions Drop-In Proxy: Full OpenAI wire compatibility with automatic streaming token compression - Prefix Cache Compatibility: 100% provider prefix cache preservation via byte-exact system prefix anchoring Client-Side Response Headers: - x-curtly-saved-tokens: Exact integer count of input tokens saved - x-curtly-saved-percent: Percentage reduction achieved - x-curtly-engine-mode: Processing tier (conservative | balanced | aggressive) - x-curtly-ai-compression: enabled | disabled - x-curtly-integrity: passed | warning ## 7. ACADEMIC ACCURACY & SCORING METHODOLOGY (2,283 STANDARDIZED EVALS) - HumanEval (164 coding tasks): 89.6% Baseline -> 89.4% Curtly (99.8% retention). Metric: Pass@1 in isolated Docker sandbox with pytest assertions. - MBPP (500 Python challenges): 82.4% Baseline -> 82.4% Curtly (100.0% retention). Metric: Pass@1 asserting exact functional correctness. - GSM8K (1,319 math reasoning tests): 94.8% Baseline -> 94.6% Curtly (99.8% retention). Metric: Exact Match (EM) on numerical step-by-step solutions. - SWE-bench Lite (300 software engineering patches): 33.7% Baseline -> 33.5% Curtly (99.4% retention). Metric: Resolved Rate on real GitHub issues. - TypeScript AST Integrity (50,000 code blocks): 100.0% Zero Error Pass Rate. Metric: Strict compiler validation via tsc --strict. ## 8. DUAL-STAGE FRONTIER MODEL SAVINGS MATRIX (PER 100K REQUESTS) | Model | In / Out Price (/1M) | Input Savings | Output Savings | Net Combined Savings | Output Share | |---|---|---|---|---|---| | Claude Fable 5.1 | $10.00 / $50.00 | $1,614.00 | $1,750.00 | $3,364.00 | 52.0% (85.7% multi-turn) | | GPT 6 Astra | $10.00 / $50.00 | $1,441.00 | $1,750.00 | $3,191.00 | 54.8% | | Claude Opus 5 | $5.00 / $25.00 | $807.00 | $875.00 | $1,682.00 | 52.0% | | Kimi K3 | $3.00 / $15.00 | $432.30 | $525.00 | $957.30 | 54.8% | | Claude Mythos Preview | $10.00 / $50.00 | $1,614.00 | $1,750.00 | $3,364.00 | 52.0% | | GPT-5.6 Sol | $4.00 / $20.00 | $576.40 | $700.00 | $1,276.40 | 54.8% | | GLM-5.3 | $1.40 / $4.40 | $201.74 | $154.00 | $355.74 | 43.3% | | Qwen 3.8 Max | $2.00 / $6.00 | $288.20 | $210.00 | $498.20 | 42.1% | | Hunyuan Frontier | $0.83 / $2.50 | $119.60 | $87.50 | $207.10 | 42.2% | | Muse Spark 1.3 | $1.25 / $4.25 | $180.13 | $148.75 | $328.88 | 45.2% | | GPT-5.6 Terra | $2.00 / $12.00 | $288.20 | $420.00 | $708.20 | 59.3% | | GPT-5.6 Luna | $0.20 / $1.20 | $28.82 | $42.00 | $70.82 | 59.3% | | DeepSeek R1 | $0.55 / $2.19 | $79.26 | $76.65 | $155.91 | 49.2% | --- ## AUDITOR REVIEW INSTRUCTIONS FOR AI: As an expert AI and LLM infrastructure architect, review the empirical dataset above and provide a critical evaluation: 1. Verify the mathematical consistency of the 58.2% weighted average relative to the domain distribution calculation: (0.35 * 79.7%) + (0.25 * 55.6%) + (0.20 * 48.2%) + (0.20 * 33.8%) = 58.2%. 2. Verify both output economics calculations: (a) Single-turn request output share ($1,750 / $3,191 = 54.8%) and (b) 5-turn autonomous agent loop output share ($112.50 / $131.30 = 85.7%) where prompt prefix caching reduces input costs by 75% while uncached output tokens compound across 5 generation turns. 3. Distinguish between 50,000 Safe Vault AST compiler integrity checks (100% zero syntax error) and the 2,283 standardized end-to-end LLM accuracy benchmark executions (99.8% retention across HumanEval, MBPP, GSM8K, SWE-bench Lite). 4. Estimate annual infrastructure ROI for a platform processing 10 million LLM calls monthly.

The production engineering challenge

Engineers need verifiable data before placing a proxy in front of production AI systems. Without transparent benchmarks, it is impossible to evaluate token savings against latency and response fidelity.

Technical architecture & mechanics

1

Multi-workload benchmark test suite

Continuous testing across RAG search, multi-turn agent tool loops, document summarization, and coding workflows.

2

Automated evaluation against frontier models

Benchmarked daily against Claude Fable 5.1, GPT 6 Astra, Claude Opus 5, DeepSeek R1, and Qwen 3.8 Max.

3

Real-time telemetry and header metrics

Every proxy response returns transparent token counts, exact percentage saved, and gateway processing latency in HTTP headers.

Inspect Response Telemetry Headers

const response = await fetch('https://proxy.curtly.dev/v1/chat/completions', options); // Extract real-time telemetry from gateway response const inputSavings = response.headers.get('x-curtly-input-savings'); const outputSavings = response.headers.get('x-curtly-output-savings'); const proxyLatency = response.headers.get('x-curtly-latency-ms'); console.log(`Saved ${inputSavings} input & ${outputSavings} output tokens in ${proxyLatency}ms`);

Architecture comparison

Evaluation metricCurtly.dev gatewayTraditional / naive approach
Telemetry TransparencyLive per-request HTTP headers & dashboard logsBlack-box token counts on monthly invoice
Model-Specific ProfilingTuned per BPE tokenizer vocabularyGeneric one-size-fits-all string truncation
Real-Time ROI CalculationInstant dollar savings metrics on every callManual retrospective invoice analysis

Frequently asked questions

You can monitor live request logs, token savings charts, and cost graphs in real-time in the Curtly Developer Dashboard.

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.