Pay once for repeated work

Caching

Serve identical requests from the gateway at $0, and use provider prompt caching to discount long, reused prompts.

usage · cached response
{
"usage": {
"prompt_tokens": 12,
"completion_tokens": 48,
"cost": 0
},
"metadata": { "cached": true }
}
Repeated identical requests cost $0
01

$0 cache hits

Identical requests never reach the provider.

02

Prompt caching

Discounted reuse of long prefixes.

03

Configurable TTL

Choose how long responses live.

04

Visible savings

Cached tokens shown in every response.

Built for

  • Coding tools

    Huge system prompts, reused every call

  • Test suites

    Re-run evals without paying twice

  • FAQ bots

    Common questions served instantly

Mark a prefix for caching
request.json
1{2	"model": "claude-sonnet-4-6",3	"messages": [4		{5			"role": "system",6			"content": [7				{8					"type": "text",9					"text": "<long system prompt>",10					"cache_control": { "type": "ephemeral" }11				}12			]13		},14		{ "role": "user", "content": "Review this diff" }15	]16}
Read docs

More in routing & reliability

All features

Start using Caching today

One API key. Every model. Live in minutes.