Reorder prompt segments for provider prompt caching: stable content first, volat...
https://denk.halowerk.com/v1/prompt-cache-layoutOverview
Reorder prompt segments for provider prompt caching: stable content first, volatile last, breakpoint positions, minimum-length check and a cost factor.
Protocol
x402 (POST)
Price
$0.0020
Payment Asset
USD Coin
Payment Network
eip155:8453
Category
uncategorized
Provider
denk
Source
bazaar
Indexed
2026-11-20 16:11:02
Health
Status
unknown
Latency (p50)
—
Uptime (30d)
—
Reliability Score
—
Last Checked
Never
Last Healthy
Never
Consecutive Failures
0
x402 Payment Validation
Payment Requirements
—
Asset Verified
—
Facilitator
—
Input Schema
{
"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"
}
Output Schema
{
"example": {
"limitations": [
"Token counts for Anthropic, Gemini and OpenAI models without a tiktoken mapping are estimates; their tokenizers are not public.",
"Cache hits are never guaranteed (routing, lifetime, request settings)."
],
"result": {
"breakpoints": [
{
"after_segment": "policy",
"eligible": false,
"prefix_tokens": 19,
"stability": "never"
}
],
"cacheable_prefix_tokens": 19,
"cacheable_share": 0.76,
"cost": null,
"encoding": "o200k_base",
"meets_minimum": false,
"min_cacheable_tokens": 1024,
"model": "claude-sonnet-4-6",
"optimized_order": [
"policy",
"question"
],
"provider": "anthropic",
"recommendations": [
"The stable prefix has about 19 tokens; the documented minimum for this model is 1024. Shorter prefixes are not cached."
],
"reordered": true,
"segments": [
{
"changes": "never",
"id": "policy",
"position_after": 0,
"position_before": 1,
"role": "system",
"tokens": 19,
"volatile_findings": []
},
{
"changes": "per_request",
"id": "question",
"position_after": 1,
"position_before": 0,
"role": "user",
"tokens": 6,
"volatile_findings": []
}
],
"sources": [
{
"retrieved": "2026-11-01",
"url": "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
}
],
"tokens_are_estimates": true,
"total_tokens": 25
},
"service": "prompt-cache-layout",
"status": "success"
},
"type": "json"
}