Denkwerk
token budget trim
Accepts explicit sections with priorities (or Markdown that is split at headings, with optional priorities by heading text). Required sections are never dropped. Sections are removed in order of ascending priority (later sections first on ties); the last removed section is re-added in shortened form, cut at a sentence boundary (Unicode sentence segmentation), if space remains. The final text is counted again with the chosen tokenizer, so separators and token merges at the joins are included..
POST https://denk.halowerk.com/v1/token-budget-trimInputs
| Field | Type | Required | Description |
|---|---|---|---|
| sections | array | No | |
| markdown | string | No | Alternative to sections: split at headings. |
| priorities | object | No | Markdown only: heading text -> priority. |
| required_headings | array | No | Markdown only: headings that must be kept. |
| budget_tokens | integer | Yes | |
| tokenizer | string | No | Tokenizer id; see supported_tokenizers in the token-count-multi result. |
| separator | string | No | |
| truncate | string | No |
Show full input schema
{
"type": "object",
"additionalProperties": false,
"required": [
"budget_tokens"
],
"properties": {
"sections": {
"type": "array",
"minItems": 1,
"maxItems": 200,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"text"
],
"properties": {
"id": {
"type": "string",
"maxLength": 64
},
"title": {
"type": "string",
"maxLength": 300
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 200000
},
"priority": {
"type": "integer",
"minimum": 0,
"maximum": 100,
"default": 50,
"description": "Higher is kept longer."
},
"required": {
"type": "boolean",
"default": false
}
}
}
},
"markdown": {
"type": "string",
"minLength": 1,
"maxLength": 400000,
"description": "Alternative to sections: split at headings."
},
"priorities": {
"type": "object",
"additionalProperties": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"description": "Markdown only: heading text -> priority."
},
"required_headings": {
"type": "array",
"maxItems": 100,
"items": {
"type": "string"
},
"description": "Markdown only: headings that must be kept."
},
"budget_tokens": {
"type": "integer",
"minimum": 1,
"maximum": 2000000
},
"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"
},
"separator": {
"type": "string",
"maxLength": 20,
"default": "\n\n"
},
"truncate": {
"type": "string",
"enum": [
"sentence",
"none"
],
"default": "sentence"
}
}
}Published input example
{
"budget_tokens": 12,
"sections": [
{
"id": "a",
"text": "Keep this sentence.",
"priority": 90
},
{
"id": "b",
"text": "Drop this one first. It is less important.",
"priority": 10
}
]
}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
- Denkwerk0.003 USDC
agent card generate
POSThttps://denk.halowerk.com/v1/agent-card-generateBuilds an Agent2Agent protocol Agent Card with protocolVersion, name, description, url, version, capabilities, default input/output modes and skills. Skills come from the supplied list or are derived from OpenAPI operations (operationId, su
- Denkwerk0.003 USDC
agent permission diff
POSThttps://denk.halowerk.com/v1/agent-permission-diffTakes the tool names (with optional descriptions) and permission scopes of an agent before and after a change and reports added and removed tools and scopes, classifies new capabilities by risk (payments, sending messages, deleting or writi
- Denkwerk0.003 USDC
annotation guide draft
POSThttps://denk.halowerk.com/v1/annotation-guide-draftTakes example texts per label and derives, without a language model, the most distinguishing terms per label (TF-IDF contrast against the other labels), representative examples, cross-label example pairs with high similarity that need a wri