POST
Executes deterministic compression on the input string and returns the optimized text along with token economics and latency metrics.
/api/v1/compressAuthentication
Include your secret API key as a Bearer token in theAuthorization header, or via the X-Curtly-Key header:
Request Parameters
string
required
The raw text prompt or context window to compress. Maximum allowed length is 50,000 characters.
string
default:"balanced"
Compression intensity level:
conservative: ~20% – 35% reduction (formatting cleanup and preamble pruning)balanced: ~40% – 55% reduction (standard production default)aggressive: ~55% – 75% reduction (deep density pruning)
boolean
default:"true"
When
true, isolates and protects fenced code blocks and inline backticks.boolean
default:"true"
When
true, isolates and preserves valid JSON structures intact.boolean
default:"true"
When
true, isolates template tags and mustache variables ({{var}}).Response Fields
boolean
Whether the request was processed successfully.
string
The compressed output string.
object
Execution metrics: