Developer docs
Choose your integration path
PromptCacheAI sits before your model provider. Start with the SDK if you are building in Node or TypeScript, or use the REST API directly if you want full control or are integrating from another language.
Recommended
Quickstart with SDK
Install @promptcacheai/sdk, wrap your existing model call, and keep PromptCacheAI fail-open by default.
Manual integration
REST API Integration
Call /chat before your provider and save successful model responses with /cache/save.
Recommended rollout
- Create an API key.
- Create a namespace in test mode.
- Integrate with the SDK or REST API.
- Review cached responses and prompt variants in the dashboard.
- Switch the namespace to live when the cache behavior looks trustworthy.
For shared concepts like namespaces, similarity matching, validation, prompt variants, TTLs, and dashboard analytics, read How PromptCacheAI Works.