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

Cache modes

Automatic, client-managed or off, 5m or 1h TTL.

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
{	"model": "claude-sonnet-4-6",	"messages": [		{			"role": "system",			"content": [				{					"type": "text",					"text": "<long system prompt>",					"cache_control": { "type": "ephemeral" }				}			]		},		{ "role": "user", "content": "Review this diff" }	]}
Read docs

More in routing & reliability

All features

Start using Caching today

One API key. Every model. Live in minutes.