Gengxi API Developer Docs
Prompt caching
Understand when stable repeated context may reduce repeated input cost.
How prompt caching works
Stable repeated context may be cached by supported upstream models and routes, which can reduce repeated input costs.
What affects a cache hit
- Model
- Provider
- Account type
- Request path
- Context stability
Design for stable prefixes
Keep reusable instructions and large shared context stable when the selected model and route support caching. Put frequently changing user content after the stable context where the protocol permits.