Reorder prompt segments for provider prompt caching
Reorder prompt segments for provider prompt caching: stable content first, volatile last, breakpoint positions, minimum-length check and a cost factor.
Answeringour last check, 2026-11-28
7 of 7checks answered this week
1199 msmedian answer time
$0.002listed price per call
$0.002price it asked us
Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.
Endpoint
POST https://denk.halowerk.com/v1/prompt-cache-layout
| Category | Everything else |
|---|---|
| Provider host | denk.halowerk.com |
| Networks | eip155:8453 |
| Payment schemes | exact |
| Self-reported calls, 30 days | 1 from 1 payers (the provider's figure, not ours) |
Our checks, last 30 days
| Day | Result | HTTP | Asked | Time |
|---|---|---|---|---|
| 2026-11-28 | valid payment request | 402 | $0.002 | 1213 ms |
| 2026-11-27 | valid payment request | 402 | $0.002 | 1188 ms |
| 2026-11-26 | valid payment request | 402 | $0.002 | 1195 ms |
| 2026-11-25 | valid payment request | 402 | $0.002 | 1223 ms |
| 2026-11-24 | valid payment request | 402 | $0.002 | 1205 ms |
| 2026-11-23 | valid payment request | 402 | $0.002 | 1199 ms |
| 2026-11-22 | valid payment request | 402 | $0.002 | 1179 ms |
| 2026-11-21 | valid payment request | 402 | $0.002 | 1172 ms |
| 2026-11-20 | valid payment request | 402 | $0.002 | 1142 ms |
Example input (from the provider)
{
"body": {
"model": "claude-sonnet-4-6",
"provider": "anthropic",
"segments": [
{
"changes": "per_request",
"id": "question",
"role": "user",
"text": "What is the refund policy?"
},
{
"changes": "never",
"id": "policy",
"role": "system",
"text": "You are the support assistant of Example GmbH. Refunds are possible within 30 days."
}
]
},
"bodyType": "json",
"method": "POST",
"type": "http"
}
Promised output schema (from the provider)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"additionalProperties": false,
"properties": {
"cache_read_multiplier": {
"description": "Override or supply the cache-read price factor.",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"cache_write_multiplier": {
"description": "Override the cache-write price factor.",
"maximum": 5,
"minimum": 1,
"type": "number"
},
"encoding": {
"default": "o200k_base",
"enum": [
"o200k_base",
"cl100k_base"
],
"type": "string"
},
"model": {
"description": "Model id, e.g. claude-sonnet-4-6, gpt-5.6-sol, gemini-2.5-flash. Determines minimum length and multipliers.",
"maxLength": 80,
"type": "string"
},
"provider": {
"description": "Target provider.",
"enum": [
"anthropic",
"openai",
"gemini"
],
"type": "string"
},
"requests_per_cache_lifetime": {
"default": 10,
"description": "Requests that share the prefix within one cache lifetime.",
"maximum": 1000000,
"minimum": 1,
"type": "integer"
},
"segments": {
"description": "Prompt parts in their current order.",
"items": {
"additionalProperties": false,
"properties": {
"changes": {
"description": "How often this segment changes between requests.",
"enum": [
"never",
"daily",
"per_session",
"per_request"
],
"type": "string"
},
"id": {
"maxLength": 64,
"minLength": 1,
"type": "string"
},
"pinned": {
"default": false,
"description": "Keep this segment at its position.",
"type": "boolean"
},
"role": {
"default": "user",
"enum": [
"tools",
"system",
"developer",
"user",
"assistant",
"document",
"example"
],
"type": "string"
},
"text": {
"maxLength": 400000,
"type": "string"
}
},
"required": [
"id",
"text",
"changes"
],
"type": "object"
},
"maxItems": 64,
"minItems": 1,
"type": "array"
},
"ttl": {
"default": "default",
"description": "Anthropic 5m vs 1h, OpenAI (GPT-5.6+) 30m vs 12h.",
"enum": [
"default",
"long"
],
"type": "string"
}
},
"required": [
"provider",
"segments"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST",
"PUT",
"PATCH"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}