Compression control

Smart detection

Smart detection is an opt-in classifier that picks an intensity per request from the user's prompt. It's ideal when your app has one API key for many kinds of conversations.

Enabling it

Enable smart detection on a per-key basis — either when you create the key (the dashboard's key-creation dialog has a toggle) or by PATCHing the key with smart_detect_enabled: true. Once on, every request that doesn't include an explicit X-Mintoken-Intensity override goes through the classifier.

Classification rules

The classifier is pattern-based and deterministic — no LLM call, zero added latency. The rules, in priority order:

SignalDecision
Security vocabulary: CVE, vulnerability, SQL injection, XSS, RCEnone — forward to the provider with no mintoken rules. Security content must not be compressed.
Legal / compliance: GDPR, privacy policy, terms, liabilitynone — full fidelity required.
User-facing signals: "error message displayed to users", "notification text"lite — natural prose preserved.
High code-to-prose ratio (2+ fenced code blocks)lite— code is already dense; don't over-compress the thin prose around it.
Explanation signals: "explain", "how does", "tutorial", "walk me through"ultra — explanations are the most compressible content.
Everything elsefull — the default.

Custom rules

You can extend the classifier with per-account custom rules — for example, "never compress anything about our product XYZ" (regex match → none) or "always ultra for internal log summarization" (regex match → ultra). See Custom rules.

Checking what was picked
Every response includes X-Mintoken-Intensity. When smart detection chose none, you'll see that literal value — confirming mintoken bypassed the request.