Skip to main content

Endpoint Specification


Request Headers

string
required
Your secret Curtly API key (Bearer ctly_live_...).
string
Overrides API key AI compression setting for neutral mode keys.
  • true: Activates AI Inception Mercury 2.5 diffusion for deep semantic condensation.
  • false: Runs deterministic 0ms Safe Vault algorithmic pruning only.
string
Specifies the target compression ladder level:
  • fast: 0ms overhead, deterministic cleaning and code license stripping.
  • balanced: Default, balanced 40% to 60% token reduction.
  • aggressive: Deepest token compaction (65% to 80% reduction).

Request Body

string
required
The raw text, markdown content, or prompt string to be compressed.
string
default:"balanced"
Compression level: conservative, balanced, or aggressive.
string
default:"openai-o200k"
Target tokenizer model for accurate BPE token telemetry:
  • openai-o200k (GPT-6 Astra, GPT-5.6, GPT-4o)
  • claude-bpe (Claude Opus 5.5, Claude Fable 5.1, Claude 4 Sonnet)
  • deepseek-llama (DeepSeek-V4.1-Flash, DeepSeek R1, MiMo-V2.6-Pro, Llama 4)
  • universal-gemini (Gemini 3.8 Flash, Gemini 3.8 Live, Grok 4.7, Qwen 3.8)
  • openai-cl100k (Legacy GPT-4, GPT-3.5)
boolean
default:"true"
Isolates and syntax-locks fenced and inline code blocks inside the Safe Vault.
boolean
default:"true"
Preserves JSON objects, schemas, and API payloads while stripping nulls and empty arrays.
boolean
default:"true"
Appends Curtly’s YAGNI Brevity Governor to eliminate up to 80% of downstream LLM generation fluff.

Response

boolean
Indicates whether the compression pipeline succeeded.
string
The final compressed prompt text with all protected placeholders rehydrated and Brevity Governor attached.
object

Example Request