Skip to main content
Skip to main content
Obtenir une clé API gratuite →

Output Verbosity Suffixv1.4.0#

POST /v1/compress accepts an optional style field taking one of "terse", "normal" (default), or "verbose". When you set style: "terse", the response carries a short system_prompt_suffix string plus a style_suffix_version tag. Inject the suffix into your downstream LLM's system prompt to cap output verbosity.

The suffix is a versioned constant: fast to inject, prompt-cache-friendly, and does not alter the compressed skeleton itself. It reduces output tokens without affecting compression fidelity.

{
        "compressed": "Short skeleton of the document…",
        "stats": { "original_tokens": 485, "compressed_tokens": 61, "savings_pct": 87.4, ... },
        "system_prompt_suffix": "Be concise. No filler, no hedging. State conclusions first. Omit sycophancy and preambles. Fragments are fine for prose; keep code blocks normal.",
        "style_suffix_version": "v1"
      }

The suffix is a versioned constant (deterministic and prompt-cache-friendly) and changes only when the format changes. "verbose" is reserved for a future workflow; today it returnsnull (same as "normal").

Secret-Marker Pre-flight Blockv1.4.0#

POST /v1/compress and POST /v1/compress-code/structural run a pre-flight against the submitted content for unambiguous secret markers. On match, the request is refused with HTTP 400 and a machine-readable error body:

{
        "detail": {
          "error_code": "sensitive_content",
          "marker_class": "aws_access_key",
          "message": "Input appears to contain sensitive content; refusing to compress. Remove the secret value and retry."
        }
      }

Detected marker classes: pem_private_key(PEM RSA/EC/DSA/OpenSSH/PGP/ENCRYPTED private-key headers), aws_access_key (AKIA+ 16-char suffix), openai_api_key (sk-or sk-proj- with ≥20-char suffix), ssh_key_path (.ssh/id_rsa|ed25519|ecdsa|dsafragments), and dotenv_secret(multi-line KEY=value with known-sensitive names like SECRET_KEY, DATABASE_URL, STRIPE_SECRET_KEY, POLAR_ACCESS_TOKEN, etc).

The matched value is never echoed. Error responses carry only the marker_class; the structured log line (sensitive-content-refuse user_id=… marker_class=…) likewise carries no content. Safe to log.

Structural-Loss Advisory Header (code_blocks, headings, urls)v1.4.0#

Every POST /v1/compress response now counts the fenced code blocks, markdown headings, and URLs present in the input and compares to the compressed output. If any class has fewer occurrences in the output, an advisory header is attached:

HTTP/1.1 200 OK
      X-Fidelity-Warning: code_blocks,urls
      Content-Type: application/json
      …

This is advisory. The request never fails on structural loss. Dashboards can alert on high per-tenant rates; auditors can verify "did I lose structure?" without a separate call. Possible values are a comma-separated subset of code_blocks, headings, urls. Absent means all three classes were preserved.

Fidelity Profiles#

Save named compression presets so repeat workflows fire one slug instead of three knobs. Each profile stores a fidelity level, chunk size, and skeleton ratio; pass profile="my-name" on any compress call instead of the raw parameters.

Five built-in fidelity tiers: abstract (most compressed) · outline · balanced (default) · detailed · raw. Manage profiles at /dashboard/profiles.

Where to next

Quickstart
Connect your MCP client and run your first compression in under two minutes.
Recipes
Copy-paste tool sequences for the workflows you'll run most.
Troubleshooting
Symptom-to-fix for the errors people actually hit.
Glossary
Plain-language definitions for skeleton, fidelity, profiles, and the rest.