Prompt Caching

You might say

Every request starts with the same long rules. Why does my bill show a much cheaper cached-input line?

A mechanism that reuses pre-computed model state for identical leading prompt prefixes to cut input cost and first-token waitWhen a support API sends the same product manual and system rules before each user question, prompt caching skips recomputing that shared prefix. It only hits when the leading prefix matches byte-for-byte and meets the provider's minimum length; putting a timestamp or random ID at the top invalidates the whole prefix.
Prompt CachePrefix Caching

You can say this to an AI Agent

Ready to paste into Cursor, Claude Code, or Codex
Structured AI Agent prompt

Inspect how we assemble our model requests: place the static system prompt, tool definitions, and long reference material at the start, and move timestamps, request IDs, and user input to the end. Then send two consecutive requests with different questions and log cached_tokens alongside total input tokens for verification.

Want your Agent to translate plain-language UI ideas automatically?Install free VibeHub Skill →
Oil UI Pro. Push AI’s design skills to the limit. Usability, existing projects and stricter review.
Further reading