Providers that cache a repeated prompt prefix report cached tokens in usage, and RedPill bills them at the model’s cache rate.
Prompt caching happens at the provider and needs nothing in the request. When a provider serves
part of a prompt from its cache, the response reports it in usage, and the cached tokens are billed
at pricing.input_cache_read when the model lists one, otherwise at the normal prompt rate.
To benefit, keep the stable part of a prompt, such as the system message and reference material,
at the start, and vary only the end. OpenAI models cache prefixes of 1,024 tokens or more on
repeated requests. Which models expose a cache rate is visible in the catalog: look for
input_cache_read in pricing.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"RedPill AI","colors":{"primary":"#c96442","light":"#d97757","dark":"#b0512f"},"logo":{"light":"https://mintcdn.com/phala-47f19b07/5vRaVvmX8pi5Nukr/logo/light.svg?fit=max\u0026auto=format\u0026n=5vRaVvmX8pi5Nukr\u0026q=85\u0026s=03f8dbe12d0f593a956cccba7b18115f","dark":"https://mintcdn.com/phala-47f19b07/5vRaVvmX8pi5Nukr/logo/dark.svg?fit=max\u0026auto=format\u0026n=5vRaVvmX8pi5Nukr\u0026q=85\u0026s=dd49c6b52615b7312317e2fc353ac289"},"favicon":"https://mintcdn.com/phala-47f19b07/jUpTfTWRxXYc1F5K/favicon.svg?fit=max\u0026auto=format\u0026n=jUpTfTWRxXYc1F5K\u0026q=85\u0026s=1ac7304fa03ccc515bee40d9694e75e2","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://api.redpill.ai/v1"}},"navbar":{"links":[{"href":"https://www.redpill.ai/dashboard","label":"Dashboard"}],"primary":{"type":"button","label":"Start building","href":"https://redpill.ai/start-building"}},"footer":{"socials":{"twitter":"https://twitter.com/redpill_ai","github":"https://github.com/redpill-ai","discord":"https://discord.gg/P2ukR4Z5ps"}},"fonts":{"heading":{"family":"Poppins","weight":600},"body":{"family":"Inter","weight":400}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":false},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/P2ukR4Z5ps"},{"anchor":"GitHub","icon":"github","href":"https://github.com/redpill-ai"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"phala-47f19b07","hasAudioNarration":false,"actualSubdomain":"phala-47f19b07","customDomains":["docs.redpill.ai"],"gitSource":{"type":"github","owner":"redpill-ai","repo":"redpill-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aeadca45adfacbbaf537b77","collectionId":"9eb481cb-d39b-4c33-96ba-258251700e65","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aeadca45adfacbbaf537b77"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{},"buildId":"6aeaec39197840cd827e97ba","clientVersion":"0.0.4054","searchFilterCounts":[{"language":"default","tag":"Documentation","count":49},{"language":"default","tag":"API Reference","count":11},{"language":"default","tag":"Use in agents","count":9},{"language":"default","tag":"Endpoints","count":8},{"language":"default","tag":"Build with the API","count":8},{"language":"default","tag":"Get started","count":7},{"language":"default","tag":"Features","count":7},{"language":"default","tag":"How it works","count":6},{"language":"default","tag":"Verify and control","count":6},{"language":"default","tag":"Providers and trust","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"styles.css","content":"h1,h2,h3,h4,h5,h6{font-family:\"Poppins\",sans-serif}"}],"page":{"pagePath":"guides/prompt-caching","slug":"/guides/prompt-caching","pageMetadata":{"title":"Prompt caching","description":"Providers that cache a repeated prompt prefix report cached tokens in usage, and RedPill bills them at the model's cache rate.","href":"/guides/prompt-caching"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Providers that cache a repeated prompt prefix report cached tokens in usage, and RedPill bills them at the model’s cache rate.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Heading}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Prompt caching happens at the provider and needs nothing in the request. When a provider serves\npart of a prompt from its cache, the response reports it in `,_jsx(_components.code,{children:`usage`}),`, and the cached tokens are billed\nat `,_jsx(_components.code,{children:`pricing.input_cache_read`}),` when the model lists one, otherwise at the normal prompt rate.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1905`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt_tokens_details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"cached_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1792`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"completion_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`64`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`To benefit, keep the stable part of a prompt, such as the system message and reference material,\nat the start, and vary only the end. OpenAI models cache prefixes of 1,024 tokens or more on\nrepeated requests. Which models expose a cache rate is visible in the catalog: look for\n`,_jsx(_components.code,{children:`input_cache_read`}),` in `,_jsx(_components.code,{children:`pricing`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`related`,children:`Related`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Billing`,icon:`credit-card`,href:`/get-started/billing`}),_jsx(Card,{title:`Models`,icon:`layer-group`,href:`/api-reference/models`})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Prompt caching","description":"Providers that cache a repeated prompt prefix report cached tokens in usage, and RedPill bills them at the model's cache rate.","href":"/guides/prompt-caching"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Related","slug":"related","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"phala-47f19b07","siteName":"RedPill AI","title":"Prompt caching - RedPill AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-20T00:31:31.024Z","originalFileLocation":"guides/prompt-caching.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Providers that cache a repeated prompt prefix report cached tokens in usage, and RedPill bills them at the model\u0026#x27;s cache rate.\">\u003cmeta data-mint-head name=\"application-name\" content=\"RedPill AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/phala-47f19b07/Y9aC6lrEn-iBCXi1/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/phala-47f19b07/Y9aC6lrEn-iBCXi1/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/phala-47f19b07/Y9aC6lrEn-iBCXi1/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/phala-47f19b07/Y9aC6lrEn-iBCXi1/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/phala-47f19b07/Y9aC6lrEn-iBCXi1/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/phala-47f19b07/Y9aC6lrEn-iBCXi1/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/phala-47f19b07/Y9aC6lrEn-iBCXi1/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/phala-47f19b07/Y9aC6lrEn-iBCXi1/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/phala-47f19b07/Y9aC6lrEn-iBCXi1/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Prompt caching - RedPill AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Providers that cache a repeated prompt prefix report cached tokens in usage, and RedPill bills them at the model\u0026#x27;s cache rate.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"RedPill AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.redpill.ai/guides/prompt-caching\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://phala-47f19b07.mintlify.app/_mintlify/api/og/v2?division=Features\u0026amp;title=Prompt+caching\u0026amp;description=Providers+that+cache+a+repeated+prompt+prefix+report+cached+tokens+in+usage%2C+and+RedPill+bills+them+at+the+model%27s+cache+rate.\u0026amp;theme=42df2522bd3507e897bd01fe\u0026amp;signature=03a468b718614e581bae4856795929154e5b81a8fa50207335c01097d34e24d5\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Prompt caching - RedPill AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Providers that cache a repeated prompt prefix report cached tokens in usage, and RedPill bills them at the model\u0026#x27;s cache rate.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://phala-47f19b07.mintlify.app/_mintlify/api/og/v2?division=Features\u0026amp;title=Prompt+caching\u0026amp;description=Providers+that+cache+a+repeated+prompt+prefix+report+cached+tokens+in+usage%2C+and+RedPill+bills+them+at+the+model%27s+cache+rate.\u0026amp;theme=42df2522bd3507e897bd01fe\u0026amp;signature=03a468b718614e581bae4856795929154e5b81a8fa50207335c01097d34e24d5\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/phala-47f19b07/Y9aC6lrEn-iBCXi1/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"RedPill AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#c96442\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.redpill.ai/guides/prompt-caching\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/prompt-caching.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.redpill.ai/#organization\",\"name\":\"RedPill AI\",\"url\":\"https://docs.redpill.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/phala-47f19b07/5vRaVvmX8pi5Nukr/logo/light.svg?fit=max\u0026auto=format\u0026n=5vRaVvmX8pi5Nukr\u0026q=85\u0026s=03f8dbe12d0f593a956cccba7b18115f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.redpill.ai#website\",\"name\":\"RedPill AI\",\"url\":\"https://docs.redpill.ai\",\"publisher\":{\"@id\":\"https://docs.redpill.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.redpill.ai/guides/prompt-caching#webpage\",\"url\":\"https://docs.redpill.ai/guides/prompt-caching\",\"name\":\"Prompt caching\",\"description\":\"Providers that cache a repeated prompt prefix report cached tokens in usage, and RedPill bills them at the model's cache rate.\",\"dateModified\":\"2026-09-20T00:31:31.024Z\",\"isPartOf\":{\"@id\":\"https://docs.redpill.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.redpill.ai/guides/prompt-caching#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.redpill.ai/guides/prompt-caching#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Features\",\"item\":\"https://docs.redpill.ai/guides/streaming\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Prompt caching\",\"item\":\"https://docs.redpill.ai/guides/prompt-caching\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.redpill.ai/guides/prompt-caching#article\",\"headline\":\"Prompt caching\",\"name\":\"Prompt caching\",\"description\":\"Providers that cache a repeated prompt prefix report cached tokens in usage, and RedPill bills them at the model's cache rate.\",\"url\":\"https://docs.redpill.ai/guides/prompt-caching\",\"mainEntityOfPage\":{\"@id\":\"https://docs.redpill.ai/guides/prompt-caching#webpage\"},\"dateModified\":\"2026-09-20T00:31:31.024Z\",\"publisher\":{\"@id\":\"https://docs.redpill.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.redpill.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"RedPill AI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"RedPill AI","nav":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/P2ukR4Z5ps"},{"anchor":"GitHub","icon":"github","href":"https://github.com/redpill-ai"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Get started","pages":[{"title":"Get started with RedPill","sidebarTitle":"Introduction","href":"/get-started/introduction"},{"title":"Quickstart","href":"/get-started/quickstart"},{"title":"Models","href":"/get-started/models"},{"title":"Billing","href":"/get-started/billing"},{"title":"Rate limits","href":"/get-started/rate-limits"},{"title":"Account MCP","sidebarTitle":"MCP","href":"/get-started/mcp"},{"title":"RedPill CLI","sidebarTitle":"CLI","href":"/get-started/cli"}]},{"group":"Use in agents","pages":[{"title":"Use in agents","sidebarTitle":"Overview","href":"/get-started/use-in-agents"},{"title":"Private AI Proxy","href":"/get-started/private-ai-proxy"},{"title":"Claude Code","href":"/guides/integrations/coding-tools/claude-code"},{"title":"Codex CLI","href":"/guides/integrations/coding-tools/codex-cli"},{"title":"Pi","href":"/guides/integrations/coding-tools/pi"},{"title":"OpenCode","href":"/guides/integrations/coding-tools/opencode"},{"title":"Cline","href":"/guides/integrations/coding-tools/cline"},{"title":"OpenClaw","href":"/guides/integrations/runtimes/openclaw"},{"title":"Hermes","href":"/guides/integrations/runtimes/hermes"}]},{"group":"Build with the API","pages":[{"title":"OpenAI SDK","href":"/guides/integrations/openai-sdk"},{"title":"Anthropic SDK","href":"/guides/integrations/anthropic-sdk"},{"title":"Vercel AI SDK","href":"/guides/integrations/vercel-ai-sdk"},{"title":"LangChain","href":"/guides/integrations/langchain"},{"title":"Agent frameworks","href":"/guides/integrations/agent-frameworks"},{"title":"Langfuse","href":"/guides/integrations/langfuse"},{"title":"Cherry Studio","href":"/guides/integrations/cherry-studio"},{"title":"Migrate from OpenAI or OpenRouter","href":"/guides/migrate"}]},{"group":"Features","pages":[{"title":"Streaming","href":"/guides/streaming"},{"title":"Function calling","href":"/guides/function-calling"},{"title":"Structured outputs","href":"/guides/structured-outputs"},{"title":"Vision","href":"/guides/vision"},{"title":"Reasoning","description":"Control how much a model thinks before it answers, and whether the reasoning text is returned.","href":"/guides/reasoning"},{"title":"Prompt caching","href":"/guides/prompt-caching"},{"title":"Error handling","description":"Understand the API error format and handle errors gracefully.","href":"/guides/error-handling"}]},{"group":"How it works","pages":[{"title":"How confidential AI works","href":"/confidential-ai/how-it-works"},{"title":"Attestation report","href":"/confidential-ai/attestation-report"},{"title":"Receipts","href":"/confidential-ai/receipts"},{"title":"Verified upstreams","href":"/confidential-ai/verified-upstreams"},{"title":"End-to-end encryption","href":"/confidential-ai/e2e-encryption"},{"title":"Trust boundary","href":"/confidential-ai/trust-boundary"}]},{"group":"Verify and control","pages":[{"title":"Verify a response","href":"/guides/verify-a-response"},{"title":"Release measurements","href":"/guides/release-measurements"},{"title":"Encrypt a request","href":"/guides/e2ee-encryption"},{"title":"Zero data retention","href":"/guides/zero-data-retention"},{"title":"Attested routing","href":"/guides/attested-routing"},{"title":"TEE-only endpoint","href":"/guides/tee-endpoint"}]},{"group":"Providers and trust","pages":[{"title":"Confidential providers","href":"/confidential-ai/providers"},{"title":"Open source","href":"/confidential-ai/open-source"},{"title":"Compliance","href":"/confidential-ai/compliance"},{"title":"FAQ","href":"/confidential-ai/faqs"}]},{"group":"RedPill Chat","pages":[{"title":"Overview","href":"/chat/overview"},{"title":"Private knowledge","href":"/chat/private-knowledge"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Prompt caching - RedPill AI","buildId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","deploymentId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","dynamics":[],"chunks":[]}