Skip to content
HALOWERK

Denkwerk

prompt compress

Deterministic transformations in two levels. lossless: removes zero-width and BOM characters, turns no-break spaces into spaces, strips trailing whitespace, collapses inner space runs and blank-line runs, minifies JSON code blocks or a pure-JSON prompt; fenced code blocks are otherwise left untouched (indentation matters). light additionally removes HTML comments, ** and __ emphasis markers, horizontal rules after blank lines, table cell padding and exact duplicate lines (15+ characters)..

POST https://denk.halowerk.com/v1/prompt-compress

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
textstringYesUTF-8 text.
levelstringNo
tokenizerstringNoTokenizer id; see supported_tokenizers in the token-count-multi result.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100000,
      "description": "UTF-8 text."
    },
    "level": {
      "type": "string",
      "enum": [
        "lossless",
        "light"
      ],
      "default": "lossless"
    },
    "tokenizer": {
      "type": "string",
      "enum": [
        "o200k_base",
        "cl100k_base",
        "p50k_base",
        "r50k_base",
        "qwen2.5",
        "deepseek-v3",
        "mistral-tekken",
        "falcon",
        "gpt-neox",
        "yi-1.5",
        "granite-3.3",
        "glm-4.5"
      ],
      "description": "Tokenizer id; see supported_tokenizers in the token-count-multi result.",
      "default": "o200k_base"
    }
  }
}

Open original schema

Published input example

{
  "text": "Please   answer briefly.\n\n\n\n```json\n{\n  \"a\": 1\n}\n```",
  "level": "lossless"
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’