Denkwerk
prompt cache layout
Takes the prompt as segments with a change frequency (never, daily, per_session, per_request), detects volatile content such as timestamps, dates, UUIDs and epoch values inside supposedly stable segments, reorders segments so the longest stable prefix comes first (Anthropic: tools, system, messages order is kept), places up to four breakpoints at stability boundaries, checks the documented minimum cacheable length and estimates the input cost factor for N requests sharing the prefix. Rules.
POST https://denk.halowerk.com/v1/prompt-cache-layoutInputs
| Field | Type | Required | Description |
|---|---|---|---|
| provider | string | Yes | Target provider. |
| model | string | No | Model id, e.g. claude-sonnet-4-6, gpt-5.6-sol, gemini-2.5-flash. Determines minimum length and multipliers. |
| segments | array | Yes | Prompt parts in their current order. |
| requests_per_cache_lifetime | integer | No | Requests that share the prefix within one cache lifetime. |
| ttl | string | No | Anthropic 5m vs 1h, OpenAI (GPT-5.6+) 30m vs 12h. |
| cache_read_multiplier | number | No | Override or supply the cache-read price factor. |
| cache_write_multiplier | number | No | Override the cache-write price factor. |
| encoding | string | No |
Show full input schema
{
"type": "object",
"additionalProperties": false,
"required": [
"provider",
"segments"
],
"properties": {
"provider": {
"type": "string",
"enum": [
"anthropic",
"openai",
"gemini"
],
"description": "Target provider."
},
"model": {
"type": "string",
"maxLength": 80,
"description": "Model id, e.g. claude-sonnet-4-6, gpt-5.6-sol, gemini-2.5-flash. Determines minimum length and multipliers."
},
"segments": {
"type": "array",
"minItems": 1,
"maxItems": 64,
"description": "Prompt parts in their current order.",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"text",
"changes"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"role": {
"type": "string",
"enum": [
"tools",
"system",
"developer",
"user",
"assistant",
"document",
"example"
],
"default": "user"
},
"text": {
"type": "string",
"maxLength": 400000
},
"changes": {
"type": "string",
"enum": [
"never",
"daily",
"per_session",
"per_request"
],
"description": "How often this segment changes between requests."
},
"pinned": {
"type": "boolean",
"default": false,
"description": "Keep this segment at its position."
}
}
}
},
"requests_per_cache_lifetime": {
"type": "integer",
"minimum": 1,
"maximum": 1000000,
"default": 10,
"description": "Requests that share the prefix within one cache lifetime."
},
"ttl": {
"type": "string",
"enum": [
"default",
"long"
],
"default": "default",
"description": "Anthropic 5m vs 1h, OpenAI (GPT-5.6+) 30m vs 12h."
},
"cache_read_multiplier": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Override or supply the cache-read price factor."
},
"cache_write_multiplier": {
"type": "number",
"minimum": 1,
"maximum": 5,
"description": "Override the cache-write price factor."
},
"encoding": {
"type": "string",
"enum": [
"o200k_base",
"cl100k_base"
],
"default": "o200k_base"
}
}
}Published input example
{
"provider": "anthropic",
"model": "claude-sonnet-4-6",
"segments": [
{
"id": "question",
"role": "user",
"text": "What is the refund policy?",
"changes": "per_request"
},
{
"id": "policy",
"role": "system",
"text": "You are the support assistant of Lagertechnik Nord GmbH. Refunds are possible within 30 days.",
"changes": "never"
}
]
}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