<!DOCTYPE html><html lang="en" class="inter_1d81deff-module__CYM0aG__variable papermono_89c757f2-module__6aS5zq__variable dark" data-banner-state="visible" data-assistant-state="closed" data-page-mode="none" data-current-path="/"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/><link rel="preload" href="/docs/_next/static/media/83afe278b6a6bb3c.p.3a6ba036.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/docs/_next/static/media/PaperMono_Variable.p.aa32f7a0.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/docs/_next/static/media/f67ad414ed34149c.p.84166d94.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" as="image" href="https://mintcdn.com/openrouter-d02e98a0/ksNSeB_K7gD-BUDh/assets/logo-v2-light.svg?fit=max&amp;auto=format&amp;n=ksNSeB_K7gD-BUDh&amp;q=85&amp;s=690e45873843519efe02bcbe45795dac"/><link rel="preload" as="image" href="https://mintcdn.com/openrouter-d02e98a0/ksNSeB_K7gD-BUDh/assets/logo-v2-dark.svg?fit=max&amp;auto=format&amp;n=ksNSeB_K7gD-BUDh&amp;q=85&amp;s=8ba2f49b11cd9839c37dd03c62537ebd"/><link rel="stylesheet" href="/docs/_next/static/chunks/462bacc63bed9960.css?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" data-precedence="next"/><link rel="stylesheet" href="/docs/_next/static/chunks/130071cec1814339.css?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" data-precedence="next"/><style data-precedence="base-ui:low" data-href="base-ui-disable-scrollbar">.base-ui-disable-scrollbar{scrollbar-width:none}.base-ui-disable-scrollbar::-webkit-scrollbar{display:none}</style><link rel="preload" as="script" fetchPriority="low" href="/docs/_next/static/chunks/6d55b684068fd47e.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK"/><script src="/docs/_next/static/chunks/44795504c795ca32.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/8470141258a8cdc3.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/f486afc314643ce1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/6ab2b57d39308a6c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/turbopack-2e914d270b534a41.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/27af74e29bec69c2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/e168288d4907c254.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/6b1866b1722b1057.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><script src="/docs/_next/static/chunks/746594ec3bf27705.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-R8YZRJS2XN" as="script"/><link rel="preload" href="/docs/_next/static/chunks/4d8374b1f183ef74.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" as="script" fetchPriority="low"/><link rel="preload" href="/docs/_next/static/chunks/3aa704238c912684.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" as="script" fetchPriority="low"/><link rel="preconnect" href="https://fonts.googleapis.com"/><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/><link rel="preconnect" href="https://fonts.googleapis.com"/><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/><link rel="preload" href="https://d4tuoctqmanu0.cloudfront.net/katex.min.css" as="style"/><title>OAuth PKCE - Secure User Authentication</title><meta name="description" content="Connect your users to OpenRouter"/><meta name="application-name" content="OpenRouter | Documentation"/><meta name="generator" content="Mintlify"/><meta name="msapplication-config" content="/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/browserconfig.xml"/><meta name="apple-mobile-web-app-title" content="OpenRouter | Documentation"/><meta name="msapplication-TileColor" content="#7624F4"/><link rel="canonical" href="https://openrouter.ai/docs/guides/overview/auth/oauth"/><link rel="alternate" type="application/xml" href="/docs/sitemap.xml"/><link rel="alternate" type="text/markdown" href="/docs/guides/overview/auth/oauth.md"/><meta property="og:title" content="OAuth PKCE - Secure User Authentication"/><meta property="og:description" content="Implement secure user authentication with OpenRouter using OAuth PKCE. Complete guide to setting up and managing OAuth authentication flows."/><meta property="og:url" content="https://openrouter.ai/docs/guides/overview/auth/oauth"/><meta property="og:site_name" content="OpenRouter Documentation"/><meta property="og:image" content="https://openrouter.ai/dynamic-og?pathname=use-cases/oauth-pkce&amp;title=OAuth%20PKCE&amp;description=Secure%20one-click%20authentication%20for%20your%20OpenRouter%20users"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="OAuth PKCE - Secure User Authentication"/><meta name="twitter:description" content="Implement secure user authentication with OpenRouter using OAuth PKCE. Complete guide to setting up and managing OAuth authentication flows."/><meta name="twitter:image" content="https://openrouter.ai/dynamic-og?pathname=use-cases/oauth-pkce&amp;title=OAuth%20PKCE&amp;description=Secure%20one-click%20authentication%20for%20your%20OpenRouter%20users"/><meta name="twitter:image:width" content="1200"/><meta name="twitter:image:height" content="630"/><link rel="icon" href="/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/android-chrome-192x192.png" type="image/png" sizes="192x192" media="(prefers-color-scheme: light)"/><link rel="apple-touch-icon" href="/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/apple-touch-icon.png" type="image/png" sizes="180x180"/><link rel="icon" href="/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/favicon-16x16.png" type="image/png" sizes="16x16" media="(prefers-color-scheme: light)"/><link rel="icon" href="/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/favicon-32x32.png" type="image/png" sizes="32x32" media="(prefers-color-scheme: light)"/><link rel="shortcut icon" href="/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/favicon.ico" type="image/x-icon" media="(prefers-color-scheme: light)"/><link rel="icon" href="/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon-dark/android-chrome-192x192.png" type="image/png" sizes="192x192" media="(prefers-color-scheme: dark)"/><link rel="icon" href="/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon-dark/favicon-16x16.png" type="image/png" sizes="16x16" media="(prefers-color-scheme: dark)"/><link rel="icon" href="/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon-dark/favicon-32x32.png" type="image/png" sizes="32x32" media="(prefers-color-scheme: dark)"/><link rel="shortcut icon" href="/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon-dark/favicon.ico" type="image/x-icon" media="(prefers-color-scheme: dark)"/><script type="text/javascript">!function(){var b="/docs";
function a(p){if(p==null)return"/";p=""+p;if(""===p)return"/";return"/"===p.charAt(0)?p:"/"+p}
function u(p){if(p==null)return p;p=""+p;if(!p||p.charAt(p.length-1)==="/")return p.slice(0,-1);return p}
function i(p){if(p==null)return p;p=""+p;if(6<=p.length&&p.substring(p.length-6)==="/index")return p.substring(0,p.length-6);if("index"===p)return"";return p}
var p=(location.pathname||"").split("?")[0].split("#")[0]||"";
if(b)if(p===b)p="";else if(0===p.indexOf(b+"/"))p=p.substring(b.length);
p=a(p);p=u(p);p=i(p);p=""===p||"index"===p?"/":a(p);
document.documentElement.setAttribute("data-current-path",p);
}();</script><script type="text/javascript">!function(){
function read(){try{
var e=performance.getEntriesByType?performance.getEntriesByType("navigation"):[];
var st=(e[0]&&e[0].serverTiming)||[];
var g={};
for(var i=0;i<st.length;i++){var n=st[i].name,d=st[i].description;if(!d)continue;try{d=decodeURIComponent(d)}catch(x){}
if(n==="country")g.country=d;else if(n==="region")g.region=d;else if(n==="continent")g.continent=d;}
var w=window;w.mintlify=w.mintlify||{};w.mintlify.geo=g;
}catch(x){}}
read();document.addEventListener("DOMContentLoaded",read);
}();</script><script type="text/javascript">!function(){try{
var w=window;w.mintlify=w.mintlify||{};
var q=w.mintlify.__apiPlaygroundInputsQueue;
if(!Array.isArray(q)){q=[];w.mintlify.__apiPlaygroundInputsQueue=q;}
w.mintlify.api=w.mintlify.api||{};
w.mintlify.api.playground=w.mintlify.api.playground||{};
if(typeof w.mintlify.api.playground.setServerVariables!=="function"){
w.mintlify.api.playground.setServerVariables=function(v){q.push({type:"set",variables:v});};
}
if(typeof w.mintlify.api.playground.clearServerVariables!=="function"){
w.mintlify.api.playground.clearServerVariables=function(){q.push({type:"clear"});};
}
}catch(e){}}();</script><script type="text/javascript">(function(a,b){try{let c=document.getElementById("banner")?.innerText;if(c){for(let d=0;d<localStorage.length;d++){let e=localStorage.key(d);if(e?.endsWith(a)&&localStorage.getItem(e)===c)return void document.documentElement.setAttribute(b,"hidden")}document.documentElement.setAttribute(b,"visible");return}for(let c=0;c<localStorage.length;c++){let d=localStorage.key(c);if(d?.endsWith(a)&&localStorage.getItem(d))return void document.documentElement.setAttribute(b,"hidden")}document.documentElement.setAttribute(b,"visible")}catch(a){document.documentElement.setAttribute(b,"hidden")}})(
  "bannerDismissed",
  "data-banner-state",
)</script><script src="/docs/_next/static/chunks/a6dad97d9634a72d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" noModule=""></script></head><body class="antialiased"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","isDarkMode","dark",null,["dark","light","true","false","system"],{"true":"dark","false":"light","dark":"dark","light":"light"},true,false)</script><script>(function(){try{var f=null;var v=f||localStorage.getItem("isDarkMode");if(v==='true')v='dark';else if(v==='false')v='light';if(v!=='light'&&v!=='dark'&&v!=='system')v="dark";document.documentElement.setAttribute("data-theme-preference",v)}catch(e){}})();</script><blockquote class="sr-only" data-agent-docs-index="true" aria-hidden="true"><h2>Documentation Index</h2><p>Fetch the complete documentation index at:<!-- --> <a href="/docs/llms.txt" tabindex="-1">/docs/llms.txt</a></p><p>Use this file to discover all available pages before exploring further.</p></blockquote><style>:root{--banner-height:0px!important}</style><script>(self.__next_s=self.__next_s||[]).push([0,{"children":"(function j(a,b,c,d,e){try{let f,g,h=[];try{h=window.location.pathname.split(\"/\").filter(a=\u003e\"\"!==a\u0026\u0026\"global\"!==a).slice(0,2)}catch{h=[]}let i=h.find(a=\u003ec.includes(a)),j=[];for(let c of(i?j.push(i):j.push(b),j.push(\"global\"),j)){if(!c)continue;let b=a[c];if(b?.content){f=b.content,g=c;break}}if(!f)return void document.documentElement.setAttribute(d,\"hidden\");let k=!0,l=0;for(;l\u003clocalStorage.length;){let a=localStorage.key(l);if(l++,!a?.endsWith(e))continue;let b=localStorage.getItem(a);if(b\u0026\u0026b===f){k=!1;break}g\u0026\u0026(a.startsWith(`lang:${g}_`)||!a.startsWith(\"lang:\"))\u0026\u0026(localStorage.removeItem(a),l--)}document.documentElement.setAttribute(d,k?\"visible\":\"hidden\")}catch(a){console.error(a),document.documentElement.setAttribute(d,\"hidden\")}})(\n  {},\n  \"en\",\n  [],\n  \"data-banner-state\",\n  \"bannerDismissed\",\n)","id":"_mintlify-banner-script"}])</script><link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;1,400&amp;display=swap" rel="stylesheet"/><link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;1,400&amp;display=swap" rel="stylesheet"/><style>:root {
  --font-family-headings-custom: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-weight-headings-custom: 400;
  --font-family-body-custom: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-weight-body-custom: 400;
  
}
</style><style>:root {
    --primary: 118 36 244;
    --primary-light: 118 36 244;
    --primary-dark: 200 255 0;
    --tooltip-foreground: 0 0 0;
    --background-light: 252 252 254;
    --background-dark: 3 8 10;
    --gray-50: 246 243 250;
    --gray-100: 241 239 245;
    --gray-200: 226 223 229;
    --gray-300: 209 207 213;
    --gray-400: 162 159 165;
    --gray-500: 115 113 119;
    --gray-600: 83 81 87;
    --gray-700: 66 63 70;
    --gray-800: 40 38 44;
    --gray-900: 26 23 30;
    --gray-950: 13 11 17;
  }</style><script type="text/javascript">
          (function() {
            function loadKatex() {
              const link = document.querySelector('link[href="https://d4tuoctqmanu0.cloudfront.net/katex.min.css"]');
              if (link) link.rel = 'stylesheet';
            }
            if (document.readyState === 'loading') {
              document.addEventListener('DOMContentLoaded', loadKatex);
            } else {
              loadKatex();
            }
          })();
        </script><div class="relative antialiased text-gray-500 dark:text-gray-400 [[&amp;_:is(h1,h2,h3,h4,h5,h6)]:font-headingsWeight [&amp;_*:not(h1,h2,h3,h4,h5,h6,h1_*,h2_*,h3_*,h4_*,h5_*,h6_*)]:font-bodyWeight"><script>(self.__next_s=self.__next_s||[]).push([0,{"suppressHydrationWarning":true,"children":"(function(a){let b,c=(b=\"navbar-transition\",\"maple\"===a\u0026\u0026(b+=\"-maple\"),b),d=function(){let a=document.createElement(\"style\");return a.appendChild(document.createTextNode(\"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\")),document.head.appendChild(a),function(){window.getComputedStyle(document.body),setTimeout(()=\u003e{document.head.removeChild(a)},1)}}();(\"requestAnimationFrame\"in globalThis?requestAnimationFrame:setTimeout)(()=\u003e{let a;a=!1,a=window.scrollY\u003e50,document.getElementById(c)?.setAttribute(\"data-is-opaque\",`${!!a}`),d()})})(\"mint\")","id":"_mintlify-navbar-transition-script"}])</script><script>(self.__next_s=self.__next_s||[]).push([0,{"suppressHydrationWarning":true,"children":"(function () {\n  var measure = function(){let a=document.querySelectorAll(\"[id='navbar'], [data-top-chrome]\"),b=0;a.forEach(a=\u003e{let c=a.getBoundingClientRect();c.height\u003e0\u0026\u0026(b=Math.max(b,c.bottom))});let c=0,d=document.getElementById(\"content-container\");if(d){let{overflowY:a}=getComputedStyle(d);(\"auto\"===a||\"scroll\"===a)\u0026\u0026(c=Math.max(0,d.getBoundingClientRect().top))}let e=`${Math.round(Math.max(0,b-c))+40}px`,f=document.documentElement.style;f.getPropertyValue(\"--scroll-mt\")!==e\u0026\u0026f.setProperty(\"--scroll-mt\",e)};\n  (function(a){let b=[],c=0,d=\"undefined\"==typeof ResizeObserver?null:new ResizeObserver(f);function e(){let c=Array.from(document.querySelectorAll(\"[id='navbar'], [data-top-chrome]\"));(c.length!==b.length||c.some((a,c)=\u003ea!==b[c]))\u0026\u0026d\u0026\u0026(d.disconnect(),c.forEach(a=\u003ed.observe(a))),b=c,a()}function f(){c||(c=requestAnimationFrame(()=\u003e{c=0,e()}))}let g=\"[id='navbar'], [data-top-chrome]\";function h(a){let b=a.target;if(b instanceof Element\u0026\u0026b.closest(g))return!0;for(let b of a.addedNodes)if(b instanceof Element\u0026\u0026(b.matches(g)||b.querySelector(g)))return!0;for(let b of a.removedNodes)if(b instanceof Element\u0026\u0026(b.matches(g)||b.querySelector(g)))return!0;return!1}new MutationObserver(a=\u003e{a.some(h)\u0026\u0026f()}).observe(document.documentElement,{childList:!0,subtree:!0}),window.addEventListener(\"resize\",f),\"loading\"===document.readyState\u0026\u0026document.addEventListener(\"DOMContentLoaded\",e),e()})(measure);\n  (function(a){let b=window.location.hash.slice(1);if(!b)return;function c(){return\"smooth\"===getComputedStyle(document.documentElement).scrollBehavior}function d(c){let d=document.getElementById(b);return!!d\u0026\u0026(a(),d.scrollIntoView(c?{behavior:c}:void 0),!0)}if(\"complete\"===document.readyState)return void d();let e=new MutationObserver(()=\u003e{!c()\u0026\u0026d(\"instant\")\u0026\u0026f()});function f(){e.disconnect(),window.removeEventListener(\"load\",g)}function g(){let a=c();f(),a\u0026\u0026requestAnimationFrame(()=\u003e{d(),function(){let a=[\"wheel\",\"touchstart\",\"keydown\",\"pointerdown\"],c=0,e=window.scrollY,f=setInterval(()=\u003e{c+=1;let a=document.getElementById(b);if(!a||c\u003e=6)return g();let f=Math.abs(window.scrollY-e)\u003e1;if(e=window.scrollY,f)return;let h=parseFloat(getComputedStyle(a).scrollMarginTop)||0;Math.abs(a.getBoundingClientRect().top-h)\u003e4\u0026\u0026d()},350);function g(){clearInterval(f),a.forEach(a=\u003ewindow.removeEventListener(a,g))}a.forEach(a=\u003ewindow.addEventListener(a,g,{passive:!0}))}()})}window.addEventListener(\"load\",g),e.observe(document.documentElement,{childList:!0,subtree:!0}),!c()\u0026\u0026d(\"instant\")\u0026\u0026f()})(measure);\n})();","id":"_mintlify-scroll-margin-script"}])</script><a href="#content-area" class="sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-50 focus:p-2 focus:text-sm focus:bg-background-light dark:focus:bg-background-dark focus:rounded-md focus:outline-primary dark:focus:outline-primary-light">Skip to main content</a><script>(function i(a,b,c,d){try{if(window.matchMedia("(max-width: 1024px)").matches||!d){document.documentElement.style.setProperty(c,"0px"),document.documentElement.setAttribute("data-assistant-state","closed"),d||localStorage.setItem(a,"false");return}let e=localStorage.getItem(a);if(null===e){document.documentElement.style.setProperty(c,"0px"),document.documentElement.setAttribute("data-assistant-state","closed");return}let f=JSON.parse(e),g=localStorage.getItem(b),h=null!==g?JSON.parse(g):368;document.documentElement.style.setProperty(c,f?h+"px":"0px"),document.documentElement.setAttribute("data-assistant-state",f?"open":"closed")}catch(a){document.documentElement.style.setProperty(c,"0px"),document.documentElement.setAttribute("data-assistant-state","closed")}})(
    "chat-assistant-sheet-open",
    "chat-assistant-sheet-width",
    "--assistant-sheet-width",
    true
  )</script><div class="max-lg:contents lg:flex lg:w-full" data-docs-theme="mint"><div class="max-lg:contents lg:flex-1 lg:min-w-0 lg:overflow-x-clip"><header id="navbar" class="z-30 fixed lg:sticky top-0 w-full peer is-not-custom peer is-not-center peer is-not-wide peer is-not-frame"><div id="navbar-transition" class="absolute w-full h-full flex-none transition-colors duration-500 border-b border-gray-500/5 dark:border-gray-300/[0.06] bg-background-light dark:bg-background-dark" data-is-opaque="false"></div><div class="max-w-8xl mx-auto relative"><div><div class="relative"><div class="flex items-center lg:px-12 h-16 min-w-0 mx-4 lg:mx-0"><div class="h-full relative flex-1 flex items-center gap-x-4 min-w-0 border-b border-gray-500/5 dark:border-gray-300/[0.06]"><div class="flex-1 flex items-center gap-x-4"><a class="select-none" style="-webkit-touch-callout:none" href="https://openrouter.ai"><span class="sr-only">OpenRouter | Documentation<!-- --> home page</span><img class="nav-logo w-auto h-7 relative object-contain shrink-0 block dark:hidden" src="https://mintcdn.com/openrouter-d02e98a0/ksNSeB_K7gD-BUDh/assets/logo-v2-light.svg?fit=max&amp;auto=format&amp;n=ksNSeB_K7gD-BUDh&amp;q=85&amp;s=690e45873843519efe02bcbe45795dac" alt="light logo"/><img class="nav-logo w-auto h-7 relative object-contain shrink-0 hidden dark:block" src="https://mintcdn.com/openrouter-d02e98a0/ksNSeB_K7gD-BUDh/assets/logo-v2-dark.svg?fit=max&amp;auto=format&amp;n=ksNSeB_K7gD-BUDh&amp;q=85&amp;s=8ba2f49b11cd9839c37dd03c62537ebd" alt="dark logo"/></a><div class="hidden lg:flex items-center gap-x-2"></div></div><div class="relative hidden lg:flex items-center flex-1 z-20 gap-2.5"><button type="button" class="group/search flex pointer-events-auto rounded-xl w-full items-center text-sm leading-6 h-9 pl-3.5 pr-3 text-gray-500 dark:text-white/50 bg-background-light dark:bg-background-dark dark:brightness-[1.1] dark:ring-1 dark:hover:brightness-[1.25] ring-1 ring-gray-400/30 hover:ring-gray-600/30 dark:ring-gray-600/30 dark:hover:ring-gray-500/30 justify-between truncate gap-2" id="search-bar-entry" aria-label="Open search"><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-4 min-w-4 flex-none text-gray-700 group-hover/search:text-gray-800 dark:text-gray-400 dark:group-hover/search:text-gray-200"><path d="M15.25 15.25L11.285 11.285" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M7.75 12.75C10.5114 12.75 12.75 10.5114 12.75 7.75C12.75 4.98858 10.5114 2.75 7.75 2.75C4.98858 2.75 2.75 4.98858 2.75 7.75C2.75 10.5114 4.98858 12.75 7.75 12.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><div class="truncate min-w-0">Search...</div></div><span class="flex-none text-xs font-semibold">⌘<!-- -->K</span></button><button type="button" class="group/ai flex-none hidden lg:flex items-center justify-center gap-1.5 pl-3 pr-3.5 h-9 rounded-xl bg-background-light dark:bg-background-dark dark:brightness-[1.1] dark:ring-1 dark:hover:brightness-[1.25] ring-1 ring-gray-400/30 hover:ring-gray-600/30 dark:ring-gray-600/30 dark:hover:ring-gray-500/30" id="assistant-entry" aria-label="Toggle assistant panel" data-base-ui-tooltip-trigger=""><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-4 shrink-0 text-gray-700 group-hover/ai:text-gray-800 dark:text-gray-400 dark:group-hover/ai:text-gray-200"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><span class="text-sm text-gray-500 dark:text-white/50 whitespace-nowrap">Ask Assistant</span></button></div><div class="flex-1 relative hidden lg:flex items-center ml-auto justify-end space-x-4"><nav aria-label="Main" class="text-sm"><ul class="flex space-x-6 items-center"><li class="navbar-link"><a href="https://openrouter.ai/models" class="flex items-center gap-1.5 whitespace-nowrap font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" target="_blank" rel="noopener noreferrer"><span class="min-w-0 truncate">Models</span></a></li><li class="navbar-link"><a href="https://openrouter.ai/benchmarks" class="flex items-center gap-1.5 whitespace-nowrap font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" target="_blank" rel="noopener noreferrer"><span class="min-w-0 truncate">Benchmarks</span></a></li><li class="navbar-link"><a href="https://openrouter.ai/chat" class="flex items-center gap-1.5 whitespace-nowrap font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" target="_blank" rel="noopener noreferrer"><span class="min-w-0 truncate">Chat</span></a></li><li class="navbar-link"><a href="https://openrouter.ai/rankings" class="flex items-center gap-1.5 whitespace-nowrap font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" target="_blank" rel="noopener noreferrer"><span class="min-w-0 truncate">Rankings</span></a></li><li class="navbar-link"><a href="https://openrouter.ai/apps" class="flex items-center gap-1.5 whitespace-nowrap font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" target="_blank" rel="noopener noreferrer"><span class="min-w-0 truncate">Apps</span></a></li><li class="navbar-link"><a href="https://openrouter.ai/docs" class="flex items-center gap-1.5 whitespace-nowrap font-medium text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" target="_blank" rel="noopener noreferrer"><span class="min-w-0 truncate">Docs</span></a></li></ul></nav><div class="flex items-center"><button type="button" tabindex="0" aria-haspopup="menu" id="theme-preference-menu-trigger" aria-label="Change theme preference" data-component-name="theme-preference-menu" data-component-part="theme-preference-menu-trigger" data-testid="theme-preference-menu-trigger" class="group disabled:pointer-events-none rounded-lg overflow-hidden gap-1 text-sm text-gray-950/50 dark:text-white/50 group-hover:text-gray-950/70 dark:group-hover:text-white/70 theme-preference-menu-trigger group p-2 flex items-center justify-center"><span data-theme-preference-icon="system"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="size-4 text-gray-500 dark:text-gray-400 group-hover:text-gray-700 dark:group-hover:text-gray-200"><path d="M4.5 15.5L9 14.5L13.5 15.5" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.75V14.5" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M14.25 2.75H3.75C2.64543 2.75 1.75 3.64543 1.75 4.75V9.75C1.75 10.8546 2.64543 11.75 3.75 11.75H14.25C15.3546 11.75 16.25 10.8546 16.25 9.75V4.75C16.25 3.64543 15.3546 2.75 14.25 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></span><span data-theme-preference-icon="light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="size-4 text-gray-500 dark:text-gray-400 group-hover:text-gray-700 dark:group-hover:text-gray-200"><path d="M9 1.25V2.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M14.48 3.52002L13.773 4.22702" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M16.75 9H15.75" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M14.48 14.4799L13.773 13.7729" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 16.75V15.75" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M3.52 14.4799L4.227 13.7729" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M1.25 9H2.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M3.52 3.52002L4.227 4.22702" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 13.25C11.3472 13.25 13.25 11.3472 13.25 9C13.25 6.65279 11.3472 4.75 9 4.75C6.65279 4.75 4.75 6.65279 4.75 9C4.75 11.3472 6.65279 13.25 9 13.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></span><span data-theme-preference-icon="dark"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="size-4 text-gray-500 dark:text-gray-400 group-hover:text-gray-700 dark:group-hover:text-gray-200"><path d="M13 11.75C9.548 11.75 6.75 8.95201 6.75 5.50001C6.75 4.14801 7.183 2.90101 7.912 1.87801C4.548 2.50601 2 5.45301 2 9.00001C2 13.004 5.246 16.25 9.25 16.25C12.622 16.25 15.448 13.944 16.259 10.826C15.309 11.409 14.196 11.75 13 11.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></span></button></div></div><div class="flex lg:hidden items-center gap-3"><button type="button" class="text-gray-500 w-8 h-8 flex items-center justify-center hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300" id="search-bar-entry-mobile" aria-label="Open search"><span class="sr-only">Search...</span><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! h-4 w-4 bg-gray-500 dark:bg-gray-400 hover:bg-gray-600 dark:hover:bg-gray-300" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/solid/magnifying-glass.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/solid/magnifying-glass.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></button><button id="assistant-entry-mobile" aria-label="Toggle assistant panel"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-4.5 text-gray-500 dark:text-gray-400 hover:text-gray-600 dark:hover:text-gray-300"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><button type="button" aria-label="More actions" class="h-7 w-5 flex items-center justify-center relative after:content-[&#x27;&#x27;] after:absolute after:-inset-y-2 after:-left-1 after:-right-4"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 shrink-0 bg-gray-500 dark:bg-gray-400 hover:bg-gray-600 dark:hover:bg-gray-300" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/solid/ellipsis-vertical.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/solid/ellipsis-vertical.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></button></div></div></div><button type="button" class="flex items-center h-14 py-4 px-5 lg:hidden focus:outline-0 w-full text-left"><div class="text-gray-500 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300"><span class="sr-only">Navigation</span><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0"><path d="M2.25 9H15.75" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.25 3.75H15.75" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.25 14.25H15.75" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div><div class="ml-4 flex text-sm leading-6 whitespace-nowrap min-w-0 space-x-3 overflow-hidden"><div class="flex items-center space-x-3 shrink-0"><span>Authentication</span><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 text-gray-400 shrink-0"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div><div class="font-semibold text-gray-900 truncate dark:text-gray-200 min-w-0 flex-1">OAuth PKCE</div></div></button></div><div class="hidden lg:flex px-12 h-12"><div class="nav-tabs h-full flex text-sm gap-x-6"><a class="link nav-tabs-item group relative h-full gap-2 flex items-center font-medium hover:text-gray-800 dark:hover:text-gray-300 text-gray-800 dark:text-gray-200 [text-shadow:-0.2px_0_0_currentColor,0.2px_0_0_currentColor]" data-active="true" aria-current="location" href="/docs/quickstart"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! h-4 w-4 bg-current" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/book.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/book.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg>Docs<div class="absolute bottom-0 h-[1.5px] w-full left-0 bg-primary dark:bg-primary-light"></div></a><a class="link nav-tabs-item group relative h-full gap-2 flex items-center font-medium text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-300" href="/docs/api_reference/overview"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! h-4 w-4 bg-current" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/code.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/code.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg>API Reference<div class="absolute bottom-0 h-[1.5px] w-full left-0 group-hover:bg-gray-200 dark:group-hover:bg-gray-700"></div></a><a class="link nav-tabs-item group relative h-full gap-2 flex items-center font-medium text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-300" href="/docs/client-sdks/overview"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! h-4 w-4 bg-current" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/cube.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/cube.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg>Client SDKs<div class="absolute bottom-0 h-[1.5px] w-full left-0 group-hover:bg-gray-200 dark:group-hover:bg-gray-700"></div></a><a class="link nav-tabs-item group relative h-full gap-2 flex items-center font-medium text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-300" href="/docs/agent-sdk/overview"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! h-4 w-4 bg-current" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/cube.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/cube.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg>Agent SDK<div class="absolute bottom-0 h-[1.5px] w-full left-0 group-hover:bg-gray-200 dark:group-hover:bg-gray-700"></div></a><a class="link nav-tabs-item group relative h-full gap-2 flex items-center font-medium text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-300" href="/docs/cookbook/get-started/quickstart"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! h-4 w-4 bg-current" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/book-open.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/book-open.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg>Cookbook<div class="absolute bottom-0 h-[1.5px] w-full left-0 group-hover:bg-gray-200 dark:group-hover:bg-gray-700"></div></a></div></div><style>:root{--topbar-tabs-height:3rem}</style></div></div></header><div class="scroll-mt-(--scroll-mt) peer-[.is-custom]:max-w-none peer-[.is-center]:max-w-3xl peer-[.is-not-custom]:peer-[.is-not-center]:max-w-8xl peer-[.is-not-custom]:px-4 peer-[.is-not-custom]:mx-auto peer-[.is-not-custom]:lg:px-8 peer-[.is-wide]:lg:*:last:max-w-216 peer-[.is-not-custom]:peer-[.is-not-center]:lg:flex peer-[.is-custom]:[&amp;&gt;:first-child]:hidden! peer-[.is-custom]:[&amp;&gt;:first-child]:sm:hidden! peer-[.is-custom]:[&amp;&gt;:first-child]:md:hidden! peer-[.is-custom]:[&amp;&gt;:first-child]:lg:hidden! peer-[.is-custom]:[&amp;&gt;:first-child]:xl:hidden! peer-[.is-center]:[&amp;&gt;:first-child]:hidden! peer-[.is-center]:[&amp;&gt;:first-child]:sm:hidden! peer-[.is-center]:[&amp;&gt;:first-child]:md:hidden! peer-[.is-center]:[&amp;&gt;:first-child]:lg:hidden! peer-[.is-center]:[&amp;&gt;:first-child]:xl:hidden!"><nav aria-label="Pages" class="z-20 hidden lg:block sticky self-start shrink-0 w-[18rem] top-(--mintlify-slot-header-height,calc(4rem+var(--topbar-tabs-height,0rem))) h-[calc(100dvh-var(--mintlify-slot-header-height,calc(4rem+var(--topbar-tabs-height,0rem))))]" id="sidebar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" id="sidebar-content" class="min-w-0 absolute! inset-0 z-10"><div role="presentation" data-id="base-ui-_R_2tbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] pr-8 pb-10 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-0! w-full"><div class="relative lg:text-sm lg:leading-6"><div class="sticky top-0 h-8 pointer-events-none z-10 bg-linear-to-b from-background-light dark:from-background-dark"></div><div id="navigation-items"><div><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! sidebar-group-icon h-3.5 w-3.5 bg-current" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/compass.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/compass.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>Overview</span></h3></div><ul class="sidebar-group space-y-px"><li id="/quickstart" class="relative scroll-m-4 first:scroll-m-20" data-title="Quickstart"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/quickstart"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/rocket.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/rocket.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Quickstart</span></div></div></a></li><li id="/batch-quickstart" class="relative scroll-m-4 first:scroll-m-20" data-title="Batch"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/batch-quickstart"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/boxes-stacked.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/boxes-stacked.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Batch</span><div class="h-[1lh] flex items-center shrink-0 leading-[inherit]"><span class="nav-tag-pill flex items-center w-fit"><span class="nav-tag-pill-text px-1 py-0.5 rounded-md text-[0.65rem] leading-tight font-bold text-primary dark:text-primary-light bg-primary/10" data-nav-tag="Beta">Beta</span></span></div></div></div></a></li><li id="/guides/overview/principles" class="relative scroll-m-4 first:scroll-m-20" data-title="Principles"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/overview/principles"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/book.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/book.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Principles</span></div></div></a></li><li id="/guides/overview/models" class="relative scroll-m-4 first:scroll-m-20" data-title="Models"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/overview/models"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/cube.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/cube.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Models</span></div></div></a></li><li id="/guides/overview/mcp-server" class="relative scroll-m-4 first:scroll-m-20" data-title="MCP"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/overview/mcp-server"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/plug.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/plug.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">MCP</span></div></div></a></li><li data-title="Multimodal" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/layer-group.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/layer-group.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class=""><span>Multimodal</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li><li data-title="Authentication" data-group-tag="" data-active="true" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="true" aria-controls="_R_uhdratbsnlhjiuasnpfiutb_"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield-check.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield-check.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class=""><span>Authentication</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5 duration-75 rotate-90"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button><ul id="_R_uhdratbsnlhjiuasnpfiutb_" class="space-y-px"><li id="/guides/overview/auth/oauth" class="relative scroll-m-4 first:scroll-m-20" data-title="OAuth" data-active="true" data-active-nav-item="true"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] bg-primary/10 text-primary [text-shadow:-0.2px_0_0_currentColor,0.2px_0_0_currentColor] dark:text-primary-light dark:bg-primary-light/10" style="padding-left:1.75rem" aria-current="page" href="/docs/guides/overview/auth/oauth"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-primary dark:bg-primary-light" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield-check.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield-check.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">OAuth</span></div></div></a></li><li id="/guides/overview/auth/management-api-keys" class="relative scroll-m-4 first:scroll-m-20" data-title="Management API Keys"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1.75rem" href="/docs/guides/overview/auth/management-api-keys"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/key.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/key.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Management API Keys</span></div></div></a></li><li id="/guides/overview/auth/byok" class="relative scroll-m-4 first:scroll-m-20" data-title="BYOK"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1.75rem" href="/docs/guides/overview/auth/byok"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/key.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/key.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">BYOK</span></div></div></a></li></ul></li><li id="/guides/overview/stripe-projects" class="relative scroll-m-4 first:scroll-m-20" data-title="Stripe Projects"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/overview/stripe-projects"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/brands/stripe.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/brands/stripe.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Stripe Projects</span></div></div></a></li><li id="/faq" class="relative scroll-m-4 first:scroll-m-20" data-title="FAQ"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/faq"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/question.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/question.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">FAQ</span></div></div></a></li><li id="/guides/overview/report-feedback" class="relative scroll-m-4 first:scroll-m-20" data-title="Report Feedback"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/overview/report-feedback"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/bug.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/bug.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Report Feedback</span></div></div></a></li></ul></div><div class="mt-6 lg:mt-8"><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! sidebar-group-icon h-3.5 w-3.5 bg-current" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/route.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/route.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>Models &amp; Routing</span></h3></div><ul class="sidebar-group space-y-px"><li id="/guides/routing/model-fallbacks" class="relative scroll-m-4 first:scroll-m-20" data-title="Model Fallbacks"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/routing/model-fallbacks"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/arrows-rotate.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/arrows-rotate.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Model Fallbacks</span></div></div></a></li><li id="/guides/routing/provider-selection" class="relative scroll-m-4 first:scroll-m-20" data-title="Provider Selection"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/routing/provider-selection"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/network-wired.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/network-wired.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Provider Selection</span></div></div></a></li><li id="/guides/routing/auto-exacto" class="relative scroll-m-4 first:scroll-m-20" data-title="Auto Exacto"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/routing/auto-exacto"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/crosshairs.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/crosshairs.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Auto Exacto</span></div></div></a></li><li id="/guides/routing/private-models" class="relative scroll-m-4 first:scroll-m-20" data-title="Private Models"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/routing/private-models"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/lock.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/lock.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Private Models</span></div></div></a></li><li data-title="Model Variants" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/gem.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/gem.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class=""><span>Model Variants</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li><li data-title="Routers" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/robot.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/robot.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class=""><span>Routers</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li></ul></div><div class="mt-6 lg:mt-8"><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! sidebar-group-icon h-3.5 w-3.5 bg-current" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/stars.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/stars.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>Features</span></h3></div><ul class="sidebar-group space-y-px"><li id="/guides/features/workspaces" class="relative scroll-m-4 first:scroll-m-20" data-title="Workspaces"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/workspaces"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/grid-2.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/grid-2.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Workspaces</span></div></div></a></li><li id="/guides/features/workspaces/workspace-budgets" class="relative scroll-m-4 first:scroll-m-20" data-title="Workspace Budgets"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/workspaces/workspace-budgets"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/wallet.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/wallet.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Workspace Budgets</span></div></div></a></li><li id="/guides/features/workspaces/switching" class="relative scroll-m-4 first:scroll-m-20" data-title="Switching Workspaces"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/workspaces/switching"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/repeat.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/repeat.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Switching Workspaces</span></div></div></a></li><li id="/guides/features/sso" class="relative scroll-m-4 first:scroll-m-20" data-title="Single Sign-On (SSO)"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/sso"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield-halved.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield-halved.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Single Sign-On (SSO)</span></div></div></a></li><li id="/guides/features/scim-mappings" class="relative scroll-m-4 first:scroll-m-20" data-title="SCIM Group Mappings"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/scim-mappings"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/users-gear.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/users-gear.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">SCIM Group Mappings</span></div></div></a></li><li id="/guides/features/presets" class="relative scroll-m-4 first:scroll-m-20" data-title="Presets"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/presets"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/sliders.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/sliders.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Presets</span></div></div></a></li><li id="/guides/features/classifiers" class="relative scroll-m-4 first:scroll-m-20" data-title="Custom Classifiers"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/classifiers"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/tag.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/tag.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Custom Classifiers</span></div></div></a></li><li id="/guides/features/response-caching" class="relative scroll-m-4 first:scroll-m-20" data-title="Response Caching"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/response-caching"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/box-archive.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/box-archive.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Response Caching</span></div></div></a></li><li id="/guides/features/tool-calling" class="relative scroll-m-4 first:scroll-m-20" data-title="Tool Calling"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/tool-calling"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/toolbox.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/toolbox.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Tool Calling</span></div></div></a></li><li data-title="Server Tools" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/server.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/server.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class=""><span>Server Tools</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li><li data-title="Plugins" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/plug.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/plug.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class=""><span>Plugins</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li><li id="/guides/features/structured-outputs" class="relative scroll-m-4 first:scroll-m-20" data-title="Structured Outputs"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/structured-outputs"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/code.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/code.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Structured Outputs</span></div></div></a></li><li id="/guides/features/message-transforms" class="relative scroll-m-4 first:scroll-m-20" data-title="Message Transforms"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/message-transforms"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/arrows-rotate.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/arrows-rotate.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Message Transforms</span></div></div></a></li><li id="/guides/features/zero-completion-insurance" class="relative scroll-m-4 first:scroll-m-20" data-title="Zero Completion Insurance"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/zero-completion-insurance"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Zero Completion Insurance</span></div></div></a></li><li id="/guides/features/zdr" class="relative scroll-m-4 first:scroll-m-20" data-title="ZDR"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/zdr"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield-halved.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield-halved.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">ZDR</span></div></div></a></li><li id="/app-attribution" class="relative scroll-m-4 first:scroll-m-20" data-title="App Attribution"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/app-attribution"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/chart-line.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/chart-line.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">App Attribution</span></div></div></a></li><li data-title="Guardrails" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield-check.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield-check.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class=""><span>Guardrails</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li><li id="/guides/features/service-tiers" class="relative scroll-m-4 first:scroll-m-20" data-title="Service Tiers"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/service-tiers"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/layer-group.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/layer-group.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Service Tiers</span></div></div></a></li><li id="/guides/features/sovereign-ai" class="relative scroll-m-4 first:scroll-m-20" data-title="Sovereign AI"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/sovereign-ai"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/globe.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/globe.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Sovereign AI</span></div></div></a></li><li id="/guides/features/router-metadata" class="relative scroll-m-4 first:scroll-m-20" data-title="Router Metadata"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/router-metadata"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/circle-info.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/circle-info.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Router Metadata</span></div></div></a></li><li id="/guides/features/input-output-logging" class="relative scroll-m-4 first:scroll-m-20" data-title="Input &amp; Output Logging"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/features/input-output-logging"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/file-lines.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/file-lines.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Input &amp; Output Logging</span></div></div></a></li><li data-title="Broadcast" data-group-tag="" class="space-y-px"><button class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" aria-expanded="false"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/broadcast-tower.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/broadcast-tower.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class=""><span>Broadcast</span></div><div class="h-[1lh] flex items-center shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 w-2 h-[1lh] -mr-0.5"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></button></li></ul></div><div class="mt-6 lg:mt-8"><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! sidebar-group-icon h-3.5 w-3.5 bg-current" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/terminal.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/terminal.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>Ori</span></h3></div><ul class="sidebar-group space-y-px"><li id="/guides/ori/eval" class="relative scroll-m-4 first:scroll-m-20" data-title="Ori Eval"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/ori/eval"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/vial-circle-check.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/vial-circle-check.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Ori Eval</span></div></div></a></li><li id="/guides/ori/harness" class="relative scroll-m-4 first:scroll-m-20" data-title="Ori Harness"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/ori/harness"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/plug.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/plug.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Ori Harness</span></div></div></a></li><li id="/guides/ori/files" class="relative scroll-m-4 first:scroll-m-20" data-title="Where Ori writes files"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/ori/files"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/folder.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/folder.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Where Ori writes files</span></div></div></a></li></ul></div><div class="mt-6 lg:mt-8"><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! sidebar-group-icon h-3.5 w-3.5 bg-current" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/shield.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>Privacy</span></h3></div><ul class="sidebar-group space-y-px"><li id="/guides/privacy/data-collection" class="relative scroll-m-4 first:scroll-m-20" data-title="Data Collection"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/privacy/data-collection"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/database.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/database.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Data Collection</span></div></div></a></li><li id="/guides/privacy/provider-logging" class="relative scroll-m-4 first:scroll-m-20" data-title="Provider Logging"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/privacy/provider-logging"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/file-lines.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/file-lines.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Provider Logging</span></div></div></a></li></ul></div><div class="mt-6 lg:mt-8"><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! sidebar-group-icon h-3.5 w-3.5 bg-current" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/lightbulb.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/lightbulb.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>Best Practices</span></h3></div><ul class="sidebar-group space-y-px"><li id="/guides/best-practices/latency-and-performance" class="relative scroll-m-4 first:scroll-m-20" data-title="Latency and Performance"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/best-practices/latency-and-performance"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/gauge-high.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/gauge-high.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Latency and Performance</span></div></div></a></li><li id="/guides/best-practices/prompt-caching" class="relative scroll-m-4 first:scroll-m-20" data-title="Prompt Caching"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/best-practices/prompt-caching"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/database.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/database.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Prompt Caching</span></div></div></a></li><li id="/guides/best-practices/uptime-optimization" class="relative scroll-m-4 first:scroll-m-20" data-title="Uptime Optimization"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/best-practices/uptime-optimization"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/chart-line.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/chart-line.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Uptime Optimization</span></div></div></a></li><li id="/guides/best-practices/reasoning-tokens" class="relative scroll-m-4 first:scroll-m-20" data-title="Reasoning Tokens"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/best-practices/reasoning-tokens"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/lightbulb.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/lightbulb.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Reasoning Tokens</span></div></div></a></li></ul></div><div class="mt-6 lg:mt-8"><div class="sidebar-group-header flex items-center gap-2.5 pl-4 mb-3.5 lg:mb-2.5 font-semibold text-gray-900 dark:text-gray-200"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! sidebar-group-icon h-3.5 w-3.5 bg-current" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/users.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/users.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg><h3 class="sidebar-title text-[length:inherit] font-[inherit] leading-[inherit]"><span>Community</span></h3></div><ul class="sidebar-group space-y-px"><li id="/guides/community/for-providers" class="relative scroll-m-4 first:scroll-m-20" data-title="For Providers"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/for-providers"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/cloud.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/cloud.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">For Providers</span></div></div></a></li><li id="/guides/community/frameworks-and-integrations-overview" class="relative scroll-m-4 first:scroll-m-20" data-title="Frameworks and Integrations Overview"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/frameworks-and-integrations-overview"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Frameworks and Integrations Overview</span></div></div></a></li><li id="/guides/community/awesome-openrouter" class="relative scroll-m-4 first:scroll-m-20" data-title="Awesome OpenRouter"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/awesome-openrouter"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/star.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/star.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Awesome OpenRouter</span></div></div></a></li><li id="/guides/community/effect-ai-sdk" class="relative scroll-m-4 first:scroll-m-20" data-title="Effect AI SDK"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/effect-ai-sdk"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Effect AI SDK</span></div></div></a></li><li id="/guides/community/arize" class="relative scroll-m-4 first:scroll-m-20" data-title="Arize AX"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/arize"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Arize AX</span></div></div></a></li><li id="/guides/community/langchain" class="relative scroll-m-4 first:scroll-m-20" data-title="LangChain"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/langchain"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">LangChain</span></div></div></a></li><li id="/guides/community/livekit" class="relative scroll-m-4 first:scroll-m-20" data-title="LiveKit"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/livekit"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">LiveKit</span></div></div></a></li><li id="/guides/community/langfuse" class="relative scroll-m-4 first:scroll-m-20" data-title="Langfuse"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/langfuse"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Langfuse</span></div></div></a></li><li id="/guides/community/mastra" class="relative scroll-m-4 first:scroll-m-20" data-title="Mastra"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/mastra"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Mastra</span></div></div></a></li><li id="/guides/community/openai-sdk" class="relative scroll-m-4 first:scroll-m-20" data-title="OpenAI SDK"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/openai-sdk"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">OpenAI SDK</span></div></div></a></li><li id="/guides/community/anthropic-agent-sdk" class="relative scroll-m-4 first:scroll-m-20" data-title="Anthropic Agent SDK"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/anthropic-agent-sdk"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Anthropic Agent SDK</span></div></div></a></li><li id="/guides/community/pydantic-ai" class="relative scroll-m-4 first:scroll-m-20" data-title="PydanticAI"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/pydantic-ai"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">PydanticAI</span></div></div></a></li><li id="/guides/community/render" class="relative scroll-m-4 first:scroll-m-20" data-title="Render"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/render"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Render</span></div></div></a></li><li id="/guides/community/replit" class="relative scroll-m-4 first:scroll-m-20" data-title="Replit"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/replit"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Replit</span></div></div></a></li><li id="/guides/community/tanstack-ai" class="relative scroll-m-4 first:scroll-m-20" data-title="TanStack AI"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/tanstack-ai"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">TanStack AI</span></div></div></a></li><li id="/guides/community/vercel-ai-sdk" class="relative scroll-m-4 first:scroll-m-20" data-title="Vercel AI SDK"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/vercel-ai-sdk"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Vercel AI SDK</span></div></div></a></li><li id="/guides/community/xcode" class="relative scroll-m-4 first:scroll-m-20" data-title="Xcode"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/xcode"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Xcode</span></div></div></a></li><li id="/guides/community/zapier" class="relative scroll-m-4 first:scroll-m-20" data-title="Zapier"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/zapier"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Zapier</span></div></div></a></li><li id="/guides/community/infisical" class="relative scroll-m-4 first:scroll-m-20" data-title="Infisical"><a class="group flex items-start pr-3 py-1.5 cursor-pointer gap-x-3 text-left focus-visible:-outline-offset-2 break-words hyphens-auto rounded-xl w-full outline-offset-[-1px] hover:bg-gray-600/5 dark:hover:bg-gray-200/5 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300" style="padding-left:1rem" href="/docs/guides/community/infisical"><div class="h-[1lh] flex items-center shrink-0"><svg class="forced-colors:forced-color-adjust-none forced-colors:bg-[color:CanvasText]! size-4 bg-gray-400 dark:bg-gray-500" aria-hidden="true" focusable="false" style="-webkit-mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(&quot;https://d3gk2c5xim1je2.cloudfront.net/fontawesome/v7.2.0/regular/puzzle-piece.svg&quot;);mask-repeat:no-repeat;mask-position:center"></svg></div><div class="flex-1 flex min-w-0 items-start gap-x-2.5"><div class="flex min-w-0 flex-1 flex-wrap items-center gap-1.5 [word-break:break-word]"><span class="min-w-0 max-w-full break-words hyphens-auto">Infisical</span></div></div></a></li></ul></div><script>(function () {
  try {
    if (window.__mintlifyInitialSidebarScrollDone) return;
    window.__mintlifyInitialSidebarScrollDone = true;

    var path = (window.location.pathname || '/').split('#')[0].split('?')[0];
    if (path.endsWith('/index')) path = path.slice(0, -6);
    else if (path === 'index') path = '';

    var candidates = [];
    if (path) candidates.push(path);
    if (path.startsWith('/')) candidates.push(path.slice(1));
    else candidates.push('/' + path);

    var item = null;
    for (var i = 0; i < candidates.length && !item; i++) {
      var matches = document.querySelectorAll('[id="' + candidates[i].replace(/"/g, '\\"') + '"]');
      for (var j = 0; j < matches.length; j++) {
        if (matches[j].closest('#sidebar, #sidebar-content')) {
          item = matches[j];
          break;
        }
      }
    }
    if (!item) return;

    var parent = item.closest('[data-component-part="scroll-area-viewport"]');
    if (!parent) {
      parent = item.parentElement;
      while (parent) {
        var style = getComputedStyle(parent);
        if (style.overflowY === 'auto' || style.overflowY === 'scroll') break;
        parent = parent.parentElement;
      }
    }
    if (!parent) return;

    var parentRect = parent.getBoundingClientRect();
    var itemRect = item.getBoundingClientRect();
    if (itemRect.top >= parentRect.top && itemRect.bottom <= parentRect.bottom) return;

    var itemTopRelative = itemRect.top - parentRect.top + parent.scrollTop;
    parent.scrollTop = itemTopRelative - parentRect.height / 2 + itemRect.height / 2;
  } catch (e) {}
})();</script></div></div></div></div></div></nav><main id="content-container" class="lg:flex-1 lg:min-w-0"><script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://openrouter.ai/#organization","name":"OpenRouter | Documentation","url":"https://openrouter.ai","logo":{"@type":"ImageObject","url":"https://mintcdn.com/openrouter-d02e98a0/ksNSeB_K7gD-BUDh/assets/logo-v2-light.svg?fit=max&auto=format&n=ksNSeB_K7gD-BUDh&q=85&s=690e45873843519efe02bcbe45795dac"}},{"@type":"WebSite","@id":"https://openrouter.ai/docs#website","name":"OpenRouter | Documentation","url":"https://openrouter.ai/docs","publisher":{"@id":"https://openrouter.ai/#organization"}},{"@type":"WebPage","@id":"https://openrouter.ai/docs/guides/overview/auth/oauth#webpage","url":"https://openrouter.ai/docs/guides/overview/auth/oauth","name":"OAuth PKCE","description":"Connect your users to OpenRouter","dateModified":"2026-08-08T19:05:56.363Z","isPartOf":{"@id":"https://openrouter.ai/docs#website"},"breadcrumb":{"@id":"https://openrouter.ai/docs/guides/overview/auth/oauth#breadcrumb"}},{"@type":"BreadcrumbList","@id":"https://openrouter.ai/docs/guides/overview/auth/oauth#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Overview","item":"https://openrouter.ai/docs/quickstart"},{"@type":"ListItem","position":2,"name":"OAuth PKCE","item":"https://openrouter.ai/docs/guides/overview/auth/oauth"}]},{"@type":["Article","TechArticle"],"@id":"https://openrouter.ai/docs/guides/overview/auth/oauth#article","headline":"OAuth PKCE","name":"OAuth PKCE","description":"Connect your users to OpenRouter","url":"https://openrouter.ai/docs/guides/overview/auth/oauth","mainEntityOfPage":{"@id":"https://openrouter.ai/docs/guides/overview/auth/oauth#webpage"},"image":"https://openrouter.ai/dynamic-og?pathname=use-cases/oauth-pkce&title=OAuth%20PKCE&description=Secure%20one-click%20authentication%20for%20your%20OpenRouter%20users","dateModified":"2026-08-08T19:05:56.363Z","publisher":{"@id":"https://openrouter.ai/#organization"},"isPartOf":{"@id":"https://openrouter.ai/docs#website"}}]}</script><script>document.documentElement.setAttribute('data-page-mode', "none");</script><span class="fixed inset-0 bg-background-light dark:bg-background-dark -z-10 pointer-events-none" id="background-color"></span><span class="block absolute dark:hidden inset-0 overflow-hidden pointer-events-none"></span><span class="hidden absolute dark:block inset-0 overflow-hidden pointer-events-none"></span><style data-custom-css-index="0" data-custom-css-path="style.css">/*
 * OpenRouter Docs — Bauhaus theme overrides
 *
 * Custom CSS for Mintlify to align with the bauhaus design system.
 * Uses Mintlify's exposed ID/element selectors for targeted styling.
 *
 * Brand palette:
 *   Ink #03080A   Cloud #FCFCFE   Grape #7624F4
 *   Volt #C8FF00  Coral #FF6849   Royal #035ADE
 */

/* ── Code font: Geist Mono ── */
@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600&display=swap');

/*
 * Inverse semantic pair mirrors packages/frontend/components/v2/theme.css.
 * Mintlify is a separate app, so its generated tooltip DOM uses the same
 * light Ink/Cloud and dark Cloud/Ink values through RGB channel variables.
 */
:root {
  --inverse: 3 8 10;
  --inverse-foreground: 252 252 254;
  --tooltip-background: var(--inverse);
  --tooltip-foreground: var(--inverse-foreground);
}

code,
pre,
pre code,
.code-block code,
[class*="code"] code {
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

/* ── Text selection: accent tint per DESIGN.md ── */
::selection {
  background: rgb(118 36 244 / 0.14);
}

.dark ::selection,
html.dark ::selection {
  background: rgb(200 255 0 / 0.14);
  color: inherit;
}

/* ── Dark-mode accent swap: Volt (#C8FF00 = rgb(200 255 0)) per DESIGN.md ──
 * Mintlify + Tailwind use space-separated RGB: rgb(var(--primary-light) / alpha).
 * Override accent in dark mode from Grape to Volt. */
.dark,
[data-theme="dark"],
html.dark {
  --primary: 200 255 0;
  --primary-light: 200 255 0;
  --primary-dark: 200 255 0;
  --light-primary: 200 255 0;
  --primary-foreground: 3 8 10;
  --inverse: 252 252 254;
  --inverse-foreground: 3 8 10;

  /* ── Dark-mode border: Cloud at 14% per DESIGN.md ── */
  --default-border-color: rgb(252 252 254 / 0.14);
}

/* ── Border radius: bauhaus 4/6/8px scale ── */
#navbar {
  border-radius: 0;
}

/* Sidebar active item */
#sidebar a[aria-current="page"],
nav[aria-label="Pages"] a[aria-current="page"] {
  border-radius: 8px;
}

/* Cards and code blocks */
[data-component-part="code-block-root"] {
  border-radius: 8px;
}

/* ── Link styling per DESIGN.md ──
 * underline at 40% opacity of current color, full on hover, offset 2px */
a:not([class]) {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: rgb(0 0 0 / 0.4);
}

a:not([class]):hover {
  text-decoration-color: currentColor;
}

.dark a:not([class]),
html.dark a:not([class]) {
  text-decoration-color: rgb(255 255 255 / 0.4);
}

.dark a:not([class]):hover,
html.dark a:not([class]):hover {
  text-decoration-color: currentColor;
}

/* ── Sidebar badges: outline style ── */
.nav-tag-pill-text {
  background: transparent !important;
  color: rgb(0 0 0 / 0.5) !important;
  border: 1px solid rgb(0 0 0 / 0.2) !important;
}

.dark .nav-tag-pill-text,
html.dark .nav-tag-pill-text {
  background: transparent !important;
  color: rgb(252 252 254 / 0.5) !important;
  border: 1px solid rgb(252 252 254 / 0.2) !important;
}

/* Match the home navbar logo height (h-6 / 1.5rem). */
.nav-logo {
  height: 1.5rem;
}

/* ── Sidebar expand chevrons: raise dark-mode contrast ──
 * Collapsible group toggles render a caret whose default dark tone
 * (gray-600 on Ink) is nearly invisible, so it isn't clear which items
 * have subsections. Derive the caret from Cloud via the DESIGN.md opacity
 * scale: muted-foreground (Cloud `a0`) at rest, full Cloud (foreground) on
 * hover — no custom hex outside the brand palette. */
.dark nav[aria-label="Pages"] button[aria-expanded] svg.transition-transform,
html.dark nav[aria-label="Pages"] button[aria-expanded] svg.transition-transform {
  color: rgb(252 252 254 / 0.627);
}

.dark nav[aria-label="Pages"] button[aria-expanded]:hover svg.transition-transform,
html.dark nav[aria-label="Pages"] button[aria-expanded]:hover svg.transition-transform {
  color: rgb(252 252 254);
}

/* ── Sidebar expand chevrons: enlarge for legibility ──
 * The default caret (w-2 ≈ 8px) is easy to miss; bump its footprint so it
 * reads clearly as an expandable affordance. */
nav[aria-label="Pages"] button[aria-expanded] svg.transition-transform {
  width: 0.625rem;
  height: 0.625rem;
}

/* ── Tooltips: inverse surface pairing ──
 * Mintlify has a foreground variable for Radix tooltips but no matching
 * background variable, so both values are mirrored here from the inverse pair.
 * Radix opens tooltips as "delayed-open" on a normal hover but "instant-open"
 * when moving between triggers within its skip-delay window; cover both. */
[data-radix-popper-content-wrapper]
  > div[data-state="delayed-open"],
[data-radix-popper-content-wrapper]
  > div[data-state="instant-open"] {
  background-color: rgb(var(--tooltip-background)) !important;
  color: rgb(var(--tooltip-foreground)) !important;
}

/* ── Callout + code block alignment ──
 * A code block that is the only child of a callout body carries Mintlify's default
 * prose margins (mt-5 mb-8), which push the snippet down so it no longer lines
 * up with the top-aligned callout icon. Drop those margins so the snippet's
 * top edge aligns with the icon. */
.callout [data-component-part="callout-content"] > .code-block:first-child {
  margin-top: 0;
}

.callout [data-component-part="callout-content"] > .code-block:last-child {
  margin-bottom: 0;
}

/* ── Floating code-block buttons: opaque background ──
 * Mintlify only backs the floating buttons (report / copy / ask) with
 * gray-100/gray-800 when the code block has no fade overlay
 * (group-[:not(:has([data-fade-overlay]))]). Collapsible/expandable blocks
 * always carry a fade overlay, so the buttons stay transparent and the code
 * text bleeds through behind them. Apply the same background unconditionally
 * so the buttons are legible on every code block. */
[data-floating-buttons] button {
  background-color: rgb(241 239 245);
}

.dark [data-floating-buttons] button,
html.dark [data-floating-buttons] button {
  background-color: rgb(40 38 44);
}

/* ── Changelog: Update tags as outline pills (matches sidebar badges) ── */
[data-component-part="update-tag"] {
  border: 1px solid rgb(0 0 0 / 0.2);
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  line-height: 1.25rem;
  color: rgb(0 0 0 / 0.6);
}

.dark [data-component-part="update-tag"],
html.dark [data-component-part="update-tag"] {
  border-color: rgb(252 252 254 / 0.2);
  color: rgb(252 252 254 / 0.6);
}

/* ── Changelog: selected filter pill readability ──
 * Mintlify renders the active filter as bg-primary + text-white/90. In dark
 * mode our primary is Volt (#C8FF00), so switch the text to Ink per DESIGN.md. */
.dark #changelog-filters-content button.bg-primary,
html.dark #changelog-filters-content button.bg-primary {
  color: rgb(3 8 10 / 0.9) !important;
}

/* ── Changelog: separate inline status badges from bullet text ── */
.changelog-status-badge {
  margin-left: 0.5rem;
}

.changelog-status-badge[data-color="gray"] {
  border: 1px solid rgb(3 8 10 / 0.3) !important;
}

.dark .changelog-status-badge[data-color="gray"],
html.dark .changelog-status-badge[data-color="gray"] {
  border-color: rgb(252 252 254 / 0.4) !important;
}
</style><!--$--><!--/$--><div class="flex flex-row-reverse gap-12 box-border w-full pt-40 lg:pt-10"><div class="hidden xl:flex self-start sticky xl:flex-col max-w-[28rem] z-21 h-[calc(100vh-9.5rem)] top-[9.5rem]" id="content-side-layout"><div class="z-10 hidden xl:flex box-border max-h-full pl-10 w-[19rem]" id="table-of-contents-layout"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" id="table-of-contents" class="min-w-0 text-gray-600 text-sm leading-6 w-[16.5rem] -mt-10"><div role="presentation" data-id="base-ui-_R_1dktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] pt-10 pb-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-0! w-full space-y-2"><nav aria-labelledby="_R_dktbsnlhjiuasnpfiutb_"><h2 id="_R_dktbsnlhjiuasnpfiutb_" class="m-0 font-normal"><button type="button" class="text-gray-700 dark:text-gray-300 font-medium flex items-center space-x-2 hover:text-gray-900 dark:hover:text-gray-100 transition-colors cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M2.75 14.25H15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.75 3.75H15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.75 9H8.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><span>On this page</span></button></h2><div><ul id="table-of-contents-content" class="toc"><li class="toc-item relative" data-depth="0"><a style="--toc-padding-left:0rem" href="#pkce-guide" class="break-words py-1 block pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 font-medium dark:text-gray-400 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light [[data-active]&gt;&amp;]:[text-shadow:-0.15px_0_0_currentColor,0.15px_0_0_currentColor]">PKCE Guide</a><ul class=""><li class="toc-item relative" data-depth="1"><a style="--toc-padding-left:1rem" href="#step-1-send-your-user-to-openrouter" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Step 1: Send your user to OpenRouter</a></li><li class="toc-item relative" data-depth="2"><a style="--toc-padding-left:2rem" href="#how-to-generate-a-code-challenge" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">How to Generate a Code Challenge</a></li><li class="toc-item relative" data-depth="2"><a style="--toc-padding-left:2rem" href="#localhost-apps" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Localhost Apps</a></li><li class="toc-item relative" data-depth="2"><a style="--toc-padding-left:2rem" href="#headless-apps-ssh-servers-containers" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Headless Apps (SSH Servers, Containers)</a></li><li class="toc-item relative" data-depth="1"><a style="--toc-padding-left:1rem" href="#step-2-exchange-the-code-for-a-user-controlled-api-key" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Step 2: Exchange the code for a user-controlled API key</a></li><li class="toc-item relative" data-depth="1"><a style="--toc-padding-left:1rem" href="#deep-link-to-the-user%E2%80%99s-key" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Deep-link to the user’s key</a></li><li class="toc-item relative" data-depth="1"><a style="--toc-padding-left:1rem" href="#step-3-use-the-api-key" class="group flex items-start break-words py-1 pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] whitespace-pre-wrap focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 text-gray-500 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:text-gray-400 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light">Step 3: Use the API key</a></li></ul></li><li class="toc-item relative" data-depth="0"><a style="--toc-padding-left:0rem" href="#error-codes" class="break-words py-1 block pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 font-medium dark:text-gray-400 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light [[data-active]&gt;&amp;]:[text-shadow:-0.15px_0_0_currentColor,0.15px_0_0_currentColor]">Error Codes</a></li><li class="toc-item relative" data-depth="0"><a style="--toc-padding-left:0rem" href="#external-tools" class="break-words py-1 block pl-[calc(var(--toc-padding-left)+var(--toc-focus-padding,0rem))] focus-visible:[--toc-focus-padding:0.25rem] focus-visible:-ml-1 focus-visible:-outline-offset-2 font-medium dark:text-gray-400 [li:not([data-active])&gt;&amp;:hover]:text-gray-900 dark:[li:not([data-active])&gt;&amp;:hover]:text-gray-300 [[data-active]&gt;&amp;]:text-primary dark:[[data-active]&gt;&amp;]:text-primary-light [[data-active]&gt;&amp;]:[text-shadow:-0.15px_0_0_currentColor,0.15px_0_0_currentColor]">External Tools</a></li></ul></div></nav></div></div></div></div></div><div class="relative grow box-border flex-col w-full mx-auto px-1 lg:pl-[5.7rem] lg:-ml-12 xl:w-[calc(100%-28rem)]" id="content-area"><header id="header" class="relative leading-none @container/page-header"><div class="mt-0.5 space-y-2.5"><div class="eyebrow h-5 text-primary dark:text-primary-light text-sm font-semibold">Authentication</div><div class="flex flex-col sm:flex-row items-start sm:items-center relative gap-2 min-w-0"><h1 id="page-title" class="text-3xl sm:text-4xl text-gray-900 tracking-tight dark:text-gray-200 [overflow-wrap:anywhere] font-semibold">OAuth PKCE</h1><div id="page-context-menu" class="items-center shrink-0 min-w-[156px] justify-end ml-auto hidden @[520px]/page-header:flex"><button id="page-context-menu-button" class="rounded-l-xl px-3 text-gray-700 dark:text-gray-300 py-1.5 border border-gray-200 dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5 border-r-0" aria-label="Copy page"><div class="flex items-center gap-2 text-sm text-center font-medium"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><span class="grid"><span aria-hidden="true" class="invisible col-start-1 row-start-1">Copy page</span><span class="col-start-1 row-start-1">Copy page</span></span></div></button><button type="button" tabindex="0" aria-haspopup="menu" id="base-ui-_R_1mshlktbsnlhjiuasnpfiutb_" aria-label="More actions" class="group disabled:pointer-events-none [&amp;&gt;span]:line-clamp-1 overflow-hidden group focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary dark:focus-visible:outline-primary-light py-0.5 gap-1 text-sm text-gray-950/50 dark:text-white/50 group-hover:text-gray-950/70 dark:group-hover:text-white/70 rounded-none rounded-r-xl border flex items-center justify-center h-[34px] border-gray-200 aspect-square dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 rotate-90"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="mt-2 text-lg prose prose-gray dark:prose-invert [&amp;&gt;*]:[overflow-wrap:anywhere]"><p>Connect your users to OpenRouter</p></div><div id="page-context-menu" class="flex items-center shrink-0 min-w-[156px] mt-3 @[520px]/page-header:hidden"><button id="page-context-menu-button" class="rounded-l-xl px-3 text-gray-700 dark:text-gray-300 py-1.5 border border-gray-200 dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5 border-r-0" aria-label="Copy page"><div class="flex items-center gap-2 text-sm text-center font-medium"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><span class="grid"><span aria-hidden="true" class="invisible col-start-1 row-start-1">Copy page</span><span class="col-start-1 row-start-1">Copy page</span></span></div></button><button type="button" tabindex="0" aria-haspopup="menu" id="base-ui-_R_3dhlktbsnlhjiuasnpfiutb_" aria-label="More actions" class="group disabled:pointer-events-none [&amp;&gt;span]:line-clamp-1 overflow-hidden group focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary dark:focus-visible:outline-primary-light py-0.5 gap-1 text-sm text-gray-950/50 dark:text-white/50 group-hover:text-gray-950/70 dark:group-hover:text-white/70 rounded-none rounded-r-xl border flex items-center justify-center h-[34px] border-gray-200 aspect-square dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3 transition-transform text-gray-400 group-hover:text-gray-600 dark:text-gray-600 dark:group-hover:text-gray-400 shrink-0 rotate-90"><path d="M6.5 2.75L12.75 9L6.5 15.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></header><div class="mdx-content @container/columns-container relative mt-8 prose prose-gray dark:prose-invert [contain:inline-size] isolate empty:hidden mb-14" data-page-title="OAuth PKCE" data-page-href="/guides/overview/auth/oauth" id="content"><span data-as="p">Users can connect to OpenRouter in one click using <a href="https://oauth.net/2/pkce/" target="_blank" rel="noreferrer" class="link">Proof Key for Code Exchange (PKCE)</a>.</span>
<span data-as="p">Here’s a step-by-step guide:</span>
<h2 class="flex whitespace-pre-wrap group font-semibold" id="pkce-guide"><div class="absolute" tabindex="-1"><a href="#pkce-guide" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">PKCE Guide</span></h2>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="step-1-send-your-user-to-openrouter"><div class="absolute" tabindex="-1"><a href="#step-1-send-your-user-to-openrouter" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Step 1: Send your user to OpenRouter</span></h3>
<span data-as="p">To start the PKCE flow, send your user to OpenRouter’s <code>/auth</code> URL with a <code>callback_url</code> parameter pointing back to your site:</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_ahcllktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_1dahcllktbsnlhjiuasnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-hidden text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10 group-focus-visible:outline-1 group-focus-visible:outline-primary dark:group-focus-visible:outline-primary-light group-hover:bg-gray-200/50 dark:group-hover:bg-gray-700/70 group-hover:text-primary dark:group-hover:text-primary-light">With S256 Code Challenge (Recommended)</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button><button type="button" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="false" id="base-ui-_R_2dahcllktbsnlhjiuasnpfiutb_" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-hidden text-gray-500 dark:text-gray-400"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10 group-focus-visible:outline-1 group-focus-visible:outline-primary dark:group-focus-visible:outline-primary-light group-hover:bg-gray-200/50 dark:group-hover:bg-gray-700/70 group-hover:text-primary dark:group-hover:text-primary-light">With Plain Code Challenge</div></button><button type="button" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="false" id="base-ui-_R_3dahcllktbsnlhjiuasnpfiutb_" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-hidden text-gray-500 dark:text-gray-400"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10 group-focus-visible:outline-1 group-focus-visible:outline-primary dark:group-focus-visible:outline-primary-light group-hover:bg-gray-200/50 dark:group-hover:bg-gray-700/70 group-hover:text-primary dark:group-hover:text-primary-light">Without Code Challenge</div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_3qihcllktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="code-block-copy-button z-10 select-none" id="base-ui-_R_3rihcllktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_3sihcllktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-text-code-https___openrouter_a"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_chcllktbsnlhjiuasnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white code-block-wrap whitespace-pre-wrap has-line-numbers"><div role="presentation" data-id="base-ui-_R_3chcllktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 overflow-x-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre-wrap flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="text"><code language="text" numberOfLines="2"><span class="line"><span>https://openrouter.ai/auth?callback_url=&lt;YOUR_SITE_URL&gt;&amp;code_challenge=&lt;CODE_CHALLENGE&gt;&amp;code_challenge_method=S256</span></span>
<span class="line"><span></span></span></code></pre></div></div></div></div><div class="code-block-fade-overlay print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div><div data-hidden="" data-orientation="horizontal" data-activation-direction="none" hidden="" id="base-ui-_R_khcllktbsnlhjiuasnpfiutb_" role="tabpanel" tabindex="0" inert="" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white code-block-wrap whitespace-pre-wrap has-line-numbers"><div role="presentation" data-id="base-ui-_R_3khcllktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 overflow-x-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre-wrap flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="text"><code language="text" numberOfLines="2"><span class="line"><span>https://openrouter.ai/auth?callback_url=&lt;YOUR_SITE_URL&gt;&amp;code_challenge=&lt;CODE_CHALLENGE&gt;&amp;code_challenge_method=plain</span></span>
<span class="line"><span></span></span></code></pre></div></div></div></div><div class="code-block-fade-overlay print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div><div data-hidden="" data-orientation="horizontal" data-activation-direction="none" hidden="" id="base-ui-_R_shcllktbsnlhjiuasnpfiutb_" role="tabpanel" tabindex="0" inert="" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white code-block-wrap whitespace-pre-wrap has-line-numbers"><div role="presentation" data-id="base-ui-_R_3shcllktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 overflow-x-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre-wrap flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="text"><code language="text" numberOfLines="2"><span class="line"><span>https://openrouter.ai/auth?callback_url=&lt;YOUR_SITE_URL&gt;</span></span>
<span class="line"><span></span></span></code></pre></div></div></div></div><div class="code-block-fade-overlay print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<span data-as="p">The <code>code_challenge</code> parameter is optional but recommended.</span>
<span data-as="p">Your user will be prompted to log in to OpenRouter and authorize your app. After authorization, they will be redirected back to your site with a <code>code</code> parameter in the URL:</span>
<div><div data-name="frame" class="frame p-2 not-prose relative bg-gray-50/50 rounded-2xl overflow-hidden dark:bg-gray-800/25 print:print-color-exact"><div style="background-position:10px 10px" class="absolute inset-0 bg-grid-neutral-200/20 [mask-image:linear-gradient(0deg,#fff,rgba(255,255,255,0.6))] dark:bg-grid-white/5 dark:[mask-image:linear-gradient(0deg,rgba(255,255,255,0.1),rgba(255,255,255,0.5))] print:print-color-exact"></div><div class="relative rounded-xl overflow-hidden flex justify-center"><span aria-owns="rmiz-modal-" data-rmiz=""><span data-rmiz-content="not-found" style="visibility:visible"><picture class="contents"><img data-path="assets/guides/overview/auth/oauth/auth-request.png" src="https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=15dba3246f0072ad883418114aeec7a1" alt="Alt text" class="object-contain" width="1422" height="1220" decoding="async" sizes="(max-width: 1024px) 100vw, 1024px" srcSet="https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?w=280&amp;fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=953215bd24b2c8cb6e2d78b993f00f4b 280w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?w=560&amp;fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=6845e3b224d25553d4b4bc85a8d97b38 560w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?w=840&amp;fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=b9449e1bfcd3fedc734d727242b552b0 840w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?w=1100&amp;fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=1daa366042035ff232278c9c009bc261 1100w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?w=1650&amp;fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=705ced2c2169396f56011429a9d09b3f 1650w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?w=2500&amp;fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=6e4e2f737f92c516da3edeee6d978666 2500w" data-optimize="true" style="aspect-ratio:1422 / 1220"/></picture></span></span></div><div class="absolute inset-0 pointer-events-none border border-black/5 rounded-2xl dark:border-white/5"></div></div></div>
<div role="note" aria-label="Tip" class="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border border-green-200 bg-green-50 dark:border-green-900 dark:bg-green-600/20 [&amp;_[data-component-part=&#x27;callout-icon&#x27;]]:mt-px" data-callout-type="tip"><div class="mt-0.5 w-4" data-component-part="callout-icon"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4.5 text-green-800 dark:text-green-300"><path d="M 4.0216 15.9727 C 4.0216 16.1941 4.0855 16.4101 4.2074 16.5947 L 4.81 17.4979 C 4.9946 17.7747 5.4137 18 5.7467 18 H 7.9149 C 8.2468 18 8.6659 17.775 8.8505 17.4979 L 9.451 16.5951 C 9.5543 16.439 9.6391 16.1601 9.6391 15.9727 L 9.6436 14.5945 H 4.0181 L 4.0216 15.9727 Z M 6.8308 0 C 3.2453 0.0113 0.6429 2.9171 0.6429 6.1563 C 0.6429 7.7167 1.2209 9.1392 2.1744 10.2278 C 2.7556 10.8901 3.663 12.2751 4.0104 13.443 C 4.0115 13.4518 4.0137 13.4612 4.0148 13.4706 H 9.6473 C 9.6483 13.4612 9.6505 13.4524 9.6517 13.443 C 9.9988 12.2751 10.9065 10.8901 11.4877 10.2278 C 12.4422 9.1695 13.0189 7.749 13.0189 6.1563 C 13.0189 2.7705 10.2483 0.0001 6.8308 0 Z M 10.2202 9.1449 C 9.6696 9.7724 8.9882 10.7727 8.4956 11.8131 H 5.1692 C 4.6766 10.7727 3.9953 9.7724 3.445 9.1452 C 2.7257 8.3257 2.3305 7.2463 2.3305 6.1563 C 2.3305 3.9835 4.0216 1.6964 6.7992 1.6876 C 9.3131 1.6876 11.3312 3.7058 11.3312 6.1563 C 11.3312 7.2463 10.9374 8.3257 10.2202 9.1449 Z M 6.2683 2.8127 C 4.7178 2.8127 3.4556 4.0749 3.4556 5.6254 C 3.4556 5.9364 3.7072 6.188 4.0181 6.188 C 4.3291 6.188 4.5807 5.9348 4.5807 5.6254 C 4.5807 4.6948 5.3376 3.9378 6.2683 3.9378 C 6.5792 3.9378 6.8308 3.6865 6.8308 3.3756 C 6.8308 3.0647 6.5777 2.8127 6.2683 2.8127 Z" fill="currentColor" stroke="none"></path></svg></div><div class="text-sm prose dark:prose-invert min-w-0 w-full [&amp;_kbd]:bg-background-light dark:[&amp;_kbd]:bg-background-dark [&amp;_code]:text-current! [&amp;_kbd]:text-current! [&amp;_a]:text-current! [&amp;_a]:border-current [&amp;_strong]:text-current! text-green-800 dark:text-green-300" data-component-part="callout-content"><span data-as="p"><strong>Use SHA-256 for Maximum Security</strong></span><span data-as="p">For maximum security, set <code>code_challenge_method</code> to <code>S256</code>, and set <code>code_challenge</code> to the base64 encoding of the sha256 hash of <code>code_verifier</code>.</span><span data-as="p">For more info, <a href="https://auth0.com/docs/get-started/authentication-and-authorization-flow/call-your-api-using-the-authorization-code-flow-with-pkce#parameters" target="_blank" rel="noreferrer" class="link">visit Auth0’s docs</a>.</span></div></div>
<h4 class="flex whitespace-pre-wrap group font-semibold" id="how-to-generate-a-code-challenge"><div class="absolute" tabindex="-1"><a href="#how-to-generate-a-code-challenge" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">How to Generate a Code Challenge</span></h4>
<span data-as="p">The following example uses the Web Crypto API and the Buffer API to generate a code challenge for the S256 method. You will need a bundler to use the Buffer API in the web browser:</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_aj4llktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_1daj4llktbsnlhjiuasnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-hidden text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10 group-focus-visible:outline-1 group-focus-visible:outline-primary dark:group-focus-visible:outline-primary-light">Generate Code Challenge</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_3qij4llktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="code-block-copy-button z-10 select-none" id="base-ui-_R_3rij4llktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_3sij4llktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-typescript-code-import___Buffer___fr"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_cj4llktbsnlhjiuasnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white has-line-numbers"><div role="presentation" data-id="base-ui-_R_1sj4llktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="typescript"><code language="typescript" numberOfLines="11"><span class="line"><span style="color:#CF222E;--shiki-dark:#C586C0">import</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> { </span><span style="color:#1F2328;--shiki-dark:#9CDCFE">Buffer</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> } </span><span style="color:#CF222E;--shiki-dark:#C586C0">from</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;buffer&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">async</span><span style="color:#CF222E;--shiki-dark:#569CD6"> function</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> createSHA256CodeChallenge</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#953800;--shiki-dark:#9CDCFE">input</span><span style="color:#CF222E;--shiki-dark:#D4D4D4">:</span><span style="color:#0550AE;--shiki-dark:#4EC9B0"> string</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">) {</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">  const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> encoder</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#569CD6"> new</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> TextEncoder</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">();</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">  const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> data</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> encoder</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">encode</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">input</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">);</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">  const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> hash</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#C586C0"> await</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> crypto</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">subtle</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">digest</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0A3069;--shiki-dark:#CE9178">&#x27;SHA-256&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">, </span><span style="color:#1F2328;--shiki-dark:#9CDCFE">data</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">);</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#C586C0">  return</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> Buffer</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">from</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">hash</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">).</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">toString</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0A3069;--shiki-dark:#CE9178">&#x27;base64url&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">);</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> codeVerifier</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;your-random-string&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">;</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> generatedCodeChallenge</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#C586C0"> await</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> createSHA256CodeChallenge</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">codeVerifier</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">);</span></span>
</code></pre></div></div></div></div><div class="code-block-fade-overlay print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<h4 class="flex whitespace-pre-wrap group font-semibold" id="localhost-apps"><div class="absolute" tabindex="-1"><a href="#localhost-apps" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Localhost Apps</span></h4>
<span data-as="p">Localhost callbacks are supported on <strong>any port</strong>. This is useful for CLI tools and local-first apps that bind to an arbitrary free OS port for the OAuth callback (e.g. <code>http://localhost:51423/callback</code>).</span>
<div role="note" aria-label="Note" class="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border border-blue-200 bg-blue-50 dark:border-blue-900 dark:bg-blue-600/20" data-callout-type="note"><div class="mt-0.5 w-4" data-component-part="callout-icon"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 text-blue-800 dark:text-blue-300"><path d="M 9 1.6714 C 13.0371 1.6714 16.3286 4.9629 16.3286 9 C 16.3286 13.0371 13.0371 16.3286 9 16.3286 C 7.0574 16.3252 5.1953 15.552 3.8217 14.1783 C 2.448 12.8047 1.6748 10.9426 1.6714 9 C 1.6714 4.9629 4.9629 1.6714 9 1.6714 Z M 9 0 C 4.0371 0 0 4.0371 0 9 C 0 13.9629 4.0371 18 9 18 C 13.9629 18 18 13.9629 18 9 C 18 4.0371 13.9629 0 9 0 Z M 10.2857 3.8571 H 7.7143 V 10.2857 H 10.2857 V 3.8571 Z M 10.2857 11.5714 H 7.7143 V 14.1429 H 10.2857 V 11.5714 Z" fill="currentColor" stroke="none" fill-rule="evenodd" clip-rule="evenodd"></path></svg></div><div class="text-sm prose dark:prose-invert min-w-0 w-full [&amp;_kbd]:bg-background-light dark:[&amp;_kbd]:bg-background-dark [&amp;_code]:text-current! [&amp;_kbd]:text-current! [&amp;_a]:text-current! [&amp;_a]:border-current [&amp;_strong]:text-current! text-blue-800 dark:text-blue-300" data-component-part="callout-content"><span data-as="p">Localhost apps are assigned a fixed title matching the host and port (e.g. <code>localhost:3000</code>) but will not appear in the OpenRouter marketplace or rankings. If you want a custom app name and marketplace presence, use a public URL as the callback instead.</span></div></div>
<span data-as="p">When moving to production, replace the localhost callback URL with a public URL (your project website or a GitHub repo link) to get full app attribution.</span>
<h4 class="flex whitespace-pre-wrap group font-semibold" id="headless-apps-ssh-servers-containers"><div class="absolute" tabindex="-1"><a href="#headless-apps-ssh-servers-containers" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Headless Apps (SSH Servers, Containers)</span></h4>
<span data-as="p">If your app runs where a localhost callback can’t be reached (an SSH session, a remote dev box, a container), omit <code>callback_url</code> entirely:</span>
<div class="code-block mt-5 mb-8 not-prose rounded-2xl relative group min-w-0 print:print-color-exact text-gray-950 bg-gray-50 dark:bg-white/5 dark:text-gray-50 codeblock-light border border-gray-950/10 dark:border-white/10 dark:twoslash-dark p-0.5" lines="true" wrap="true" numberOfLines="2" language="text"><div class="flex text-gray-400 text-xs rounded-t-[14px] leading-6 font-medium pl-4 pr-2.5 py-1" data-component-part="code-block-header"><div class="grow-0 flex items-center gap-1.5 text-gray-700 dark:text-gray-300 min-w-0" data-component-part="code-block-header-filename"><span class="truncate min-w-0" title="Headless (No Callback)">Headless (No Callback)</span></div><div class="flex-1 flex items-center justify-end gap-1.5 print:hidden"><div class="z-10 select-none" id="base-ui-_R_1tiksllktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="code-block-copy-button z-10 select-none" id="base-ui-_R_1uiksllktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_1viksllktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-text-code-https___openrouter_a"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:auto;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white code-block-wrap whitespace-pre-wrap has-line-numbers"><div role="presentation" data-id="base-ui-_R_cksllktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 overflow-x-hidden! overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre-wrap leading-6"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="text"><code language="text" numberOfLines="2"><span class="line"><span>https://openrouter.ai/auth?code_challenge=&lt;CODE_CHALLENGE&gt;&amp;code_challenge_method=S256&amp;key_label=&lt;YOUR_APP_NAME&gt;</span></span>
<span class="line"><span></span></span></code></pre></div></div></div></div><div class="code-block-fade-overlay print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div>
<span data-as="p">After the user authorizes, the page displays the authorization code on screen instead of redirecting. The user copies it and pastes it into your app (e.g. at a terminal prompt), and you exchange it in Step 2 exactly as usual.</span>
<span data-as="p">A <code>code_challenge</code> is <strong>required</strong> in this mode: because the code is displayed on screen, PKCE ensures it is useless to anyone without your app’s <code>code_verifier</code>. The code is single-use and expires after 10 minutes.</span>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="step-2-exchange-the-code-for-a-user-controlled-api-key"><div class="absolute" tabindex="-1"><a href="#step-2-exchange-the-code-for-a-user-controlled-api-key" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Step 2: Exchange the code for a user-controlled API key</span></h3>
<span data-as="p">After the user logs in with OpenRouter, they are redirected back to your site with a <code>code</code> parameter in the URL:</span>
<div><div data-name="frame" class="frame p-2 not-prose relative bg-gray-50/50 rounded-2xl overflow-hidden dark:bg-gray-800/25 print:print-color-exact"><div style="background-position:10px 10px" class="absolute inset-0 bg-grid-neutral-200/20 [mask-image:linear-gradient(0deg,#fff,rgba(255,255,255,0.6))] dark:bg-grid-white/5 dark:[mask-image:linear-gradient(0deg,rgba(255,255,255,0.1),rgba(255,255,255,0.5))] print:print-color-exact"></div><div class="relative rounded-xl overflow-hidden flex justify-center"><span aria-owns="rmiz-modal-" data-rmiz=""><span data-rmiz-content="not-found" style="visibility:visible"><picture class="contents"><img data-path="assets/guides/overview/auth/oauth/code-challenge.png" src="https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=10315413fb904ebcc3df28e2e9ccb0c1" alt="Alt text" class="object-contain" width="1850" height="296" decoding="async" sizes="(max-width: 1024px) 100vw, 1024px" srcSet="https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?w=280&amp;fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=2a4ab60c35b17978557d2e87ff4efb21 280w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?w=560&amp;fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=4752b70cc85c53fc1fbbafab813166c0 560w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?w=840&amp;fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=c6256286fa67eb1026509f5cf724c491 840w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?w=1100&amp;fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=c3427d8ae0bde66ba7baaca6d956a6ec 1100w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?w=1650&amp;fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=4942facdfebb381007309752b56707a3 1650w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?w=2500&amp;fit=max&amp;auto=format&amp;n=PSwwwiCqAD_BNeni&amp;q=85&amp;s=47e92ff14d2c0cf0c5f4bbc704a5ac29 2500w" data-optimize="true" style="aspect-ratio:1850 / 296"/></picture></span></span></div><div class="absolute inset-0 pointer-events-none border border-black/5 rounded-2xl dark:border-white/5"></div></div></div>
<span data-as="p">Extract this code using the browser API:</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_amkllktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_1damkllktbsnlhjiuasnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-hidden text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10 group-focus-visible:outline-1 group-focus-visible:outline-primary dark:group-focus-visible:outline-primary-light">Extract Code</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_3qimkllktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="code-block-copy-button z-10 select-none" id="base-ui-_R_3rimkllktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_3simkllktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-typescript-code-const_urlParams___ne"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_cmkllktbsnlhjiuasnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white has-line-numbers"><div role="presentation" data-id="base-ui-_R_1smkllktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="typescript"><code language="typescript" numberOfLines="2"><span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> urlParams</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#569CD6"> new</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> URLSearchParams</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">window</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">location</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">search</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">);</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> code</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> urlParams</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">get</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0A3069;--shiki-dark:#CE9178">&#x27;code&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">);</span></span>
</code></pre></div></div></div></div><div class="code-block-fade-overlay print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<span data-as="p">Then use it to make an API call to <code>https://openrouter.ai/api/v1/auth/keys</code> to exchange the code for a user-controlled API key:</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_an4llktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_1dan4llktbsnlhjiuasnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-hidden text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10 group-focus-visible:outline-1 group-focus-visible:outline-primary dark:group-focus-visible:outline-primary-light">Exchange Code</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_3qin4llktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="code-block-copy-button z-10 select-none" id="base-ui-_R_3rin4llktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_3sin4llktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-typescript-code-const_response___awa"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_cn4llktbsnlhjiuasnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white has-line-numbers"><div role="presentation" data-id="base-ui-_R_1sn4llktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="typescript"><code language="typescript" numberOfLines="13"><span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> response</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#C586C0"> await</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> fetch</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0A3069;--shiki-dark:#CE9178">&#x27;https://openrouter.ai/api/v1/auth/keys&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">, {</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">  method:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;POST&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">  headers:</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> {</span></span>
<span class="line"><span style="color:#0A3069;--shiki-dark:#CE9178">    &#x27;Content-Type&#x27;</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;application/json&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">  },</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">  body:</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> JSON</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">stringify</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">({</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">    code:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;&lt;CODE_FROM_QUERY_PARAM&gt;&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">    code_verifier:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;&lt;CODE_VERIFIER&gt;&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">, </span><span style="color:#6E7781;--shiki-dark:#6A9955">// If code_challenge was used</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">    code_challenge_method:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;&lt;CODE_CHALLENGE_METHOD&gt;&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">, </span><span style="color:#6E7781;--shiki-dark:#6A9955">// If code_challenge was used</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">  }),</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> { </span><span style="color:#0550AE;--shiki-dark:#4FC1FF">key</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> } </span><span style="color:#CF222E;--shiki-dark:#D4D4D4">=</span><span style="color:#CF222E;--shiki-dark:#C586C0"> await</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> response</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">json</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">();</span></span>
</code></pre></div></div></div></div><div class="code-block-fade-overlay print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="deep-link-to-the-user’s-key"><div class="absolute" tabindex="-1"><a href="#deep-link-to-the-user’s-key" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Deep-link to the user’s key</span></h3>
<span data-as="p">Once you have the API key, you can create links to the user’s OpenRouter
activity and key settings pages by hashing the key with SHA-256. Use the
lowercase hexadecimal digest in both URLs:</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_ansllktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_1dansllktbsnlhjiuasnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-hidden text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10 group-focus-visible:outline-1 group-focus-visible:outline-primary dark:group-focus-visible:outline-primary-light">Create Key Links</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_3qinsllktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="code-block-copy-button z-10 select-none" id="base-ui-_R_3rinsllktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_3sinsllktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-typescript-code-async_function_sha25"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_cnsllktbsnlhjiuasnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white has-line-numbers"><div role="presentation" data-id="base-ui-_R_1snsllktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="typescript"><code language="typescript" numberOfLines="11"><span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">async</span><span style="color:#CF222E;--shiki-dark:#569CD6"> function</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> sha256Hex</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#953800;--shiki-dark:#9CDCFE">value</span><span style="color:#CF222E;--shiki-dark:#D4D4D4">:</span><span style="color:#0550AE;--shiki-dark:#4EC9B0"> string</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">) {</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">  const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> data</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#569CD6"> new</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> TextEncoder</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">().</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">encode</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">value</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">);</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">  const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> hash</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#C586C0"> await</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> crypto</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">subtle</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">digest</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0A3069;--shiki-dark:#CE9178">&#x27;SHA-256&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">, </span><span style="color:#1F2328;--shiki-dark:#9CDCFE">data</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">);</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#C586C0">  return</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> Array</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">from</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#CF222E;--shiki-dark:#569CD6">new</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> Uint8Array</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">hash</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">), (</span><span style="color:#953800;--shiki-dark:#9CDCFE">byte</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">) </span><span style="color:#CF222E;--shiki-dark:#569CD6">=&gt;</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">    byte</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">toString</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0550AE;--shiki-dark:#B5CEA8">16</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">).</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">padStart</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0550AE;--shiki-dark:#B5CEA8">2</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">, </span><span style="color:#0A3069;--shiki-dark:#CE9178">&#x27;0&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">),</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">  ).</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">join</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0A3069;--shiki-dark:#CE9178">&#x27;&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">);</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> keyHash</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#C586C0"> await</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> sha256Hex</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">key</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">);</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> logsUrl</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#0A3069;--shiki-dark:#CE9178"> `https://openrouter.ai/logs?api_key_hash=</span><span style="color:#0A3069;--shiki-dark:#569CD6">${</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">keyHash</span><span style="color:#0A3069;--shiki-dark:#569CD6">}</span><span style="color:#0A3069;--shiki-dark:#CE9178">`</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">;</span></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> settingsUrl</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#0A3069;--shiki-dark:#CE9178"> `https://openrouter.ai/keys/</span><span style="color:#0A3069;--shiki-dark:#569CD6">${</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">keyHash</span><span style="color:#0A3069;--shiki-dark:#569CD6">}</span><span style="color:#0A3069;--shiki-dark:#CE9178">`</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">;</span></span>
</code></pre></div></div></div></div><div class="code-block-fade-overlay print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<span data-as="p">The links only work for the signed-in owner of the API key. If the hash does
not resolve for the viewer, the page returns a <code>404</code> rather than showing
unfiltered data.</span>
<span data-as="p">And that’s it for the PKCE flow!</span>
<h3 class="flex whitespace-pre-wrap group font-semibold" id="step-3-use-the-api-key"><div class="absolute" tabindex="-1"><a href="#step-3-use-the-api-key" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Step 3: Use the API key</span></h3>
<span data-as="p">Store the API key securely within the user’s browser or in your own database, and use it to <a class="link" href="/docs/api_reference/overview">make OpenRouter requests</a>.</span>
<div data-orientation="horizontal" data-activation-direction="none" class="code-group p-0.5 mt-5 mb-8 flex flex-col not-prose relative rounded-2xl border border-gray-950/10 dark:border-white/10 min-w-0 bg-gray-50 dark:bg-white/5 dark:codeblock-dark text-gray-950 dark:text-gray-50 codeblock-light"><div class="flex items-center justify-between gap-2 relative pr-2.5" data-component-part="code-group-tab-bar"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px" data-component-part="scroll-area" class="min-w-0 flex-1 w-0 rounded-tl-xl"><div role="presentation" data-id="base-ui-_R_ap4llktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] overflow-y-hidden! base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content"><div data-orientation="horizontal" data-activation-direction="none" role="tablist" aria-label="Code examples" class="text-xs leading-6 gap-1 flex"><button type="button" data-active="" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="true" id="base-ui-_R_1dap4llktbsnlhjiuasnpfiutb_" data-composite-item-active="" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-hidden text-primary dark:text-primary-light"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10 group-focus-visible:outline-1 group-focus-visible:outline-primary dark:group-focus-visible:outline-primary-light group-hover:bg-gray-200/50 dark:group-hover:bg-gray-700/70 group-hover:text-primary dark:group-hover:text-primary-light">TypeScript SDK</div><div class="absolute -bottom-1.5 left-0 right-0 h-0.5 rounded-full bg-primary dark:bg-primary-light peer-empty/title:hidden"></div></button><button type="button" data-orientation="horizontal" data-activation-direction="none" aria-disabled="false" tabindex="-1" role="tab" aria-selected="false" id="base-ui-_R_2dap4llktbsnlhjiuasnpfiutb_" class="group flex items-center relative gap-1.5 my-1 mb-1.5 outline-0 whitespace-nowrap font-medium ml-0! first:ml-2.5! focus-visible:outline-hidden text-gray-500 dark:text-gray-400"><div class="peer/title flex items-center gap-1.5 px-1.5 rounded-lg z-10 group-focus-visible:outline-1 group-focus-visible:outline-primary dark:group-focus-visible:outline-primary-light group-hover:bg-gray-200/50 dark:group-hover:bg-gray-700/70 group-hover:text-primary dark:group-hover:text-primary-light">TypeScript (fetch)</div></button></div></div></div></div><div class="flex items-center justify-end shrink-0 gap-1.5"><div class="z-10 select-none" id="base-ui-_R_3qip4llktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/code-snippet-feedback-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="code-snippet-feedback-button" aria-label="Report incorrect code"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/code-snippet-feedback-button:text-gray-500 dark:text-white/40 dark:group-hover/code-snippet-feedback-button:text-white/60"><path d="M9 5.431V9.569" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9 11.417C8.449 11.417 8 11.866 8 12.417C8 12.968 8.449 13.417 9 13.417C9.551 13.417 10 12.968 10 12.417C10 11.866 9.551 11.417 9 11.417Z" fill="currentColor" stroke="none"></path><path d="M10.968 2.25H7.03301C6.50301 2.25 5.99401 2.461 5.61901 2.836L2.83701 5.618C2.46201 5.993 2.25101 6.502 2.25101 7.032V10.967C2.25101 11.497 2.46201 12.006 2.83701 12.381L5.61901 15.163C5.99401 15.538 6.50301 15.749 7.03301 15.749H10.968C11.498 15.749 12.007 15.538 12.382 15.163L15.164 12.381C15.539 12.006 15.75 11.497 15.75 10.967V7.032C15.75 6.502 15.539 5.993 15.164 5.618L12.382 2.836C12.007 2.461 11.498 2.25 10.968 2.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div><div class="code-block-copy-button z-10 select-none" id="base-ui-_R_3rip4llktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/copy-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" data-testid="copy-code-button" aria-label="Copy the contents from the code block"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/copy-button:text-gray-500 dark:text-white/40 dark:group-hover/copy-button:text-white/60"><path d="M14.25 5.25H7.25C6.14543 5.25 5.25 6.14543 5.25 7.25V14.25C5.25 15.3546 6.14543 16.25 7.25 16.25H14.25C15.3546 16.25 16.25 15.3546 16.25 14.25V7.25C16.25 6.14543 15.3546 5.25 14.25 5.25Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.80103 11.998L1.77203 5.07397C1.61003 3.98097 2.36403 2.96397 3.45603 2.80197L10.38 1.77297C11.313 1.63397 12.19 2.16297 12.528 3.00097" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><span role="status" class="sr-only"></span></div><div class="z-10 select-none" id="base-ui-_R_3sip4llktbsnlhjiuasnpfiutb_" data-base-ui-tooltip-trigger=""><button class="size-6.5 flex items-center justify-center rounded-md group/ask-assistant-button in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-100 dark:in-data-floating-buttons:group-[:not(:has([data-fade-overlay]))]:bg-gray-800" id="ask-assistant-code-block-button" aria-label="Ask Assistant" data-chat-payload-element-id="lang-typescript-code-import___OpenRouter_"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-4 shrink-0 text-gray-400 group-hover/ask-assistant-button:text-gray-500 dark:text-white/40 dark:group-hover/ask-assistant-button:text-white/60"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div><div class="flex flex-1 overflow-hidden"><div data-orientation="horizontal" data-activation-direction="none" id="base-ui-_R_cp4llktbsnlhjiuasnpfiutb_" role="tabpanel" tabindex="0" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white has-line-numbers"><div role="presentation" data-id="base-ui-_R_3cp4llktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="typescript"><code language="typescript" numberOfLines="18"><span class="line"><span style="color:#CF222E;--shiki-dark:#C586C0">import</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> { </span><span style="color:#1F2328;--shiki-dark:#9CDCFE">OpenRouter</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> } </span><span style="color:#CF222E;--shiki-dark:#C586C0">from</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;@openrouter/sdk&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> openRouter</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#569CD6"> new</span><span style="color:#8250DF;--shiki-dark:#DCDCAA"> OpenRouter</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">({</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">  apiKey:</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> key</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">, </span><span style="color:#6E7781;--shiki-dark:#6A9955">// The key from Step 2</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#CF222E;--shiki-dark:#569CD6">const</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> completion</span><span style="color:#CF222E;--shiki-dark:#D4D4D4"> =</span><span style="color:#CF222E;--shiki-dark:#C586C0"> await</span><span style="color:#1F2328;--shiki-dark:#9CDCFE"> openRouter</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">chat</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">send</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">({</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">  model:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;~openai/gpt-latest&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">  messages:</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> [</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">    {</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">      role:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;user&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">      content:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;Hello!&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">    },</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">  ],</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">  stream:</span><span style="color:#0550AE;--shiki-dark:#569CD6"> false</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">console</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">log</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">completion</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">choices</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">[</span><span style="color:#0550AE;--shiki-dark:#B5CEA8">0</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">].</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">message</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">);</span></span>
</code></pre></div></div></div></div><div class="code-block-fade-overlay print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div><div data-hidden="" data-orientation="horizontal" data-activation-direction="none" hidden="" id="base-ui-_R_kp4llktbsnlhjiuasnpfiutb_" role="tabpanel" tabindex="0" inert="" data-index="-1" class="w-full min-w-full max-w-full h-full max-h-full relative focus-visible:outline-hidden before:content-[&#x27;&#x27;] before:absolute before:inset-0 before:z-10 before:pointer-events-none before:rounded-xt focus-visible:before:outline focus-visible:before:outline-1 focus-visible:before:-outline-offset-2 focus-visible:before:outline-primary dark:focus-visible:before:outline-primary-light data-hidden:hidden [&amp;_[data-component-part=code-block-root]]:rounded-xt!"><div role="presentation" style="position:relative;--scroll-area-corner-height:0px;--scroll-area-corner-width:0px;font-variant-ligatures:none;height:100%;background-color:#ffffff;--shiki-dark-bg:#0B0C0E" data-component-part="code-block-root" class="w-0 min-w-full max-w-full h-full dark:bg-codeblock text-sm leading-6 transition-[height] duration-300 ease-in-out code-block-background **:ring-0 **:outline-0 **:focus:ring-0 **:focus:outline-0 rounded-xt bg-white has-line-numbers"><div role="presentation" data-id="base-ui-_R_3kp4llktbsnlhjiuasnpfiutb_-viewport" tabindex="-1" class="size-full rounded-[inherit] [--scroll-area-fade-size:32px] py-3.5 px-4 base-ui-disable-scrollbar" style="overflow:scroll" data-component-part="scroll-area-viewport"><div role="presentation" style="min-width:fit-content" data-component-part="scroll-area-content" class="min-w-full! h-full children:my-0! children:shadow-none! children:bg-transparent!"><div class="font-mono whitespace-pre flex-none text-sm h-full leading-6" data-component-part="code-group-tab-content"><pre class="shiki shiki-themes github-light-default dark-plus" style="background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4" language="typescript"><code language="typescript" numberOfLines="16"><span class="line"><span style="color:#8250DF;--shiki-dark:#DCDCAA">fetch</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">(</span><span style="color:#0A3069;--shiki-dark:#CE9178">&#x27;https://openrouter.ai/api/v1/chat/completions&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">, {</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">  method:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;POST&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">  headers:</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> {</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">    Authorization:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> `Bearer </span><span style="color:#0A3069;--shiki-dark:#569CD6">${</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">key</span><span style="color:#0A3069;--shiki-dark:#569CD6">}</span><span style="color:#0A3069;--shiki-dark:#CE9178">`</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#0A3069;--shiki-dark:#CE9178">    &#x27;Content-Type&#x27;</span><span style="color:#1F2328;--shiki-dark:#9CDCFE">:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;application/json&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">  },</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">  body:</span><span style="color:#0550AE;--shiki-dark:#4FC1FF"> JSON</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">.</span><span style="color:#8250DF;--shiki-dark:#DCDCAA">stringify</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">({</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">    model:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;~openai/gpt-latest&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">    messages:</span><span style="color:#1F2328;--shiki-dark:#D4D4D4"> [</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">      {</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">        role:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;user&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#9CDCFE">        content:</span><span style="color:#0A3069;--shiki-dark:#CE9178"> &#x27;Hello!&#x27;</span><span style="color:#1F2328;--shiki-dark:#D4D4D4">,</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">      },</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">    ],</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">  }),</span></span>
<span class="line"><span style="color:#1F2328;--shiki-dark:#D4D4D4">});</span></span>
</code></pre></div></div></div></div><div class="code-block-fade-overlay print:hidden" data-fade-overlay="true" aria-hidden="true" style="--fade-color-light:#ffffff;--fade-color-dark:#0B0C0E"></div></div></div></div>
<h2 class="flex whitespace-pre-wrap group font-semibold" id="error-codes"><div class="absolute" tabindex="-1"><a href="#error-codes" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">Error Codes</span></h2>
<ul>
<li><code>400 Invalid code_challenge_method</code>: Make sure you’re using the same code challenge method in step 1 as in step 2.</li>
<li><code>403 Invalid code or code_verifier</code>: Make sure your user is logged in to OpenRouter, and that <code>code_verifier</code> and <code>code_challenge_method</code> are correct.</li>
<li><code>403 Authorization code expired</code>: Authorization codes expire 10 minutes after issuance. Restart the OAuth flow and exchange the new code promptly.</li>
<li><code>405 Method Not Allowed</code>: Make sure you’re using <code>POST</code> and <code>HTTPS</code> for your request.</li>
</ul>
<h2 class="flex whitespace-pre-wrap group font-semibold" id="external-tools"><div class="absolute" tabindex="-1"><a href="#external-tools" class="-ml-10 flex items-center opacity-0 border-0 group-hover:opacity-100 focus:opacity-100 focus:outline-0 group/link" aria-label="Navigate to header">​<div class="size-6 rounded-md flex items-center justify-center shadow-xs text-gray-400 dark:text-white/50 dark:bg-background-dark dark:brightness-[1.35] dark:ring-1 dark:hover:brightness-150 bg-white ring-1 ring-gray-400/30 dark:ring-gray-700/25 hover:ring-gray-400/60 dark:hover:ring-white/20 group-focus/link:border-2 group-focus/link:border-primary dark:group-focus/link:border-primary-light"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-3 shrink-0"><path d="M8.50001 6.827C8.14801 6.995 7.81801 7.225 7.52701 7.517L7.51701 7.527C6.13601 8.908 6.13601 11.146 7.51701 12.527L9.69201 14.702C11.073 16.083 13.311 16.083 14.692 14.702L14.702 14.692C16.083 13.311 16.083 11.073 14.702 9.692L13.771 8.761" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M9.50002 11.173C9.85202 11.005 10.182 10.775 10.473 10.483L10.483 10.473C11.864 9.092 11.864 6.854 10.483 5.473L8.30802 3.298C6.92702 1.917 4.68902 1.917 3.30802 3.298L3.29802 3.308C1.91702 4.689 1.91702 6.927 3.29802 8.308L4.22902 9.239" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></div></a></div><span class="cursor-pointer">External Tools</span></h2>
<ul>
<li><a href="https://example-app.com/pkce" target="_blank" rel="noreferrer" class="link">PKCE Tools</a></li>
<li><a href="https://tonyxu-io.github.io/pkce-generator/" target="_blank" rel="noreferrer" class="link">Online PKCE Generator</a></li>
</ul></div><nav id="pagination" aria-label="Pagination" class="px-0.5 flex items-center gap-6 text-sm font-semibold text-gray-700 dark:text-gray-200"><a rel="prev" aria-label="Previous: Video Understanding" data-component-part="pagination-prev" class="group flex items-center min-w-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary dark:focus-visible:outline-primary-light gap-3 rounded-sm pagination-prev" href="/docs/guides/overview/multimodal/videos"><svg viewBox="0 0 3 6" aria-hidden="true" data-component-part="pagination-chevron" class="h-1.5 shrink-0 stroke-gray-400 overflow-visible group-hover:stroke-gray-600 dark:group-hover:stroke-gray-300"><path d="M3 0L0 3L3 6" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg><div class="truncate group-hover:text-gray-900 dark:group-hover:text-white" data-component-part="pagination-title">Video Understanding</div></a><a rel="next" aria-label="Next: Management API Keys" data-component-part="pagination-next" class="group flex items-center min-w-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary dark:focus-visible:outline-primary-light gap-3 rounded-sm ml-auto pagination-next" href="/docs/guides/overview/auth/management-api-keys"><div class="truncate group-hover:text-gray-900 dark:group-hover:text-white" data-component-part="pagination-title">Management API Keys</div><svg viewBox="0 0 3 6" aria-hidden="true" data-component-part="pagination-chevron" class="h-1.5 shrink-0 stroke-gray-400 overflow-visible group-hover:stroke-gray-600 dark:group-hover:stroke-gray-300 rotate-180"><path d="M3 0L0 3L3 6" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg></a></nav><div class="left-0 right-0 sticky bottom-0 w-full overflow-hidden z-20 pointer-events-none print:hidden"><div class="chat-assistant-floating-input w-full group/assistant-bar relative before:content-[&quot;&quot;] before:absolute before:left-0 before:right-0 before:top-1/2 before:h-[200px] before:bg-transparent dark:before:bg-transparent translate-y-[100px] opacity-0"><div class="relative pb-4 sm:pb-6"><div class="flex flex-col w-full rounded-2xl pointer-events-auto bg-background-light dark:bg-background-dark border border-gray-200 dark:border-white/30 focus-within:border-primary dark:focus-within:border-primary-light transition-colors max-w-[386px] mx-auto"><div class="relative flex items-end"><textarea id="chat-assistant-textarea" aria-label="Ask a question..." autoComplete="off" placeholder="Ask a question..." class="chat-assistant-input w-full bg-transparent border-0 peer/input text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 outline-hidden! focus:outline-hidden! focus:ring-0 py-2.5 pl-3.5 pr-10 font-bodyWeight text-sm" style="resize:none"></textarea><span class="absolute right-11 bottom-3 text-xs font-medium text-gray-400 dark:text-gray-500 select-none pointer-events-none peer-focus/input:hidden hidden sm:inline">⌘<!-- -->I</span><button class="chat-assistant-send-button flex justify-center items-center rounded-full p-1 size-6 bg-primary/30 dark:bg-primary-dark/30 absolute right-2.5 bottom-2" aria-label="Send message" disabled=""><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-2.5 shrink-0 text-white dark:text-white"><path d="M9.0 1.5754L8.9999 16.4171" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.2563 8.319L8.9999 1.5754L15.7435 8.3191" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div></div></div><footer id="footer" class="flex gap-12 justify-between pt-10 border-t border-gray-100 sm:flex dark:border-gray-800/50 pb-28"></footer></div></div></main></div><!--$--><!--/$--></div><div data-assistant-sheet-container="" class="sticky shrink-0 z-22 bg-background-light dark:bg-background-dark mt-(--banner-height,0px) top-(--banner-height,0px) h-[calc(100vh-var(--banner-height,0px))] max-lg:hidden print:hidden" style="width:var(--assistant-sheet-width, 0px);overflow:hidden"><div class="absolute left-0 top-0 bottom-0 w-px z-10 cursor-col-resize after:content-[&quot;&quot;] after:absolute after:inset-y-0 after:-inset-x-2 after:select-none bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700"></div><div id="chat-assistant-sheet" class="flex flex-col overflow-hidden shrink-0 relative h-full bg-background-light dark:bg-background-dark chat-assistant-sheet" aria-hidden="true"><div class="w-full flex flex-col flex-1 min-h-0 lg:pt-3"><div class="chat-assistant-sheet-header flex items-center justify-between pb-3 px-4"><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="size-5 text-primary dark:text-primary-light shrink-0" aria-hidden="true"><path d="M5.65799 2.99L4.39499 2.569L3.97399 1.306C3.83699 0.898 3.16199 0.898 3.02499 1.306L2.60399 2.569L1.34099 2.99C1.13699 3.058 0.998993 3.249 0.998993 3.464C0.998993 3.679 1.13699 3.87 1.34099 3.938L2.60399 4.359L3.02499 5.622C3.09299 5.826 3.28499 5.964 3.49999 5.964C3.71499 5.964 3.90599 5.826 3.97499 5.622L4.39599 4.359L5.65899 3.938C5.86299 3.87 6.00099 3.679 6.00099 3.464C6.00099 3.249 5.86199 3.058 5.65799 2.99Z" fill="currentColor" stroke="none"></path><path d="M9.5 2.75L11.412 7.587L16.25 9.5L11.412 11.413L9.5 16.25L7.587 11.413L2.75 9.5L7.587 7.587L9.5 2.75Z" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg><span class="font-medium text-gray-900 dark:text-gray-100">Assistant</span></div><div class="flex items-center gap-1"><button class="group hover:bg-gray-100 dark:hover:bg-white/10 p-1.5 rounded-lg" aria-label="Maximize assistant panel"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-4 sm:size-3.5 text-gray-500 group-hover:text-gray-700 dark:group-hover:text-gray-300 shrink-0"><path d="M10.75 2.75H15.25V7.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M15.25 2.75L10.75 7.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.75 10.75V15.25H7.25" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.75 15.25L7.25 10.75" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><button class="group hover:bg-gray-100 dark:hover:bg-white/10 p-1.5 rounded-lg" aria-label="Close assistant panel"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-[20px] sm:size-4 text-gray-500 group-hover:text-gray-700 dark:group-hover:text-gray-300 shrink-0"><path d="M14 4L4 14" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M4 4L14 14" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div><div id="chat-content" class="chat-assistant-sheet-content flex flex-col-reverse flex-1 overflow-y-auto relative px-5 min-h-0"><div class="grow"></div><div class="h-full flex flex-col justify-between"><div class="mt-4 flex flex-col items-center text-sm"><div class="mx-8 text-center text-gray-400 dark:text-gray-600 text-xs chat-assistant-disclaimer-text">Responses are generated using AI and may contain mistakes.</div></div></div></div><div class="px-4 pb-4 shrink-0"><div class=""><div class="flex flex-col w-full rounded-2xl pointer-events-auto bg-background-light dark:bg-background-dark border border-gray-200 dark:border-white/30 focus-within:border-primary dark:focus-within:border-primary-light transition-colors"><div class="relative flex items-end"><textarea id="chat-assistant-textarea" aria-label="Ask a question..." autoComplete="off" placeholder="Ask a question..." class="chat-assistant-input w-full bg-transparent border-0 peer/input text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 outline-hidden! focus:outline-hidden! focus:ring-0 py-2.5 pl-3.5 pr-10 font-bodyWeight text-sm pb-0!" style="resize:none" rows="2"></textarea></div><div class="flex items-center justify-between px-2 pb-2"><input type="file" accept="image/*,.pdf,.js,.jsx,.ts,.tsx,.mjs,.cjs,.md,.mdx,.json,.html,.css,.py,.csv,.txt,.yaml,.yml,.xml,.sql,.sh,.bash,.zsh,.graphql,.gql,.toml,.env,.go,.rs,.rb,.java,.kt,.swift,.c,.cpp,.cc,.h,.hpp,.cs,.php,.dart,.lua,.r,.scala,.ini,.cfg,.conf,.log,.dockerfile,.makefile,.gitignore" multiple="" class="hidden"/><button type="button" class="p-1 rounded-lg text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-white/10" aria-label="Add attachment"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="size-3.5 shrink-0"><path d="M7.75 5V11.75C7.75 12.578 8.422 13.25 9.25 13.25C10.078 13.25 10.75 12.578 10.75 11.75V4.75C10.75 3.093 9.407 1.75 7.75 1.75C6.093 1.75 4.75 3.093 4.75 4.75V11.75C4.75 14.235 6.765 16.25 9.25 16.25C11.735 16.25 13.75 14.235 13.75 11.75V5" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button><button class="chat-assistant-send-button flex justify-center items-center rounded-full p-1 size-6 bg-primary/30 dark:bg-primary-dark/30" aria-label="Send message" disabled=""><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="size-2.5 shrink-0 text-white dark:text-white"><path d="M9.0 1.5754L8.9999 16.4171" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path><path d="M2.2563 8.319L8.9999 1.5754L15.7435 8.3191" stroke="currentColor" width="1.5" linecap="round" linejoin="round"></path></svg></button></div></div></div></div></div></div></div></div></div><script src="/docs/_next/static/chunks/6d55b684068fd47e.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n9:I[168027,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"default\"]\n:HL[\"/docs/_next/static/chunks/462bacc63bed9960.css?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"style\"]\n:HL[\"/docs/_next/static/chunks/130071cec1814339.css?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"style\"]\n:HL[\"/docs/_next/static/media/83afe278b6a6bb3c.p.3a6ba036.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/docs/_next/static/media/PaperMono_Variable.p.aa32f7a0.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/docs/_next/static/media/f67ad414ed34149c.p.84166d94.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"DJEWuMed6amFoZzQ1598Z\",\"p\":\"/docs\",\"c\":[\"\",\"_sites\",\"openrouter-d02e98a0\",\"guides\",\"overview\",\"auth\",\"oauth\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"%5Fsites\",{\"children\":[[\"subdomain\",\"openrouter-d02e98a0\",\"d\"],{\"children\":[\"(multitenant)\",{\"children\":[[\"slug\",\"guides/overview/auth/oauth\",\"oc\"],{\"children\":[\"__PAGE__\",{}]}]}]}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/docs/_next/static/chunks/462bacc63bed9960.css?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/docs/_next/static/chunks/130071cec1814339.css?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"suppressHydrationWarning\":true,\"lang\":\"en\",\"className\":\"inter_1d81deff-module__CYM0aG__variable papermono_89c757f2-module__6aS5zq__variable dark\",\"data-banner-state\":\"visible\",\"data-assistant-state\":\"closed\",\"data-page-mode\":\"none\",\"data-current-path\":\"/\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"script\",null,{\"type\":\"text/javascript\",\"dangerouslySetInnerHTML\":{\"__html\":\"!function(){var b=\\\"/docs\\\";\\nfunction a(p){if(p==null)return\\\"/\\\";p=\\\"\\\"+p;if(\\\"\\\"===p)return\\\"/\\\";return\\\"/\\\"===p.charAt(0)?p:\\\"/\\\"+p}\\nfunction u(p){if(p==null)return p;p=\\\"\\\"+p;if(!p||p.charAt(p.length-1)===\\\"/\\\")return p.slice(0,-1);return p}\\nfunction i(p){if(p==null)return p;p=\\\"\\\"+p;if(6\u003c=p.length\u0026\u0026p.substring(p.length-6)===\\\"/index\\\")return p.substring(0,p.length-6);if(\\\"index\\\"===p)return\\\"\\\";return p}\\nvar p=(location.pathname||\\\"\\\").split(\\\"?\\\")[0].split(\\\"#\\\")[0]||\\\"\\\";\\nif(b)if(p===b)p=\\\"\\\";else if(0===p.indexOf(b+\\\"/\\\"))p=p.substring(b.length);\\np=a(p);p=u(p);p=i(p);p=\\\"\\\"===p||\\\"index\\\"===p?\\\"/\\\":a(p);\\ndocument.documentElement.setAttribute(\\\"data-current-path\\\",p);\\n}();\"}}],[\"$\",\"script\",null,{\"type\":\"text/javascript\",\"dangerouslySetInnerHTML\":{\"__html\":\"!function(){\\nfunction read(){try{\\nvar e=performance.getEntriesByType?performance.getEntriesByType(\\\"navigation\\\"):[];\\nvar st=(e[0]\u0026\u0026e[0].serverTiming)||[];\\nvar g={};\\nfor(var i=0;i\u003cst.length;i++){var n=st[i].name,d=st[i].description;if(!d)continue;try{d=decodeURIComponent(d)}catch(x){}\\nif(n===\\\"country\\\")g.country=d;else if(n===\\\"region\\\")g.region=d;else if(n===\\\"continent\\\")g.continent=d;}\\nvar w=window;w.mintlify=w.mintlify||{};w.mintlify.geo=g;\\n}catch(x){}}\\nread();document.addEventListener(\\\"DOMContentLoaded\\\",read);\\n}();\"}}],[\"$\",\"script\",null,{\"type\":\"text/javascript\",\"dangerouslySetInnerHTML\":{\"__html\":\"!function(){try{\\nvar w=window;w.mintlify=w.mintlify||{};\\nvar q=w.mintlify.__apiPlaygroundInputsQueue;\\nif(!Array.isArray(q)){q=[];w.mintlify.__apiPlaygroundInputsQueue=q;}\\nw.mintlify.api=w.mintlify.api||{};\\nw.mintlify.api.playground=w.mintlify.api.playground||{};\\nif(typeof w.mintlify.api.playground.setServerVariables!==\\\"function\\\"){\\nw.mintlify.api.playground.setServerVariables=function(v){q.push({type:\\\"set\\\",variables:v});};\\n}\\nif(typeof w.mintlify.api.playground.clearServerVariables!==\\\"function\\\"){\\nw.mintlify.api.playground.clearServerVariables=function(){q.push({type:\\\"clear\\\"});};\\n}\\n}catch(e){}}();\"}}],[\"$\",\"script\",null,{\"type\":\"text/javascript\",\"dangerouslySetInnerHTML\":{\"__html\":\"(function(a,b){try{let c=document.getElementById(\\\"banner\\\")?.innerText;if(c){for(let d=0;d\u003clocalStorage.length;d++){let e=localStorage.key(d);if(e?.endsWith(a)\u0026\u0026localStorage.getItem(e)===c)return void document.documentElement.setAttribute(b,\\\"hidden\\\")}document.documentElement.setAttribute(b,\\\"visible\\\");return}for(let c=0;c\u003clocalStorage.length;c++){let d=localStorage.key(c);if(d?.endsWith(a)\u0026\u0026localStorage.getItem(d))return void document.documentElement.setAttribute(b,\\\"hidden\\\")}document.documentElement.setAttribute(b,\\\"visible\\\")}catch(a){document.documentElement.setAttribute(b,\\\"hidden\\\")}})(\\n  \\\"bannerDismissed\\\",\\n  \\\"data-banner-state\\\",\\n)\"}}],false]}],\"$L2\"]}]]}],{\"children\":[\"%5Fsites\",\"$L3\",{\"children\":[[\"subdomain\",\"openrouter-d02e98a0\",\"d\"],\"$L4\",{\"children\":[\"(multitenant)\",\"$L5\",{\"children\":[[\"slug\",\"guides/overview/auth/oauth\",\"oc\"],\"$L6\",{\"children\":[\"__PAGE__\",\"$L7\",{},null,false]},null,false]},null,false]},null,false]},null,false]},null,false],\"$L8\",false]],\"m\":\"$undefined\",\"G\":[\"$9\",[\"$La\",\"$Lb\"]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"c:I[667786,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"MintlifyApiPlaygroundInputsInit\"]\nd:I[339756,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"default\"]\ne:I[556357,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/27af74e29bec69c2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"default\"]\nf:I[837457,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"10:I[894587,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"ThemeProvider\"]\n"])</script><script>self.__next_f.push([1,"11:I[152823,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"ColorVariables\"]\n"])</script><script>self.__next_f.push([1,"12:I[531961,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"FontScript\"]\n"])</script><script>self.__next_f.push([1,"13:I[649328,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"RoundedVariables\"]\n"])</script><script>self.__next_f.push([1,"14:I[702910,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e168288d4907c254.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"RecommendedPagesList\"]\n15:I[570420,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"DataCurrentPathUpdater\"]\n16:I[341175,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/6b1866b1722b1057.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"default\"]\n19:I[897367,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"OutletBoundary\"]\n1b:I[711533,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"AsyncMetadataOutlet\"]\n1d:I[897367,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyM"])</script><script>self.__next_f.push([1,"jrsgK\"],\"ViewportBoundary\"]\n1f:I[897367,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"MetadataBoundary\"]\n20:\"$Sreact.suspense\"\n"])</script><script>self.__next_f.push([1,"2:[\"$\",\"body\",null,{\"className\":\"antialiased\",\"children\":[[\"$\",\"$Lc\",null,{}],false,[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$e\",\"errorStyles\":[],\"errorScripts\":[[\"$\",\"script\",\"script-0\",{\"src\":\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true}],[\"$\",\"script\",\"script-1\",{\"src\":\"/docs/_next/static/chunks/27af74e29bec69c2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true}],[\"$\",\"script\",\"script-2\",{\"src\":\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true}],[\"$\",\"script\",\"script-3\",{\"src\":\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true}],[\"$\",\"script\",\"script-4\",{\"src\":\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true}]],\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"$L10\",null,{\"children\":[[\"$\",\"$L11\",null,{}],[\"$\",\"$L12\",null,{}],[\"$\",\"$L13\",null,{}],[\"$\",\"style\",null,{\"children\":\":root {\\n  --primary: 17 120 102;\\n  --primary-light: 74 222 128;\\n  --primary-dark: 22 101 52;\\n  --background-light: 255 255 255;\\n  --background-dark: 15 17 23;\\n}\"}],[\"$\",\"main\",null,{\"className\":\"h-screen bg-background-light dark:bg-background-dark text-left\",\"children\":[\"$\",\"article\",null,{\"className\":\"bg-custom bg-fixed bg-center bg-cover relative flex flex-col items-center justify-center h-full\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full max-w-xl px-10\",\"children\":[[\"$\",\"span\",null,{\"className\":\"inline-flex mb-6 rounded-full px-3 py-1 text-sm font-semibold mr-4 text-white p-1 bg-primary\",\"children\":[\"Error \",404]}],[\"$\",\"h1\",null,{\"className\":\"font-semibold mb-3 text-3xl\",\"children\":\"Page not found!\"}],[\"$\",\"p\",null,{\"className\":\"text-lg text-gray-600 dark:text-gray-400 mb-6\",\"children\":\"We couldn't find the page.\"}],[\"$\",\"$L14\",null,{}]]}]}]}]]}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],false,[\"$\",\"$L15\",null,{}]]}]\n"])</script><script>self.__next_f.push([1,"3:[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]\n"])</script><script>self.__next_f.push([1,"4:[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$16\",\"errorStyles\":[],\"errorScripts\":[[\"$\",\"script\",\"script-0\",{\"src\":\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true}],[\"$\",\"script\",\"script-1\",{\"src\":\"/docs/_next/static/chunks/6b1866b1722b1057.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true}],[\"$\",\"script\",\"script-2\",{\"src\":\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true}],[\"$\",\"script\",\"script-3\",{\"src\":\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true}],[\"$\",\"script\",\"script-4\",{\"src\":\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true}]],\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"$L10\",null,{\"children\":[[\"$\",\"$L11\",null,{}],[\"$\",\"$L12\",null,{}],[\"$\",\"$L13\",null,{}],[\"$\",\"style\",null,{\"children\":\":root {\\n  --primary: 17 120 102;\\n  --primary-light: 74 222 128;\\n  --primary-dark: 22 101 52;\\n  --background-light: 255 255 255;\\n  --background-dark: 15 17 23;\\n}\"}],[\"$\",\"main\",null,{\"className\":\"h-screen bg-background-light dark:bg-background-dark text-left\",\"children\":[\"$\",\"article\",null,{\"className\":\"bg-custom bg-fixed bg-center bg-cover relative flex flex-col items-center justify-center h-full\",\"children\":[\"$\",\"div\",null,{\"className\":\"w-full max-w-xl px-10\",\"children\":[[\"$\",\"span\",null,{\"className\":\"inline-flex mb-6 rounded-full px-3 py-1 text-sm font-semibold mr-4 text-white p-1 bg-primary\",\"children\":[\"Error \",404]}],[\"$\",\"h1\",null,{\"className\":\"font-semibold mb-3 text-3xl\",\"children\":\"Page not found!\"}],[\"$\",\"p\",null,{\"className\":\"text-lg text-gray-600 dark:text-gray-400 mb-6\",\"children\":\"We couldn't find the page.\"}],[\"$\",\"$L14\",null,{}]]}]}]}]]}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]\n"])</script><script>self.__next_f.push([1,"5:[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-3\",{\"src\":\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-4\",{\"src\":\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-5\",{\"src\":\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-6\",{\"src\":\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-7\",{\"src\":\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-8\",{\"src\":\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-9\",{\"src\":\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-10\",{\"src\":\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-11\",{\"src\":\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-12\",{\"src\":\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-13\",{\"src\":\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}]],\"$L17\"]}]\n"])</script><script>self.__next_f.push([1,"6:[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]\n"])</script><script>self.__next_f.push([1,"7:[\"$\",\"$1\",\"c\",{\"children\":[\"$L18\",[[\"$\",\"script\",\"script-0\",{\"src\":\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-2\",{\"src\":\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-3\",{\"src\":\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-4\",{\"src\":\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-5\",{\"src\":\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-6\",{\"src\":\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-7\",{\"src\":\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L19\",null,{\"children\":[\"$L1a\",[\"$\",\"$L1b\",null,{\"promise\":\"$@1c\"}]]}]]}]\n"])</script><script>self.__next_f.push([1,"8:[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$L1d\",null,{\"children\":\"$L1e\"}],null],[\"$\",\"$L1f\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$20\",null,{\"fallback\":null,\"children\":\"$L21\"}]}]}]]}]\na:[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/docs/_next/static/chunks/462bacc63bed9960.css?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]\nb:[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/docs/_next/static/chunks/130071cec1814339.css?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]\n"])</script><script>self.__next_f.push([1,"1e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, viewport-fit=cover\"}]]\n1a:null\n"])</script><script>self.__next_f.push([1,"22:I[707934,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"WebMcpRegistration\"]\n"])</script><script>self.__next_f.push([1,"23:I[590280,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"LivePreviewProvider\"]\n"])</script><script>self.__next_f.push([1,"24:I[973254,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"LivePreviewFavicon\"]\n"])</script><script>self.__next_f.push([1,"25:I[479520,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"\"]\n"])</script><script>self.__next_f.push([1,"26:I[197336,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"27:I[91557,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"AuthProvider\"]\n"])</script><script>self.__next_f.push([1,"28:I[91557,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"DeploymentMetadataProvider\"]\n"])</script><script>self.__next_f.push([1,"29:I[91557,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"DocsConfigProvider\"]\n"])</script><script>self.__next_f.push([1,"17:[null,[\"$\",\"$L22\",null,{\"subdomain\":\"openrouter-d02e98a0\"}],[\"$\",\"$L23\",null,{\"isLivePreviewRoute\":false,\"children\":[[\"$\",\"$L24\",null,{}],[\"$\",\"$L10\",null,{\"appearance\":{\"default\":\"dark\"},\"codeblockTheme\":\"system\",\"children\":[[\"$\",\"blockquote\",null,{\"className\":\"sr-only\",\"data-agent-docs-index\":true,\"aria-hidden\":\"true\",\"children\":[[\"$\",\"h2\",null,{\"children\":\"Documentation Index\"}],[\"$\",\"p\",null,{\"children\":[\"Fetch the complete documentation index at:\",\" \",[\"$\",\"a\",null,{\"href\":\"/docs/llms.txt\",\"tabIndex\":-1,\"children\":\"/docs/llms.txt\"}]]}],[\"$\",\"p\",null,{\"children\":\"Use this file to discover all available pages before exploring further.\"}]]}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root{--banner-height:0px!important}\"}}],false,null,null,[\"$\",\"$L25\",null,{\"id\":\"_mintlify-banner-script\",\"strategy\":\"beforeInteractive\",\"dangerouslySetInnerHTML\":{\"__html\":\"(function j(a,b,c,d,e){try{let f,g,h=[];try{h=window.location.pathname.split(\\\"/\\\").filter(a=\u003e\\\"\\\"!==a\u0026\u0026\\\"global\\\"!==a).slice(0,2)}catch{h=[]}let i=h.find(a=\u003ec.includes(a)),j=[];for(let c of(i?j.push(i):j.push(b),j.push(\\\"global\\\"),j)){if(!c)continue;let b=a[c];if(b?.content){f=b.content,g=c;break}}if(!f)return void document.documentElement.setAttribute(d,\\\"hidden\\\");let k=!0,l=0;for(;l\u003clocalStorage.length;){let a=localStorage.key(l);if(l++,!a?.endsWith(e))continue;let b=localStorage.getItem(a);if(b\u0026\u0026b===f){k=!1;break}g\u0026\u0026(a.startsWith(`lang:${g}_`)||!a.startsWith(\\\"lang:\\\"))\u0026\u0026(localStorage.removeItem(a),l--)}document.documentElement.setAttribute(d,k?\\\"visible\\\":\\\"hidden\\\")}catch(a){console.error(a),document.documentElement.setAttribute(d,\\\"hidden\\\")}})(\\n  {},\\n  \\\"en\\\",\\n  [],\\n  \\\"data-banner-state\\\",\\n  \\\"bannerDismissed\\\",\\n)\"}}],[\"$\",\"$L26\",null,{\"appId\":\"$undefined\",\"autoBoot\":true,\"children\":[\"$\",\"$L27\",null,{\"value\":{\"auth\":\"$undefined\",\"userAuth\":\"$undefined\"},\"children\":[\"$\",\"$L28\",null,{\"value\":{\"subdomain\":\"openrouter-d02e98a0\",\"actualSubdomain\":\"openrouter-d02e98a0\",\"gitSource\":{\"type\":\"github\",\"owner\":\"openrouterteam\",\"repo\":\"docs\",\"deployBranch\":\"main\",\"contentDirectory\":\"\",\"isPrivate\":false,\"mountPath\":\"\",\"label\":\"\"},\"chroma\":{\"collectionId\":\"a17f8b9e-68f0-4fac-856d-68231244e4e4\",\"liveDeploymentHistoryId\":\"6a875d9c1fbed0910bb6b764\",\"schemaVersion\":\"v3\",\"latestBuiltDeploymentHistoryId\":\"6a875d9c1fbed0910bb6b764\"},\"feedback\":{\"contextualFeedback\":{\"allowEmail\":false},\"agentFeedback\":true,\"issues\":false},\"entitlements\":{\"AI_CHAT\":{\"status\":\"ENABLED\"},\"REMOVE_BRANDING\":{\"status\":\"ENABLED\"},\"CONTEXTUAL_FEEDBACK\":{\"status\":\"ENABLED\"},\"CODE_SNIPPET_FEEDBACK\":{\"status\":\"ENABLED\"}},\"buildId\":\"6a8799a5798e682b30d8e238\",\"clientVersion\":\"0.0.3482\",\"preview\":\"$undefined\",\"searchFilterCounts\":[{\"language\":\"default\",\"tag\":\"API Reference\",\"count\":216},{\"language\":\"default\",\"tag\":\"Docs\",\"count\":121},{\"language\":\"default\",\"tag\":\"Client SDKs\",\"count\":90},{\"language\":\"default\",\"tag\":\"Features\",\"count\":56},{\"language\":\"default\",\"tag\":\"TypeScript SDK\",\"count\":46},{\"language\":\"default\",\"tag\":\"Cookbook\",\"count\":46},{\"language\":\"default\",\"tag\":\"Agent SDK\",\"count\":39},{\"language\":\"default\",\"tag\":\"Go SDK\",\"count\":29},{\"language\":\"default\",\"tag\":\"Python SDK\",\"count\":29},{\"language\":\"default\",\"tag\":\"Overview\",\"count\":20}],\"searchSettings\":\"$undefined\",\"disableKonamiCode\":\"$undefined\"},\"children\":[\"$\",\"$L29\",null,{\"value\":{\"docsConfig\":{\"theme\":\"mint\",\"$schema\":\"https://mintlify.com/docs.json\",\"name\":\"OpenRouter | Documentation\",\"colors\":{\"primary\":\"#7624F4\",\"light\":\"#7624F4\",\"dark\":\"#C8FF00\"},\"logo\":{\"light\":\"https://mintcdn.com/openrouter-d02e98a0/ksNSeB_K7gD-BUDh/assets/logo-v2-light.svg?fit=max\u0026auto=format\u0026n=ksNSeB_K7gD-BUDh\u0026q=85\u0026s=690e45873843519efe02bcbe45795dac\",\"dark\":\"https://mintcdn.com/openrouter-d02e98a0/ksNSeB_K7gD-BUDh/assets/logo-v2-dark.svg?fit=max\u0026auto=format\u0026n=ksNSeB_K7gD-BUDh\u0026q=85\u0026s=8ba2f49b11cd9839c37dd03c62537ebd\",\"href\":\"https://openrouter.ai\"},\"favicon\":\"https://mintcdn.com/openrouter-d02e98a0/n3IgkjAMQY8SgOLX/assets/favicon-v2.svg?fit=max\u0026auto=format\u0026n=n3IgkjAMQY8SgOLX\u0026q=85\u0026s=f49800815fcadee8a07dcc093051c2de\",\"appearance\":\"$17:2:props:children:1:props:appearance\",\"background\":{\"color\":{\"light\":\"#FCFCFE\",\"dark\":\"#03080A\"}},\"navbar\":{\"links\":[{\"href\":\"https://openrouter.ai/models\",\"label\":\"Models\"},{\"href\":\"https://openrouter.ai/benchmarks\",\"label\":\"Benchmarks\"},{\"href\":\"https://openrouter.ai/chat\",\"label\":\"Chat\"},{\"href\":\"https://openrouter.ai/rankings\",\"label\":\"Rankings\"},{\"href\":\"https://openrouter.ai/apps\",\"label\":\"Apps\"},{\"href\":\"https://openrouter.ai/docs\",\"label\":\"Docs\"}]},\"seo\":{\"metatags\":{\"canonical\":\"https://openrouter.ai/docs\"}},\"fonts\":{\"family\":\"Plus Jakarta Sans\",\"weight\":400},\"integrations\":{\"ga4\":{\"measurementId\":\"G-R8YZRJS2XN\"},\"posthog\":{\"apiKey\":\"phc_7ToS2jDeWBlMu4n2JoNzoA1FnArdKwFMFoHVnAqQ6O1\",\"apiHost\":\"https://us.i.posthog.com\"}},\"contextual\":{\"options\":[\"copy\",\"view\",\"chatgpt\",\"claude\",\"perplexity\"],\"display\":\"header\"},\"styling\":{\"latex\":true,\"codeblocks\":\"system\"},\"navigation\":{\"pages\":[]}},\"docsNavWithMetadata\":\"$undefined\",\"anonymizedNav\":\"$undefined\",\"hasFullNav\":false},\"children\":\"$L2a\"}]}]}]}]]}]]}]]\n"])</script><script>self.__next_f.push([1,"2b:I[604804,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"LoginButtonProvider\"]\n"])</script><script>self.__next_f.push([1,"2c:I[141180,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"SidebarLoginButtonProvider\"]\n"])</script><script>self.__next_f.push([1,"2d:I[343590,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"NavigationContextController\"]\n"])</script><script>self.__next_f.push([1,"2e:I[378486,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"PageListProvider\"]\n"])</script><script>self.__next_f.push([1,"2f:I[742977,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"PrefetchProvider\"]\n"])</script><script>self.__next_f.push([1,"30:I[237978,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"PageModeOverrideProvider\"]\n"])</script><script>self.__next_f.push([1,"31:I[378896,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"ConfiguredVariationProvider\"]\n"])</script><script>self.__next_f.push([1,"32:I[557611,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"Fonts\"]\n"])</script><script>self.__next_f.push([1,"33:I[330080,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"BannerProvider\"]\n"])</script><script>self.__next_f.push([1,"34:I[864506,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"NavbarTransitionScript\"]\n"])</script><script>self.__next_f.push([1,"35:T9e0,"])</script><script>self.__next_f.push([1,"(function () {\n  var measure = function(){let a=document.querySelectorAll(\"[id='navbar'], [data-top-chrome]\"),b=0;a.forEach(a=\u003e{let c=a.getBoundingClientRect();c.height\u003e0\u0026\u0026(b=Math.max(b,c.bottom))});let c=0,d=document.getElementById(\"content-container\");if(d){let{overflowY:a}=getComputedStyle(d);(\"auto\"===a||\"scroll\"===a)\u0026\u0026(c=Math.max(0,d.getBoundingClientRect().top))}let e=`${Math.round(Math.max(0,b-c))+40}px`,f=document.documentElement.style;f.getPropertyValue(\"--scroll-mt\")!==e\u0026\u0026f.setProperty(\"--scroll-mt\",e)};\n  (function(a){let b=[],c=0,d=\"undefined\"==typeof ResizeObserver?null:new ResizeObserver(f);function e(){let c=Array.from(document.querySelectorAll(\"[id='navbar'], [data-top-chrome]\"));(c.length!==b.length||c.some((a,c)=\u003ea!==b[c]))\u0026\u0026d\u0026\u0026(d.disconnect(),c.forEach(a=\u003ed.observe(a))),b=c,a()}function f(){c||(c=requestAnimationFrame(()=\u003e{c=0,e()}))}let g=\"[id='navbar'], [data-top-chrome]\";function h(a){let b=a.target;if(b instanceof Element\u0026\u0026b.closest(g))return!0;for(let b of a.addedNodes)if(b instanceof Element\u0026\u0026(b.matches(g)||b.querySelector(g)))return!0;for(let b of a.removedNodes)if(b instanceof Element\u0026\u0026(b.matches(g)||b.querySelector(g)))return!0;return!1}new MutationObserver(a=\u003e{a.some(h)\u0026\u0026f()}).observe(document.documentElement,{childList:!0,subtree:!0}),window.addEventListener(\"resize\",f),\"loading\"===document.readyState\u0026\u0026document.addEventListener(\"DOMContentLoaded\",e),e()})(measure);\n  (function(a){let b=window.location.hash.slice(1);if(!b)return;function c(){return\"smooth\"===getComputedStyle(document.documentElement).scrollBehavior}function d(c){let d=document.getElementById(b);return!!d\u0026\u0026(a(),d.scrollIntoView(c?{behavior:c}:void 0),!0)}if(\"complete\"===document.readyState)return void d();let e=new MutationObserver(()=\u003e{!c()\u0026\u0026d(\"instant\")\u0026\u0026f()});function f(){e.disconnect(),window.removeEventListener(\"load\",g)}function g(){let a=c();f(),a\u0026\u0026requestAnimationFrame(()=\u003e{d(),function(){let a=[\"wheel\",\"touchstart\",\"keydown\",\"pointerdown\"],c=0,e=window.scrollY,f=setInterval(()=\u003e{c+=1;let a=document.getElementById(b);if(!a||c\u003e=6)return g();let f=Math.abs(window.scrollY-e)\u003e1;if(e=window.scrollY,f)return;let h=parseFloat(getComputedStyle(a).scrollMarginTop)||0;Math.abs(a.getBoundingClientRect().top-h)\u003e4\u0026\u0026d()},350);function g(){clearInterval(f),a.forEach(a=\u003ewindow.removeEventListener(a,g))}a.forEach(a=\u003ewindow.addEventListener(a,g,{passive:!0}))}()})}window.addEventListener(\"load\",g),e.observe(document.documentElement,{childList:!0,subtree:!0}),!c()\u0026\u0026d(\"instant\")\u0026\u0026f()})(measure);\n})();"])</script><script>self.__next_f.push([1,"2a:[\"$\",\"$L2b\",null,{\"children\":[\"$\",\"$L2c\",null,{\"children\":[\"$\",\"$L2d\",null,{\"children\":[\"$\",\"$L2e\",null,{\"pageListDataMap\":{},\"children\":[\"$\",\"$L2f\",null,{\"disabled\":\"$undefined\",\"children\":[\"$\",\"$L30\",null,{\"children\":[\"$\",\"$L31\",null,{\"children\":[[\"$\",\"$L12\",null,{\"fonts\":\"$17:2:props:children:1:props:children:6:props:children:props:children:props:children:props:value:docsConfig:fonts\",\"theme\":\"mint\",\"subdomain\":\"openrouter-d02e98a0\"}],[[\"$\",\"$L11\",null,{\"docsConfig\":\"$17:2:props:children:1:props:children:6:props:children:props:children:props:children:props:value:docsConfig\"}],[[\"$\",\"link\",null,{\"rel\":\"preload\",\"href\":\"https://d4tuoctqmanu0.cloudfront.net/katex.min.css\",\"as\":\"style\"}],[\"$\",\"script\",null,{\"type\":\"text/javascript\",\"children\":\"\\n          (function() {\\n            function loadKatex() {\\n              const link = document.querySelector('link[href=\\\"https://d4tuoctqmanu0.cloudfront.net/katex.min.css\\\"]');\\n              if (link) link.rel = 'stylesheet';\\n            }\\n            if (document.readyState === 'loading') {\\n              document.addEventListener('DOMContentLoaded', loadKatex);\\n            } else {\\n              loadKatex();\\n            }\\n          })();\\n        \"}]],[\"$\",\"$L13\",null,{\"theme\":\"mint\"}],[\"$\",\"$L32\",null,{\"fonts\":\"$17:2:props:children:1:props:children:6:props:children:props:children:props:children:props:value:docsConfig:fonts\",\"children\":[\"$\",\"$L33\",null,{\"bannersByLocale\":{},\"subdomain\":\"openrouter-d02e98a0\",\"children\":[[\"$\",\"$L34\",null,{\"theme\":\"mint\"}],[\"$\",\"$L25\",null,{\"strategy\":\"beforeInteractive\",\"id\":\"_mintlify-scroll-margin-script\",\"dangerouslySetInnerHTML\":{\"__html\":\"$35\"},\"suppressHydrationWarning\":true}],\"$L36\"]}]}]]]}]}]}]}]}]}]}]\n"])</script><script>self.__next_f.push([1,"37:I[540345,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"ConsentProvider\"]\n"])</script><script>self.__next_f.push([1,"38:I[529058,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"LocalStorageAndAnalyticsProviders\"]\n"])</script><script>self.__next_f.push([1,"39:I[958547,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"36:[\"$\",\"$L37\",null,{\"privacy\":\"$undefined\",\"children\":[\"$\",\"$L38\",null,{\"subdomain\":\"openrouter-d02e98a0\",\"isAtlas\":false,\"children\":[\"$\",\"$L39\",null,{\"toggles\":[{\"name\":\"tiered-billing\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"editor-profile-v2\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"dashboard-editor-theseus\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"self-serve-sso\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"force-workflows-vercel-harness\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"kill-isr\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"autumn-billing-mar-2026\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"cloudflare-cache-invalidation\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"workflows-vercel-harness\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"gitlab-workflows\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"autopilot-dashboard\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"live-preview-client\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"direct-chroma-search\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"mintlify-credits-autumn-apr-2026\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"agent_harness_kb\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"agent-page\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"dashboard-auth-revamp\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"client-credentials-grant\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"agent_harness_slack_agent\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"workflows-v2\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"assistant-integrations\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"dashboard-comments\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"workflows-in-onboarding\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"viewer-role\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"agent-panel\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"autumn-enforcement-mar-2026\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"autumn-webhooks-mar-2026\",\"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\":\"workflows-onboarding\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"editor-v7-file-tree\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"atlas-vercel-harness\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"onboarding-vercel-harness\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"refresh-token-auth-mcp\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"use-run-task-generate-docs-phase-queue\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"per-tenant-auth\",\"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\":\"per-tenant-auth-mcp\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"async-editor-publish\",\"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\":\"pause-preview-search-indexing\",\"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\":\"composio-integrations\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"zendesk-integration\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"process-on-consumer\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"workflows-run-detail-page\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"credits-v2-jul-2026\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"call-agent-tool\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"pylon-integration\",\"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\":\"queue-git-webhooks-produce\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"slack-agent-chat-sdk\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"org-credit-pool-jul-2026\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"preview-search-indexing\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"pause-universal-search-reconcile\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"editor-version-history\",\"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\":\"editor-branches-v2-autocommit\",\"enabled\":true,\"variant\":{\"name\":\"disabled\",\"enabled\":false,\"feature_enabled\":true},\"impressionData\":false},{\"name\":\"editor-branches-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}],\"children\":\"$L3a\"}]}]}]\n"])</script><script>self.__next_f.push([1,"3b:I[604780,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"CaptchaProvider\"]\n"])</script><script>self.__next_f.push([1,"3c:I[601054,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"SearchProvider\"]\n"])</script><script>self.__next_f.push([1,"3d:I[28330,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"SkipToContent\"]\n"])</script><script>self.__next_f.push([1,"3e:I[87732,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"AssistantLayoutWrapper\"]\n"])</script><script>self.__next_f.push([1,"3f:I[118717,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/746594ec3bf27705.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"NotFoundHydrator\"]\n"])</script><script>self.__next_f.push([1,"3a:[\"$\",\"$L3b\",null,{\"enabled\":true,\"isPreview\":false,\"children\":[\"$\",\"$L3c\",null,{\"subdomain\":\"openrouter-d02e98a0\",\"hasChatPermissions\":true,\"isLoggedInCli\":false,\"assistantConfig\":{\"enableAskAiButton\":false,\"enableStarterQuestions\":false,\"enableContextualStarterQuestions\":false,\"enableAskAiSearchBar\":true},\"starterQuestions\":\"$undefined\",\"children\":[[\"$\",\"$L3d\",null,{}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function i(a,b,c,d){try{if(window.matchMedia(\\\"(max-width: 1024px)\\\").matches||!d){document.documentElement.style.setProperty(c,\\\"0px\\\"),document.documentElement.setAttribute(\\\"data-assistant-state\\\",\\\"closed\\\"),d||localStorage.setItem(a,\\\"false\\\");return}let e=localStorage.getItem(a);if(null===e){document.documentElement.style.setProperty(c,\\\"0px\\\"),document.documentElement.setAttribute(\\\"data-assistant-state\\\",\\\"closed\\\");return}let f=JSON.parse(e),g=localStorage.getItem(b),h=null!==g?JSON.parse(g):368;document.documentElement.style.setProperty(c,f?h+\\\"px\\\":\\\"0px\\\"),document.documentElement.setAttribute(\\\"data-assistant-state\\\",f?\\\"open\\\":\\\"closed\\\")}catch(a){document.documentElement.style.setProperty(c,\\\"0px\\\"),document.documentElement.setAttribute(\\\"data-assistant-state\\\",\\\"closed\\\")}})(\\n    \\\"chat-assistant-sheet-open\\\",\\n    \\\"chat-assistant-sheet-width\\\",\\n    \\\"--assistant-sheet-width\\\",\\n    true\\n  )\"}}],false,[\"$\",\"$L3e\",null,{\"children\":[[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lf\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"$L3f\",null,{\"source\":\"multitenant\"}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],\"$undefined\"]}]]}]}]\n"])</script><script>self.__next_f.push([1,"43:I[597003,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"ScopedNavProvider\"]\n"])</script><script>self.__next_f.push([1,"1c:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"OAuth PKCE - Secure User Authentication\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Connect your users to OpenRouter\"}],[\"$\",\"meta\",\"2\",{\"name\":\"application-name\",\"content\":\"OpenRouter | Documentation\"}],[\"$\",\"meta\",\"3\",{\"name\":\"generator\",\"content\":\"Mintlify\"}],[\"$\",\"meta\",\"4\",{\"name\":\"msapplication-config\",\"content\":\"/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/browserconfig.xml\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"OpenRouter | Documentation\"}],[\"$\",\"meta\",\"6\",{\"name\":\"msapplication-TileColor\",\"content\":\"#7624F4\"}],[\"$\",\"link\",\"7\",{\"rel\":\"canonical\",\"href\":\"https://openrouter.ai/docs/guides/overview/auth/oauth\"}],[\"$\",\"link\",\"8\",{\"rel\":\"alternate\",\"type\":\"application/xml\",\"href\":\"/docs/sitemap.xml\"}],[\"$\",\"link\",\"9\",{\"rel\":\"alternate\",\"type\":\"text/markdown\",\"href\":\"/docs/guides/overview/auth/oauth.md\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:title\",\"content\":\"OAuth PKCE - Secure User Authentication\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:description\",\"content\":\"Implement secure user authentication with OpenRouter using OAuth PKCE. Complete guide to setting up and managing OAuth authentication flows.\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:url\",\"content\":\"https://openrouter.ai/docs/guides/overview/auth/oauth\"}],[\"$\",\"meta\",\"13\",{\"property\":\"og:site_name\",\"content\":\"OpenRouter Documentation\"}],[\"$\",\"meta\",\"14\",{\"property\":\"og:image\",\"content\":\"https://openrouter.ai/dynamic-og?pathname=use-cases/oauth-pkce\u0026title=OAuth%20PKCE\u0026description=Secure%20one-click%20authentication%20for%20your%20OpenRouter%20users\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"16\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"17\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"18\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"19\",{\"name\":\"twitter:title\",\"content\":\"OAuth PKCE - Secure User Authentication\"}],[\"$\",\"meta\",\"20\",{\"name\":\"twitter:description\",\"content\":\"Implement secure user authentication with OpenRouter using OAuth PKCE. Complete guide to setting up and managing OAuth authentication flows.\"}],[\"$\",\"meta\",\"21\",{\"name\":\"twitter:image\",\"content\":\"https://openrouter.ai/dynamic-og?pathname=use-cases/oauth-pkce\u0026title=OAuth%20PKCE\u0026description=Secure%20one-click%20authentication%20for%20your%20OpenRouter%20users\"}],[\"$\",\"meta\",\"22\",{\"name\":\"twitter:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"23\",{\"name\":\"twitter:image:height\",\"content\":\"630\"}],[\"$\",\"link\",\"24\",{\"rel\":\"icon\",\"href\":\"/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/android-chrome-192x192.png\",\"type\":\"image/png\",\"sizes\":\"192x192\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"link\",\"25\",{\"rel\":\"apple-touch-icon\",\"href\":\"/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/apple-touch-icon.png\",\"type\":\"image/png\",\"sizes\":\"180x180\",\"media\":\"$undefined\"}],[\"$\",\"link\",\"26\",{\"rel\":\"icon\",\"href\":\"/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/favicon-16x16.png\",\"type\":\"image/png\",\"sizes\":\"16x16\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"link\",\"27\",{\"rel\":\"icon\",\"href\":\"/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/favicon-32x32.png\",\"type\":\"image/png\",\"sizes\":\"32x32\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"link\",\"28\",{\"rel\":\"shortcut icon\",\"href\":\"/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"$undefined\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"link\",\"29\",{\"rel\":\"icon\",\"href\":\"/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon-dark/android-chrome-192x192.png\",\"type\":\"image/png\",\"sizes\":\"192x192\",\"media\":\"(prefers-color-scheme: dark)\"}],[\"$\",\"link\",\"30\",{\"rel\":\"icon\",\"href\":\"/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon-dark/favicon-16x16.png\",\"type\":\"image/png\",\"sizes\":\"16x16\",\"media\":\"(prefers-color-scheme: dark)\"}],\"$L40\",\"$L41\",\"$L42\"],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"21:\"$1c:metadata\"\n"])</script><script>self.__next_f.push([1,"18:[\"$\",\"$L43\",null,{\"scopedNav\":{\"global\":null,\"tabs\":[{\"tab\":\"Docs\",\"icon\":\"book\",\"groups\":[{\"group\":\"Overview\",\"icon\":\"compass\",\"pages\":[{\"title\":\"Quickstart\",\"description\":\"Get started with OpenRouter\",\"slug\":\"quickstart\",\"seoTitle\":\"OpenRouter Quickstart Guide | Developer Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter Quickstart Guide\",\"og:description\":\"Get started with OpenRouter's unified API for hundreds of AI models. Learn how to integrate using the API directly, the Client SDKs, or the Agent SDK.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=quickstart\u0026title=Quick%20Start\u0026description=Start%20using%20OpenRouter%20API%20in%20minutes%20with%20any%20SDK\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"rocket\",\"href\":\"/quickstart\"},{\"title\":\"Batch API Quickstart\",\"sidebarTitle\":\"Batch\",\"description\":\"Submit and retrieve asynchronous batches of inference requests\",\"slug\":\"batch-quickstart\",\"seoTitle\":\"Batch API Quickstart | OpenRouter Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Batch API Quickstart\",\"og:description\":\"Submit multiple inference requests with OpenRouter and retrieve their results asynchronously.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=batch-quickstart\u0026title=Batch%20API%20Quickstart\u0026description=Submit%20and%20retrieve%20asynchronous%20batches%20of%20inference%20requests\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"boxes-stacked\",\"tag\":\"Beta\",\"href\":\"/batch-quickstart\"},{\"title\":\"Principles\",\"description\":\"Core principles and values of OpenRouter\",\"seoTitle\":\"Principles | OpenRouter's Core Values and Mission\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Principles - OpenRouter's Core Values\",\"og:description\":\"Learn about OpenRouter's guiding principles and mission. Understand our commitment to price optimization, standardized APIs, and high availability in AI model deployment.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=principles\u0026title=Core%20Values\u0026description=Multi-model%20AI%20access%20with%20optimized%20pricing%20and%20reliability\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"book\",\"href\":\"/guides/overview/principles\"},{\"title\":\"Models\",\"description\":\"One API for hundreds of models\",\"seoTitle\":\"OpenRouter Models | Access 400+ AI Models Through One API\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter Models - Unified Access to 400+ AI Models\",\"og:description\":\"Access all major language models (LLMs) through OpenRouter's unified API. Browse available models, compare capabilities, and integrate with your preferred provider.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=models\u0026title=AI%20Model%20Hub\u0026description=Access%20all%20LLMs%20through%20one%20unified%20API%20endpoint\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"cube\",\"href\":\"/guides/overview/models\"},{\"title\":\"MCP\",\"description\":\"Connect your AI coding tools to OpenRouter over MCP\",\"seoTitle\":\"OpenRouter MCP Server | OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter MCP Server - OpenRouter\",\"og:description\":\"Plug OpenRouter into the AI tools you already use. Pull live model, pricing, credit, and ranking data, search the docs, and send test messages, all from your editor.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=OpenRouter%20MCP%20Server\u0026description=Connect%20your%20AI%20tools%20to%20OpenRouter\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"plug\",\"href\":\"/guides/overview/mcp-server\"},{\"group\":\"Multimodal\",\"icon\":\"layer-group\",\"pages\":[{\"title\":\"Multimodal Capabilities\",\"description\":\"Send images, PDFs, audio, and video to OpenRouter models, generate speech from text, or transcribe audio to text\",\"seoTitle\":\"OpenRouter Multimodal | Complete Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter Multimodal Capabilities - Complete Documentation\",\"og:description\":\"Send images, PDFs, audio, and video to OpenRouter models, generate speech from text, or transcribe audio to text through our unified API.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=OpenRouter%20Multimodal\u0026description=Send%20images%2C%20PDFs%2C%20audio%2C%20and%20video%20to%20OpenRouter%20models%2C%20or%20generate%20speech%20from%20text.\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"compass\",\"sidebarTitle\":\"Overview\",\"href\":\"/guides/overview/multimodal/overview\"},{\"title\":\"Image Generation\",\"description\":\"How to generate images with OpenRouter's dedicated Image API\",\"seoTitle\":\"OpenRouter Image Generation | Complete Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter Image Generation - Complete Documentation\",\"og:description\":\"Generate images using AI models through the OpenRouter Image API.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=OpenRouter%20Image%20Generation\u0026description=Generate%20images%20using%20AI%20models%20through%20the%20OpenRouter%20Image%20API.\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"wand-magic-sparkles\",\"href\":\"/guides/overview/multimodal/image-generation\"},{\"title\":\"Video Generation\",\"description\":\"How to generate videos with OpenRouter models\",\"seoTitle\":\"OpenRouter Video Generation | Complete Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter Video Generation - Complete Documentation\",\"og:description\":\"Generate videos using AI models through the OpenRouter API.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=OpenRouter%20Video%20Generation\u0026description=Generate%20videos%20using%20AI%20models%20through%20the%20OpenRouter%20API.\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"film\",\"href\":\"/guides/overview/multimodal/video-generation\"},{\"title\":\"Text-to-Speech\",\"description\":\"How to generate speech audio from text with OpenRouter models\",\"seoTitle\":\"OpenRouter Text-to-Speech (TTS) | Complete Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter Text-to-Speech - Complete Documentation\",\"og:description\":\"Generate speech audio from text using AI models through the OpenRouter API.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=OpenRouter%20Text-to-Speech\u0026description=Generate%20speech%20audio%20from%20text%20using%20AI%20models%20through%20the%20OpenRouter%20API.\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"microphone\",\"href\":\"/guides/overview/multimodal/tts\"},{\"title\":\"Speech-to-Text\",\"description\":\"How to transcribe audio into text with OpenRouter models\",\"seoTitle\":\"OpenRouter Speech-to-Text (STT) | Complete Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter Speech-to-Text - Complete Documentation\",\"og:description\":\"Transcribe audio into text using AI models through the OpenRouter API. Access multiple STT providers with a single unified interface.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=OpenRouter%20Speech-to-Text\u0026description=Transcribe%20audio%20into%20text%20using%20AI%20models%20through%20the%20OpenRouter%20API.\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"headset\",\"href\":\"/guides/overview/multimodal/stt\"},{\"title\":\"Audio\",\"description\":\"How to send and receive audio with OpenRouter models\",\"seoTitle\":\"OpenRouter Audio | Complete Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter Audio - Complete Documentation\",\"og:description\":\"Send audio files to and receive audio responses from speech-capable models through the OpenRouter API.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=OpenRouter%20Audio\u0026description=Send%20and%20receive%20audio%20with%20speech-capable%20models%20through%20the%20OpenRouter%20API.\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"volume-high\",\"href\":\"/guides/overview/multimodal/audio\"},{\"title\":\"PDF Inputs\",\"description\":\"How to send PDFs to OpenRouter models\",\"seoTitle\":\"OpenRouter PDF Inputs | Complete Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter PDF Inputs - Complete Documentation\",\"og:description\":\"Send PDF documents to any model on OpenRouter.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=OpenRouter%20PDF%20Inputs\u0026description=Send%20PDF%20documents%20to%20any%20model%20on%20OpenRouter.\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"file-pdf\",\"sidebarTitle\":\"PDFs\",\"href\":\"/guides/overview/multimodal/pdfs\"},{\"title\":\"Image Inputs\",\"description\":\"How to send images to OpenRouter models\",\"seoTitle\":\"OpenRouter Image Inputs | Complete Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter Image Inputs - Complete Documentation\",\"og:description\":\"Send images to vision models through the OpenRouter API.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=OpenRouter%20Image%20Inputs\u0026description=Send%20images%20to%20vision%20models%20through%20the%20OpenRouter%20API.\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"image\",\"sidebarTitle\":\"Image Understanding\",\"href\":\"/guides/overview/multimodal/image-understanding\"},{\"title\":\"Video Inputs\",\"description\":\"How to send video files to OpenRouter models\",\"seoTitle\":\"OpenRouter Video Inputs | Complete Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter Video Inputs - Complete Documentation\",\"og:description\":\"Send video files to video-capable models through the OpenRouter API.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=OpenRouter%20Video%20Inputs\u0026description=Send%20video%20files%20to%20video-capable%20models%20through%20the%20OpenRouter%20API.\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"video\",\"sidebarTitle\":\"Video Understanding\",\"href\":\"/guides/overview/multimodal/videos\"}]},{\"group\":\"Authentication\",\"icon\":\"shield-check\",\"pages\":[{\"title\":\"OAuth PKCE\",\"description\":\"Connect your users to OpenRouter\",\"seoTitle\":\"OAuth PKCE | Secure Authentication for OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OAuth PKCE - Secure User Authentication\",\"og:description\":\"Implement secure user authentication with OpenRouter using OAuth PKCE. Complete guide to setting up and managing OAuth authentication flows.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=use-cases/oauth-pkce\u0026title=OAuth%20PKCE\u0026description=Secure%20one-click%20authentication%20for%20your%20OpenRouter%20users\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"shield-check\",\"sidebarTitle\":\"OAuth\",\"href\":\"/guides/overview/auth/oauth\"},{\"title\":\"Management API Keys\",\"description\":\"Manage API keys programmatically\",\"seoTitle\":\"Management API Keys | Programmatic Control of OpenRouter API Keys\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Management API Keys - Programmatic Control of OpenRouter API Keys\",\"og:description\":\"Manage OpenRouter API keys programmatically through dedicated management endpoints. Create, read, update, and delete API keys for automated key distribution and control.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=features/management-api-keys\u0026title=Management%20API%20Keys\u0026description=Programmatically%20manage%20OpenRouter%20API%20keys\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"key\",\"href\":\"/guides/overview/auth/management-api-keys\"},{\"title\":\"BYOK\",\"description\":\"Bring your own provider API keys\",\"seoTitle\":\"BYOK | Use Your Own Provider Keys with OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"BYOK - Bring Your Own Keys to OpenRouter\",\"og:description\":\"Learn how to use your existing AI provider keys with OpenRouter. Integrate your own API keys while using OpenRouter's unified interface and features.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=BYOK\u0026description=Bring%20Your%20Own%20Keys%20to%20OpenRouter\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"key\",\"href\":\"/guides/overview/auth/byok\"}]},{\"title\":\"Stripe Projects\",\"description\":\"Add OpenRouter to your app with the Stripe Projects CLI\",\"seoTitle\":\"Stripe Projects Integration | OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Stripe Projects - Add OpenRouter via Stripe CLI\",\"og:description\":\"Provision OpenRouter API access directly from the Stripe Projects CLI. Get an API key, manage credentials, and access 400+ AI models in seconds.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Stripe%20Projects\u0026description=Add%20OpenRouter%20to%20your%20app%20via%20Stripe%20CLI\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"stripe\",\"href\":\"/guides/overview/stripe-projects\"},{\"title\":\"Frequently Asked Questions\",\"description\":\"Common questions about OpenRouter\",\"slug\":\"faq\",\"seoTitle\":\"OpenRouter FAQ | Developer Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter FAQ\",\"og:description\":\"Find answers to commonly asked questions about OpenRouter's unified API, model access, pricing, and integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=faq\u0026title=FAQ\u0026description=Common%20questions%20about%20OpenRouter\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"question\",\"sidebarTitle\":\"FAQ\",\"href\":\"/faq\"},{\"title\":\"Report Feedback\",\"seoTitle\":\"Report Feedback | Submit Bug Reports on OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Report Feedback - Submit Bug Reports for Generations\",\"og:description\":\"Learn how to report issues with AI generations on OpenRouter using the Report Feedback feature in the Chatroom and Logs page.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Report%20Feedback\u0026description=Submit%20bug%20reports%20for%20generations\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"bug\",\"description\":null,\"href\":\"/guides/overview/report-feedback\"}]},{\"group\":\"Models \u0026 Routing\",\"icon\":\"route\",\"pages\":[{\"title\":\"Model Fallbacks\",\"description\":\"Automatic failover between models\",\"seoTitle\":\"Model Fallbacks | Reliable AI with Automatic Failover\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Model Fallbacks - Automatic Failover Between Models\",\"og:description\":\"Configure automatic failover between AI models when providers are down, rate-limited, or refuse requests.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Model%20Fallbacks\u0026description=Automatic%20failover%20between%20AI%20models\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"arrows-rotate\",\"href\":\"/guides/routing/model-fallbacks\"},{\"title\":\"Provider Routing\",\"description\":\"Route requests to the best provider\",\"seoTitle\":\"Provider Routing | Intelligent Multi-Provider Request Routing\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Provider Routing - Smart Multi-Provider Request Management\",\"og:description\":\"Route AI model requests across multiple providers intelligently. Learn how to optimize for cost, performance, and reliability with OpenRouter's provider routing.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=features/provider-routing\u0026title=Smart%20Routing\u0026description=Optimize%20AI%20requests%20across%20providers%20for%20best%20performance\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"network-wired\",\"sidebarTitle\":\"Provider Selection\",\"href\":\"/guides/routing/provider-selection\"},{\"title\":\"Auto Exacto\",\"description\":\"Automatic tool-calling provider optimization\",\"seoTitle\":\"Auto Exacto | Smarter provider routing for tool-calling requests\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Auto Exacto - Automatic tool-calling provider optimization\",\"og:description\":\"Learn how Auto Exacto automatically optimizes provider ordering for tool-calling requests using throughput, success rate, and benchmark signals.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Auto%20Exacto\u0026description=Automatic%20tool-calling%20provider%20optimization\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"crosshairs\",\"href\":\"/guides/routing/auto-exacto\"},{\"title\":\"Private Models\",\"description\":\"Bring your own model to OpenRouter, scoped to approved users and organizations\",\"seoTitle\":\"Private Models | Private Endpoints on OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Private Models - Bring Your Own Model Endpoints to OpenRouter\",\"og:description\":\"Run your own custom, fine-tuned, or dedicated model deployments through the OpenRouter API. Private models are scoped to approved users and organizations and hidden from public model lists.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Private%20Models\u0026description=Bring%20your%20own%20model%20endpoints%20to%20OpenRouter\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"lock\",\"href\":\"/guides/routing/private-models\"},{\"group\":\"Model Variants\",\"icon\":\"gem\",\"pages\":[{\"title\":\"Free Variant\",\"description\":\"Access free models with the :free variant\",\"seoTitle\":\"Free Variant | Free Model Access\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Free Variant - Free Model Access\",\"og:description\":\"Access free models using the :free variant suffix.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Free%20Variant\u0026description=Free%20model%20access\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"circle-dollar\",\"sidebarTitle\":\"Free\",\"href\":\"/guides/routing/model-variants/free\"},{\"title\":\"Extended Variant\",\"description\":\"Extended context windows with :extended\",\"seoTitle\":\"Extended Variant | Extended Context Windows\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Extended Variant - Extended Context Windows\",\"og:description\":\"Access extended context window versions of models using the :extended variant.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Extended%20Variant\u0026description=Extended%20context%20windows\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"arrows-left-right\",\"sidebarTitle\":\"Extended\",\"href\":\"/guides/routing/model-variants/extended\"},{\"title\":\"Exacto Variant\",\"description\":\"Route requests with quality-first provider sorting\",\"seoTitle\":\"Exacto Variant | Quality-first provider routing for tool use\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Exacto Variant - Quality-first provider routing for tool use\",\"og:description\":\"Learn how to use the :exacto model variant to prioritize providers with stronger tool-calling quality signals.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Exacto%20Variant\u0026description=Quality-first%20provider%20routing\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"gem\",\"sidebarTitle\":\"Exacto\",\"href\":\"/guides/routing/model-variants/exacto\"},{\"title\":\"Thinking Variant\",\"description\":\"Enable extended reasoning with :thinking\",\"seoTitle\":\"Thinking Variant | Extended Reasoning\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Thinking Variant - Extended Reasoning\",\"og:description\":\"Enable extended reasoning capabilities using the :thinking variant.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Thinking%20Variant\u0026description=Extended%20reasoning\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"brain\",\"sidebarTitle\":\"Thinking\",\"href\":\"/guides/routing/model-variants/thinking\"},{\"title\":\"Online Variant\",\"description\":\"Real-time web search with :online\",\"seoTitle\":\"Online Variant | Real-Time Web Search\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Online Variant - Real-Time Web Search\",\"og:description\":\"Enable real-time web search capabilities using the :online variant.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Online%20Variant\u0026description=Real-time%20web%20search\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"globe-pointer\",\"sidebarTitle\":\"Online\",\"href\":\"/guides/routing/model-variants/online\"},{\"title\":\"Nitro Variant\",\"description\":\"High-speed model inference with :nitro\",\"seoTitle\":\"Nitro Variant | High-Speed Inference\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Nitro Variant - High-Speed Inference\",\"og:description\":\"Access high-speed model inference using the :nitro variant.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Nitro%20Variant\u0026description=High-speed%20inference\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"bolt\",\"sidebarTitle\":\"Nitro\",\"href\":\"/guides/routing/model-variants/nitro\"},{\"title\":\"Floor Variant\",\"description\":\"Lowest-cost model inference with :floor\",\"seoTitle\":\"Floor Variant | Lowest-Cost Inference\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Floor Variant - Lowest-Cost Inference\",\"og:description\":\"Access the cheapest available inference using the :floor variant.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Floor%20Variant\u0026description=Lowest-cost%20inference\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"arrow-down-to-line\",\"sidebarTitle\":\"Floor\",\"href\":\"/guides/routing/model-variants/floor\"}]},{\"group\":\"Routers\",\"icon\":\"robot\",\"pages\":[{\"title\":\"Auto Router\",\"description\":\"Automatically select the best model for your prompt\",\"seoTitle\":\"Auto Router | Smart AI Model Selection\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Auto Router - Intelligent Model Selection\",\"og:description\":\"Automatically select the best AI model for your prompts using OpenRouter's Auto Router, powered by the wisdom of the market.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Auto%20Router\u0026description=Intelligent%20AI%20model%20selection\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"icon\":\"wand-magic-sparkles\",\"href\":\"/guides/routing/routers/auto-router\"},{\"title\":\"Body Builder\",\"description\":\"Generate multiple parallel API requests from natural language\",\"seoTitle\":\"Body Builder | Multi-Model Request Generation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Body Builder - Generate Parallel API Requests\",\"og:description\":\"Use natural language to generate multiple OpenRouter API requests for parallel model execution.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Body%20Builder\u0026description=Multi-model%20request%20generation\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"icon\":\"hammer\",\"href\":\"/guides/routing/routers/body-builder\"},{\"title\":\"Free Models Router\",\"description\":\"Get free AI inference by routing to available free models\",\"seoTitle\":\"Free Models Router | Zero-Cost AI Inference\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Free Models Router - Zero-Cost AI Inference\",\"og:description\":\"Route requests to free AI models automatically using OpenRouter's Free Models Router.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Free%20Models%20Router\u0026description=Zero-cost%20AI%20inference\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"icon\":\"gift\",\"href\":\"/guides/routing/routers/free-router\"},{\"title\":\"Latest Model Resolution\",\"description\":\"Always target the newest version of a model family with a single slug\",\"seoTitle\":\"Latest Model Resolution | Stay on the Freshest Version Automatically\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Latest Model Resolution - Always Target the Newest Version\",\"og:description\":\"Use ~author/family-latest slugs to automatically route to the newest model in a family on OpenRouter.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Latest%20Model%20Resolution\u0026description=Always%20target%20the%20newest%20version\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"icon\":\"clock-rotate-left\",\"href\":\"/guides/routing/routers/latest-resolution\"},{\"title\":\"Pareto Router\",\"description\":\"Pick a coding model by minimum coding score without choosing a specific model\",\"seoTitle\":\"Pareto Router | Coding-Score-Based Model Selection\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Pareto Router - Coding-Score-Based Model Selection\",\"og:description\":\"Route coding requests by a single minimum coding score using OpenRouter's Pareto Router.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Pareto%20Router\u0026description=Coding-score-based%20model%20selection\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"icon\":\"chart-line\",\"href\":\"/guides/routing/routers/pareto-router\"},{\"title\":\"Fusion Router\",\"description\":\"Multi-model deliberation as a model slug\",\"seoTitle\":\"Fusion Router | Multi-model AI Deliberation with OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Fusion Router - openrouter/fusion\",\"og:description\":\"Use the openrouter/fusion model slug to access multi-model deliberation (a panel of models, an analyst, and a final answer) in a single API call.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Fusion%20Router\u0026description=Multi-model%20deliberation%20as%20a%20model%20slug\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"icon\":\"circle-nodes\",\"href\":\"/guides/routing/routers/fusion-router\"}]}]},{\"group\":\"Features\",\"icon\":\"stars\",\"pages\":[{\"title\":\"Workspaces\",\"description\":\"Organize your projects, teams, and agents into separate environments\",\"seoTitle\":\"Workspaces | OpenRouter Project \u0026 Team Management\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Workspaces - Organize Projects, Teams, and Agents\",\"og:description\":\"Separate your OpenRouter projects into independent environments, each with its own API keys, routing defaults, guardrails, and observability.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Workspaces\u0026description=Organize%20projects%2C%20teams%2C%20and%20agents\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"grid-2\",\"href\":\"/guides/features/workspaces\"},{\"title\":\"Workspace Budgets\",\"description\":\"Set spending limits per workspace with automatic enforcement\",\"seoTitle\":\"Workspace Budgets | OpenRouter Spend Controls\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Workspace Budgets - Per-Workspace Spend Limits\",\"og:description\":\"Cap workspace spend with daily, weekly, monthly, or lifetime budgets. Requests are blocked automatically when a budget is met.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Workspace%20Budgets\u0026description=Per-workspace%20spend%20limits\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"wallet\",\"href\":\"/guides/features/workspaces/workspace-budgets\"},{\"title\":\"Switching Workspaces\",\"description\":\"Change which workspace your Chat and Fusion requests run in.\",\"seoTitle\":\"Switching Workspaces | OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Switching Workspaces - Change Your Active Workspace\",\"og:description\":\"Switch your active workspace directly from the Chat and Fusion sidebar so cookie-authenticated requests run in the workspace you choose.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Switching%20Workspaces\u0026description=Change%20your%20active%20workspace\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"repeat\",\"href\":\"/guides/features/workspaces/switching\"},{\"title\":\"Single Sign-On (SSO)\",\"description\":\"Let your team sign in to OpenRouter through your identity provider\",\"seoTitle\":\"OpenRouter Single Sign-On (SSO) | Developer Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter Single Sign-On (SSO)\",\"og:description\":\"Set up SAML single sign-on for your OpenRouter organization with Okta, Microsoft Entra ID, Google Workspace, or a custom SAML identity provider.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=guides/features/sso\u0026title=Single%20Sign-On\u0026description=Sign%20in%20through%20your%20identity%20provider\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"shield-halved\",\"href\":\"/guides/features/sso\"},{\"title\":\"SCIM Group Mappings\",\"description\":\"Automatically provision workspace access from your identity provider groups\",\"seoTitle\":\"OpenRouter SCIM Group Mappings | Developer Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenRouter SCIM Group Mappings\",\"og:description\":\"Map groups provisioned by your identity provider to OpenRouter workspaces so members are automatically granted the right access.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=guides/features/scim-mappings\u0026title=SCIM%20Group%20Mappings\u0026description=Automatic%20workspace%20provisioning%20from%20your%20IdP\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"users-gear\",\"href\":\"/guides/features/scim-mappings\"},{\"title\":\"Presets\",\"description\":\"Manage your LLM configurations\",\"seoTitle\":\"Presets | Configuration Management for AI Models\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Presets - Configuration Management for AI Models\",\"og:description\":\"Learn how to use OpenRouter's presets to manage model configurations, system prompts, and parameters across your applications.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Presets\u0026description=Configuration%20management%20for%20AI%20models\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"sliders\",\"href\":\"/guides/features/presets\"},{\"title\":\"Custom Classifiers\",\"description\":\"Automatically categorize LLM generations in your workspace\",\"seoTitle\":\"Custom Classifiers | OpenRouter AI Usage Classification\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Custom Classifiers - Automatic AI Usage Classification\",\"og:description\":\"Define custom taxonomies and automatically classify every LLM generation by department, task type, complexity, or any dimension you choose.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Custom%20Classifiers\u0026description=Automatic%20AI%20usage%20classification\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"tag\",\"href\":\"/guides/features/classifiers\"},{\"title\":\"Response Caching\",\"description\":\"Cache responses for identical API requests to save time and money\",\"seoTitle\":\"Response Caching | Cache API Responses with OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Response Caching - Cache Identical API Responses\",\"og:description\":\"Cache identical LLM requests with OpenRouter's response caching feature. Reduce costs and latency for agent workflows, unit testing, and repeated context processing.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Response%20Caching\u0026description=Cache%20responses%20for%20identical%20API%20requests%20to%20save%20time%20and%20money\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"box-archive\",\"href\":\"/guides/features/response-caching\"},{\"title\":\"Tool \u0026 Function Calling\",\"description\":\"Use tools in your prompts\",\"seoTitle\":\"Tool \u0026 Function Calling | Use Tools with OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Tool \u0026 Function Calling - Use Tools with OpenRouter\",\"og:description\":\"Use tools (or functions) in your prompts with OpenRouter. Learn how to use tools with OpenAI, Anthropic, and other models that support tool calling.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Tool%20\u0026%20Function%20Calling\u0026description=Use%20tools%20with%20OpenRouter\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"toolbox\",\"sidebarTitle\":\"Tool Calling\",\"href\":\"/guides/features/tool-calling\"},{\"group\":\"Server Tools\",\"icon\":\"server\",\"pages\":[{\"title\":\"Server Tools\",\"description\":\"Tools operated by OpenRouter that models can call during request\",\"seoTitle\":\"Server Tools | Model-Callable Tools Operated by OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Server Tools - Model-Callable Tools by OpenRouter\",\"og:description\":\"Add powerful server-side tools like web search, web fetch, datetime, and image generation to any model on OpenRouter. Models decide when to call them, and OpenRouter executes them automatically.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Server%20Tools\u0026description=Model-Callable%20Tools%20by%20OpenRouter\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"compass\",\"sidebarTitle\":\"Overview\",\"tag\":\"Beta\",\"href\":\"/guides/features/server-tools\"},{\"title\":\"Web Search\",\"description\":\"Give any model access to real-time web information\",\"seoTitle\":\"Web Search Server Tool | Real-Time Web Search for Any Model\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Web Search Server Tool - Real-Time Web Search for Any Model\",\"og:description\":\"Add real-time web search to any model on OpenRouter. The model decides when to search, OpenRouter executes it, and results are returned with citations.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=features/server-tools/web-search\u0026title=Web%20Search%20Server%20Tool\u0026description=Real-time%20web%20search%20for%20any%20model\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"globe\",\"tag\":\"Beta\",\"href\":\"/guides/features/server-tools/web-search\"},{\"title\":\"Web Fetch\",\"description\":\"Give any model the ability to fetch content from URLs\",\"seoTitle\":\"Web Fetch Server Tool | URL Content Retrieval for Any Model\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Web Fetch Server Tool - URL Content Retrieval for Any Model\",\"og:description\":\"Add URL content fetching to any model on OpenRouter. The model decides when to fetch, OpenRouter retrieves the content, and results are returned as text.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Web%20Fetch%20Server%20Tool\u0026description=URL%20content%20retrieval%20for%20any%20model\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"link\",\"tag\":\"Beta\",\"href\":\"/guides/features/server-tools/web-fetch\"},{\"title\":\"Datetime\",\"description\":\"Give any model access to the current date and time\",\"seoTitle\":\"Datetime Server Tool | Current Date and Time for Any Model\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Datetime Server Tool - Current Date and Time for Any Model\",\"og:description\":\"Add current date and time awareness to any model on OpenRouter. The model calls the tool when it needs temporal context.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Datetime%20Server%20Tool\u0026description=Current%20date%20and%20time%20for%20any%20model\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"clock\",\"tag\":\"Beta\",\"href\":\"/guides/features/server-tools/datetime\"},{\"title\":\"Image Generation\",\"description\":\"Generate images from text prompts with any model\",\"seoTitle\":\"Image Generation Server Tool | AI Image Generation for Any Model\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Image Generation Server Tool - AI Image Generation for Any Model\",\"og:description\":\"Add AI image generation to any model on OpenRouter. The model calls the tool with a prompt, OpenRouter generates the image and returns it.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Image%20Generation%20Server%20Tool\u0026description=AI%20image%20generation%20for%20any%20model\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"image\",\"tag\":\"Beta\",\"href\":\"/guides/features/server-tools/image-generation\"},{\"title\":\"Apply Patch\",\"description\":\"Let models propose file changes via V4A diffs\",\"seoTitle\":\"Apply Patch Server Tool | File Editing for Coding Agents\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Apply Patch Server Tool - File Editing for Coding Agents\",\"og:description\":\"Enable any model on OpenRouter to propose file edits using V4A diff patches. The model generates the patch, OpenRouter validates it, and your application applies it.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=features/server-tools/apply-patch\u0026title=Apply%20Patch%20Server%20Tool\u0026description=File%20editing%20for%20coding%20agents\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"file-code\",\"tag\":\"Beta\",\"href\":\"/guides/features/server-tools/apply-patch\"},{\"title\":\"Bash\",\"hidden\":true,\"description\":\"Give any model a sandboxed shell to run commands server-side\",\"seoTitle\":\"Bash Server Tool | Sandboxed Shell Execution for Any Model\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Bash Server Tool - Sandboxed Shell Execution for Any Model\",\"og:description\":\"Add a sandboxed shell to any model on OpenRouter. The model decides when to run commands, OpenRouter executes them server-side in an isolated container, and stdout/stderr are returned.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Bash%20Server%20Tool\u0026description=Sandboxed%20shell%20execution%20for%20any%20model\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"href\":\"/guides/features/server-tools/bash\",\"hiddenSetByFrontmatter\":true},{\"title\":\"Shell\",\"description\":\"Give any model a sandboxed hosted shell on the Responses and Messages APIs\",\"seoTitle\":\"Shell Server Tool | Hosted Shell Execution for Any Model\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Shell Server Tool - Hosted Shell Execution for Any Model\",\"og:description\":\"Add a hosted shell to any model on OpenRouter's Responses and Messages APIs. A sandbox-backed clone of OpenAI's hosted shell tool: the model runs commands server-side in an isolated container.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Shell%20Server%20Tool\u0026description=Hosted%20shell%20execution%20for%20any%20model\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"terminal\",\"tag\":\"Beta\",\"href\":\"/guides/features/server-tools/shell\"},{\"title\":\"Files\",\"hidden\":true,\"description\":\"Let any model read, write, edit, and list workspace files\",\"seoTitle\":\"Files Server Tool | Workspace File Access for Any Model\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Files Server Tool - Workspace File Access for Any Model\",\"og:description\":\"Give any model on OpenRouter the ability to read, write, edit, and list text files in your workspace via the Files API. The model decides when to operate on files, and OpenRouter executes the operations server-side.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Files%20Server%20Tool\u0026description=Workspace%20file%20access%20for%20any%20model\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"folder-open\",\"tag\":\"Beta\",\"href\":\"/guides/features/server-tools/files\",\"hiddenSetByFrontmatter\":true},{\"title\":\"Search Models\",\"description\":\"Let any model search the OpenRouter model catalog\",\"seoTitle\":\"Search Models Server Tool | Model Discovery for Any Model\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Search Models Server Tool - Model Discovery for Any Model\",\"og:description\":\"Give any model on OpenRouter the ability to search and filter the OpenRouter model catalog by name, modality, context length, and series.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Search%20Models%20Server%20Tool\u0026description=Model%20discovery%20for%20any%20model\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"magnifying-glass\",\"tag\":\"Beta\",\"href\":\"/guides/features/server-tools/search-models\"},{\"title\":\"Fusion\",\"description\":\"Multi-model deliberation as a server tool\",\"seoTitle\":\"Fusion Server Tool | Multi-model AI Analysis with OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Fusion Server Tool - Multi-model Analysis for Any Model\",\"og:description\":\"Let any model invoke an expert panel and analyst to surface consensus, contradictions, coverage gaps, unique insights, and blind spots.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Fusion%20Server%20Tool\u0026description=Multi-model%20deliberation%20on%20demand\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"circle-nodes\",\"tag\":\"Beta\",\"href\":\"/guides/features/server-tools/fusion\"},{\"title\":\"Advisor\",\"description\":\"Consult a stronger model mid-generation as a server tool\",\"seoTitle\":\"Advisor Server Tool | Mid-generation Model Consultation on OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Advisor Server Tool - Consult a Stronger Model Mid-generation\",\"og:description\":\"Let a fast executor model consult a higher-intelligence advisor model for guidance mid-generation, with any OpenRouter model.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Advisor%20Server%20Tool\u0026description=Consult%20a%20stronger%20model%20on%20demand\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"lightbulb\",\"tag\":\"Beta\",\"href\":\"/guides/features/server-tools/advisor\"},{\"title\":\"Subagent\",\"description\":\"Delegate tasks to a smaller, faster model as a server tool\",\"seoTitle\":\"Subagent Server Tool | Mid-generation Task Delegation on OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Subagent Server Tool - Delegate Tasks to Smaller Models\",\"og:description\":\"Let a large model break work into focused sub-tasks and delegate them to a smaller, cheaper, faster worker model: any OpenRouter model, with optional tools.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Subagent%20Server%20Tool\u0026description=Delegate%20tasks%20to%20smaller%20models\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"sitemap\",\"tag\":\"Beta\",\"href\":\"/guides/features/server-tools/subagent\"}]},{\"group\":\"Plugins\",\"icon\":\"plug\",\"pages\":[{\"title\":\"Plugins\",\"description\":\"Extend model capabilities with OpenRouter plugins\",\"seoTitle\":\"Plugins | Extend AI Model Capabilities\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Plugins - Extend AI Model Capabilities\",\"og:description\":\"Enable powerful plugins like web search, PDF processing, and response healing to extend any model's capabilities on OpenRouter.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Plugins\u0026description=Extend%20AI%20Model%20Capabilities\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"compass\",\"sidebarTitle\":\"Overview\",\"href\":\"/guides/features/plugins\"},{\"title\":\"Web Search\",\"description\":\"Model-agnostic grounding\",\"seoTitle\":\"Web Search | Add Real-time Web Data to AI Model Responses\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Web Search - Real-time Web Grounding for AI Models\",\"og:description\":\"Enable real-time web search capabilities in your AI model responses. Add factual, up-to-date information to any model's output with OpenRouter's web search feature.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=features/web-search\u0026title=Web%20Search\u0026description=Add%20real-time%20web%20data%20to%20any%20AI%20model%20response\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"globe\",\"href\":\"/guides/features/plugins/web-search\"},{\"title\":\"Response Healing\",\"description\":\"Automatically fix malformed JSON responses\",\"seoTitle\":\"Response Healing | Validate and Repair AI Model Responses\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Response Healing - Fix Malformed JSON from AI Models\",\"og:description\":\"Automatically validate and repair malformed JSON responses from AI models. Ensure your responses match your schema even when models return imperfect formatting.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Response%20Healing\u0026description=Validate%20and%20Repair%20AI%20Model%20Responses\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"bandage\",\"href\":\"/guides/features/plugins/response-healing\"},{\"title\":\"Fusion\",\"description\":\"Multi-model analysis with an analyst model\",\"seoTitle\":\"Fusion | Multi-model AI Analysis with OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Fusion - Multi-model Analysis on OpenRouter\",\"og:description\":\"Get richer answers by running a panel of models in parallel and comparing their responses through an analyst. Fusion makes this a one-line addition to any OpenRouter request.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Fusion\u0026description=Multi-model%20Analysis%20with%20a%20Analyst%20Model\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"circle-nodes\",\"href\":\"/guides/features/plugins/fusion\"}]},{\"title\":\"Structured Outputs\",\"description\":\"Return structured data from your models\",\"seoTitle\":\"Structured Outputs | Enforce JSON Schema in OpenRouter API Responses\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Structured Outputs - Type-Safe JSON Responses from AI Models\",\"og:description\":\"Enforce JSON Schema validation on AI model responses. Get consistent, type-safe outputs and avoid parsing errors with OpenRouter's structured output feature.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Structured%20Outputs\u0026description=Type-Safe%20JSON%20Responses%20from%20AI%20Models\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"code\",\"href\":\"/guides/features/structured-outputs\"},{\"title\":\"Message Transforms\",\"description\":\"Transform prompt messages\",\"seoTitle\":\"Message Transforms | Pre-process AI Model Inputs with OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Message Transforms - Optimize AI Model Inputs\",\"og:description\":\"Transform and optimize messages before sending them to AI models. Learn about middle-out compression and context window optimization with OpenRouter.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Message%20Transforms\u0026description=Optimize%20AI%20model%20inputs%20with%20OpenRouter\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"arrows-rotate\",\"href\":\"/guides/features/message-transforms\"},{\"title\":\"Zero Completion Insurance\",\"description\":\"OpenRouter will not charge you for zero token responses\",\"seoTitle\":\"Zero Completion Insurance | No Charge for Zero Token Responses\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Zero Completion Insurance - No Charge for Zero Token Responses\",\"og:description\":\"Learn how OpenRouter protects users from being charged for failed or empty AI responses with zero completion insurance.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Zero%20Completion%20Insurance\u0026description=No%20Charge%20for%20Zero%20Token%20Responses\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"shield\",\"href\":\"/guides/features/zero-completion-insurance\"},{\"title\":\"Zero Data Retention\",\"description\":\"How OpenRouter gives you control over your data\",\"seoTitle\":\"Zero Data Retention | How OpenRouter gives you control over your data\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Zero Data Retention - How OpenRouter gives you control over your data\",\"og:description\":\"Learn how OpenRouter gives you control over your data\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Zero%20Data%20Retention\u0026description=How%20OpenRouter%20gives%20you%20control%20over%20your%20data\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"shield-halved\",\"sidebarTitle\":\"ZDR\",\"href\":\"/guides/features/zdr\"},{\"title\":\"App Attribution\",\"description\":\"Get your app featured in OpenRouter rankings and analytics\",\"slug\":\"app-attribution\",\"seoTitle\":\"App Attribution | OpenRouter Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"App Attribution\",\"og:description\":\"Learn how to attribute your API usage to your app and appear in OpenRouter's app rankings and model analytics.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=app-attribution\u0026title=App%20Attribution\u0026description=Get%20your%20app%20featured%20in%20rankings\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"chart-line\",\"href\":\"/app-attribution\"},{\"group\":\"Guardrails\",\"icon\":\"shield-check\",\"pages\":[{\"title\":\"Guardrails\",\"description\":\"Control spending and model access for your organization\",\"seoTitle\":\"Guardrails | OpenRouter Organization Controls\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Guardrails - Organization Spending and Access Controls\",\"og:description\":\"Set spending limits, restrict model access, and enforce data policies for your organization members and API keys with OpenRouter guardrails.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Guardrails\u0026description=Control%20spending%20and%20model%20access\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"book-open\",\"sidebarTitle\":\"Overview\",\"href\":\"/guides/features/guardrails\"},{\"group\":\"Prompt Injection Detection\",\"icon\":\"syringe\",\"root\":{\"title\":\"Prompt Injection Detection\",\"description\":\"Regex-based prompt injection guardrail patterns\",\"seoTitle\":\"Prompt Injection Detection | OpenRouter Guardrails\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Prompt Injection Detection - Guardrail Regex Patterns\",\"og:description\":\"Reference documentation for the regex-based prompt injection detection patterns used by OpenRouter guardrails, inspired by the OWASP LLM Prompt Injection Prevention Cheat Sheet.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Prompt%20Injection%20Detection\u0026description=Guardrail%20regex%20patterns\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"icon\":\"syringe\",\"href\":\"/guides/features/guardrails/prompt-injection\"},\"pages\":[{\"title\":\"Allowlist\",\"description\":\"Exclude known-safe phrases from prompt injection detection\",\"seoTitle\":\"Allowlist | OpenRouter Guardrails\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Prompt Injection Allowlist - Exclude Safe Phrases from Detection\",\"og:description\":\"Add specific phrases to an allowlist so they are not flagged, redacted, or blocked by the regex-based prompt injection guardrail.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Prompt%20Injection%20Allowlist\u0026description=Exclude%20safe%20phrases%20from%20detection\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"list-check\",\"href\":\"/guides/features/guardrails/prompt-injection/allowlist\"}]},{\"title\":\"Sensitive Info Guardrail\",\"description\":\"Automatically detect and handle sensitive information in API requests\",\"seoTitle\":\"Sensitive Info Guardrail | OpenRouter Data Protection\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Sensitive Info Guardrail - Automatic PII Detection and Redaction\",\"og:description\":\"Protect sensitive data in your AI requests with OpenRouter Sensitive Info Guardrails. Automatically detect and redact or block PII like emails, phone numbers, names, addresses, and more.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Sensitive%20Info%20Guardrail\u0026description=Automatically%20detect%20and%20handle%20sensitive%20information\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"eye-slash\",\"sidebarTitle\":\"Sensitive Info\",\"href\":\"/guides/features/guardrails/sensitive-info\"}]},{\"title\":\"Service Tiers\",\"description\":\"Control cost and latency tradeoffs with service tier selection\",\"seoTitle\":\"Service Tiers | OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Service Tiers - Control Cost and Latency Tradeoffs\",\"og:description\":\"Learn how to use service tiers on OpenRouter to control cost and latency tradeoffs when routing requests to AI providers.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Service%20Tiers\u0026description=Control%20Cost%20and%20Latency%20Tradeoffs\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"layer-group\",\"href\":\"/guides/features/service-tiers\"},{\"title\":\"Sovereign AI\",\"description\":\"Keep AI workloads within national and regional boundaries\",\"seoTitle\":\"Sovereign AI | In-Region AI Routing with OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Sovereign AI - In-Region AI Routing with OpenRouter\",\"og:description\":\"Learn how OpenRouter enables sovereign AI with in-region routing, data residency controls, and compliance features that keep your AI workloads within national and regional boundaries.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Sovereign%20AI\u0026description=In-Region%20AI%20Routing%20with%20OpenRouter\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"globe\",\"href\":\"/guides/features/sovereign-ai\"},{\"title\":\"Router Metadata\",\"description\":\"Surface routing decisions on every response with a single opt-in header\",\"seoTitle\":\"Router Metadata | OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Router Metadata - Inspect Routing Decisions on Every Response\",\"og:description\":\"Opt in to OpenRouter routing metadata to see which provider was selected, fallback attempts, and pipeline stages applied to your request.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Router%20Metadata\u0026description=Inspect%20Routing%20Decisions%20on%20Every%20Response\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"circle-info\",\"href\":\"/guides/features/router-metadata\"},{\"title\":\"Input \u0026 Output Logging\",\"description\":\"Privately store and review your prompts and completions\",\"seoTitle\":\"Input \u0026 Output Logging | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Input \u0026 Output Logging - Privately Store Prompts and Completions\",\"og:description\":\"Store your prompts and completions privately on OpenRouter for debugging, evaluation, and optimization. View them in your Logs page.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Input%20%26%20Output%20Logging\u0026description=Privately%20store%20and%20review%20prompts\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"file-lines\",\"sidebarTitle\":\"Input \u0026 Output Logging\",\"href\":\"/guides/features/input-output-logging\"},{\"group\":\"Broadcast\",\"icon\":\"broadcast-tower\",\"pages\":[{\"title\":\"Broadcast\",\"description\":\"Send traces to external observability platforms\",\"seoTitle\":\"Broadcast | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast - Send Traces to Observability Platforms\",\"og:description\":\"Connect your LLM observability platforms to automatically receive traces from your OpenRouter requests. Supports Langfuse, Datadog, Braintrust, and more.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Broadcast\u0026description=Send%20traces%20to%20observability%20platforms\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"compass\",\"sidebarTitle\":\"Overview\",\"href\":\"/guides/features/broadcast\"},{\"title\":\"Arize AX\",\"description\":\"Send traces to Arize AX\",\"seoTitle\":\"Broadcast to Arize AX | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to Arize AX - Send Traces to Arize AX\",\"og:description\":\"Connect Arize AX to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Arize AX integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Arize%20AX%20Broadcast\u0026description=Send%20traces%20to%20Arize%20AX\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/arize\"},{\"title\":\"Braintrust\",\"description\":\"Send traces to Braintrust\",\"seoTitle\":\"Broadcast to Braintrust | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to Braintrust - Send Traces to Braintrust\",\"og:description\":\"Connect Braintrust to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Braintrust integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Braintrust%20Broadcast\u0026description=Send%20traces%20to%20Braintrust\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/braintrust\"},{\"title\":\"ClickHouse\",\"description\":\"Send traces to ClickHouse\",\"seoTitle\":\"Broadcast to ClickHouse | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to ClickHouse - Send Traces to Your Analytics Database\",\"og:description\":\"Connect ClickHouse to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for ClickHouse integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=ClickHouse%20Broadcast\u0026description=Send%20traces%20to%20ClickHouse\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/clickhouse\"},{\"title\":\"Comet Opik\",\"description\":\"Send traces to Comet Opik\",\"seoTitle\":\"Broadcast to Comet Opik | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to Comet Opik - Send Traces to Opik\",\"og:description\":\"Connect Comet Opik to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Opik integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Comet%20Opik%20Broadcast\u0026description=Send%20traces%20to%20Comet%20Opik\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/opik\"},{\"title\":\"Datadog\",\"description\":\"Send traces to Datadog\",\"seoTitle\":\"Datadog Broadcast | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Datadog Broadcast - Send Traces to Datadog LLM Observability\",\"og:description\":\"Connect Datadog LLM Observability to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Datadog integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Datadog%20Broadcast\u0026description=Send%20traces%20to%20Datadog%20LLM%20Observability\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/datadog\"},{\"title\":\"Google BigQuery\",\"description\":\"Send traces to Google BigQuery\",\"seoTitle\":\"Broadcast to Google BigQuery | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to Google BigQuery - Send Traces to Your Data Warehouse\",\"og:description\":\"Connect Google BigQuery to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for BigQuery integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=BigQuery%20Broadcast\u0026description=Send%20traces%20to%20Google%20BigQuery\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/bigquery\"},{\"title\":\"Grafana Cloud\",\"description\":\"Send traces to Grafana Cloud\",\"seoTitle\":\"Broadcast to Grafana Cloud | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to Grafana Cloud - Send Traces to Grafana Tempo\",\"og:description\":\"Connect Grafana Cloud to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Grafana Cloud integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Grafana%20Cloud%20Broadcast\u0026description=Send%20traces%20to%20Grafana%20Cloud\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/grafana\"},{\"title\":\"Langfuse\",\"description\":\"Send traces to Langfuse\",\"seoTitle\":\"Broadcast to Langfuse | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to Langfuse - Send Traces to Langfuse\",\"og:description\":\"Connect Langfuse to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Langfuse integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Langfuse%20Broadcast\u0026description=Send%20traces%20to%20Langfuse\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/langfuse\"},{\"title\":\"LangSmith\",\"description\":\"Send traces to LangSmith\",\"seoTitle\":\"Broadcast to LangSmith | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to LangSmith - Send Traces to LangSmith\",\"og:description\":\"Connect LangSmith to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for LangSmith integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=LangSmith%20Broadcast\u0026description=Send%20traces%20to%20LangSmith\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/langsmith\"},{\"title\":\"New Relic\",\"description\":\"Send traces to New Relic\",\"seoTitle\":\"Broadcast to New Relic | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to New Relic - Send Traces to New Relic\",\"og:description\":\"Connect New Relic to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for New Relic integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=New%20Relic%20Broadcast\u0026description=Send%20traces%20to%20New%20Relic\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/newrelic\"},{\"title\":\"OpenTelemetry Collector\",\"description\":\"Send traces to any OpenTelemetry-compatible backend\",\"seoTitle\":\"Broadcast to OpenTelemetry Collector | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to OpenTelemetry Collector - Send Traces to OTLP Backends\",\"og:description\":\"Connect any OpenTelemetry-compatible backend to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for OTLP integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=OpenTelemetry%20Collector%20Broadcast\u0026description=Send%20traces%20to%20OTLP%20backends\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/otel-collector\"},{\"title\":\"PostHog\",\"description\":\"Send traces to PostHog\",\"seoTitle\":\"Broadcast to PostHog | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to PostHog - Send Traces to PostHog\",\"og:description\":\"Connect PostHog to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for PostHog integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=PostHog%20Broadcast\u0026description=Send%20traces%20to%20PostHog\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/posthog\"},{\"title\":\"Raindrop\",\"description\":\"Send traces to Raindrop\",\"seoTitle\":\"Broadcast to Raindrop | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to Raindrop - Send Traces to Raindrop\",\"og:description\":\"Connect Raindrop to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Raindrop integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Raindrop%20Broadcast\u0026description=Send%20traces%20to%20Raindrop\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/raindrop\"},{\"title\":\"Ramp\",\"description\":\"Send traces to Ramp\",\"seoTitle\":\"Broadcast to Ramp | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to Ramp - Send Traces to Ramp\",\"og:description\":\"Connect Ramp to automatically receive AI usage traces from your OpenRouter requests. Step-by-step setup guide for Ramp integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Ramp%20Broadcast\u0026description=Send%20traces%20to%20Ramp\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/ramp\"},{\"title\":\"S3 / S3-Compatible\",\"description\":\"Send traces to Amazon S3 or S3-compatible storage\",\"seoTitle\":\"Broadcast to S3 | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to S3 - Send Traces to S3 Storage\",\"og:description\":\"Connect Amazon S3 or S3-compatible storage to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for S3 integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=S3%20Broadcast\u0026description=Send%20traces%20to%20S3%20storage\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/s3\"},{\"title\":\"Sentry\",\"description\":\"Send traces to Sentry\",\"seoTitle\":\"Broadcast to Sentry | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to Sentry - Send Traces to Sentry\",\"og:description\":\"Connect Sentry to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Sentry integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Sentry%20Broadcast\u0026description=Send%20traces%20to%20Sentry\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/sentry\"},{\"title\":\"Snowflake\",\"description\":\"Send traces to Snowflake\",\"seoTitle\":\"Broadcast to Snowflake | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to Snowflake - Send Traces to Your Data Warehouse\",\"og:description\":\"Connect Snowflake to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Snowflake integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Snowflake%20Broadcast\u0026description=Send%20traces%20to%20Snowflake\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/snowflake\"},{\"title\":\"W\u0026B Weave\",\"description\":\"Send traces to W\u0026B Weave\",\"seoTitle\":\"Broadcast to W\u0026B Weave | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to W\u0026B Weave - Send Traces to W\u0026B Weave\",\"og:description\":\"Connect W\u0026B Weave to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for W\u0026B Weave integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=W%26B%20Weave%20Broadcast\u0026description=Send%20traces%20to%20W%26B%20Weave\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/weave\"},{\"title\":\"Webhook\",\"description\":\"Send traces to any HTTP endpoint\",\"seoTitle\":\"Broadcast to Webhook | OpenRouter Observability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Broadcast to Webhook - Send Traces to Any HTTP Endpoint\",\"og:description\":\"Connect any HTTP endpoint to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Webhook integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Webhook%20Broadcast\u0026description=Send%20traces%20to%20any%20HTTP%20endpoint\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/features/broadcast/webhook\"}]}]},{\"group\":\"Ori\",\"icon\":\"terminal\",\"pages\":[{\"title\":\"Ori Eval\",\"description\":\"Find the best model for your project by testing your agent on real prompts, with one harness and one model for each run\",\"seoTitle\":\"Ori Eval | Find the Best Model for Your Project\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Ori Eval - Find the Best Model for Your Project\",\"og:description\":\"Ask which model is best for your project. Ori finds test data in your repo, writes the eval, runs your candidates, and recommends one, with the scores that support the recommendation.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Ori%20Eval\u0026description=Find%20the%20best%20model%20for%20your%20project\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"nofollow\":false,\"icon\":\"vial-circle-check\",\"href\":\"/guides/ori/eval\"},{\"title\":\"Ori Harness\",\"description\":\"Run your existing agent CLI on OpenRouter with any model, organization guardrails, and one bill\",\"seoTitle\":\"Ori Harness | Run Your Agent on OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Ori Harness - Run Your Agent on OpenRouter\",\"og:description\":\"Run the agent CLI you already use on OpenRouter. Choose any model, keep your organization guardrails, and get one bill across agents.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Ori%20Harness\u0026description=Run%20your%20agent%20on%20OpenRouter\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"nofollow\":false,\"icon\":\"plug\",\"href\":\"/guides/ori/harness\"},{\"title\":\"Where Ori writes files\",\"description\":\"Find the files and directories that Ori creates during a run\",\"seoTitle\":\"Where Ori writes files | OpenRouter Documentation\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Where Ori writes files\",\"og:description\":\"Find the files and directories that Ori creates during a run.\",\"nofollow\":false,\"icon\":\"folder\",\"href\":\"/guides/ori/files\"}]},{\"group\":\"Privacy\",\"icon\":\"shield\",\"expanded\":false,\"pages\":[{\"title\":\"Data Collection\",\"description\":\"What data OpenRouter collects\",\"seoTitle\":\"Data Collection | OpenRouter Privacy\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Data Collection - OpenRouter Privacy\",\"og:description\":\"Learn what data OpenRouter collects and how it's used.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Data%20Collection\u0026description=What%20data%20OpenRouter%20collects\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"database\",\"href\":\"/guides/privacy/data-collection\"},{\"title\":\"Provider Logging\",\"description\":\"Provider logging and data retention policies\",\"seoTitle\":\"Provider Logging | Provider Data Retention\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Provider Logging - Provider Data Retention Policies\",\"og:description\":\"Understand how AI providers handle logging and data retention when you use OpenRouter.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Provider%20Logging\u0026description=Provider%20data%20retention%20policies\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"file-lines\",\"href\":\"/guides/privacy/provider-logging\"}]},{\"group\":\"Best Practices\",\"icon\":\"lightbulb\",\"expanded\":false,\"pages\":[{\"title\":\"Latency and Performance\",\"description\":\"Understanding OpenRouter's performance characteristics\",\"seoTitle\":\"Latency and Performance | Minimizing Gateway Latency\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Latency and Performance | Minimizing Gateway Latency\",\"og:description\":\"Learn about OpenRouter's performance characteristics, latency optimizations, and best practices for achieving optimal response times.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Latency%20and%20Performance\u0026description=Understanding%20OpenRouter's%20performance%20characteristics\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"gauge-high\",\"href\":\"/guides/best-practices/latency-and-performance\"},{\"title\":\"Prompt Caching\",\"description\":\"Cache prompt messages\",\"seoTitle\":\"Prompt Caching | Reduce AI Model Costs with OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Prompt Caching - Optimize AI Model Costs with Smart Caching\",\"og:description\":\"Reduce your AI model costs with OpenRouter's prompt caching feature. Learn how to cache and reuse responses across OpenAI, Anthropic Claude, and DeepSeek models.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Prompt%20Caching\u0026description=Optimize%20AI%20model%20costs%20with%20OpenRouter\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"database\",\"href\":\"/guides/best-practices/prompt-caching\"},{\"title\":\"Uptime Optimization\",\"description\":\"OpenRouter tracks provider availability\",\"seoTitle\":\"Uptime Optimization | Maximize AI Model Availability\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Uptime Optimization - Ensure Reliable AI Model Access\",\"og:description\":\"Learn how OpenRouter maximizes AI model uptime through real-time monitoring, intelligent routing, and automatic fallbacks across multiple providers.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Uptime%20Optimization\u0026description=Maximize%20AI%20model%20availability\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"chart-line\",\"href\":\"/guides/best-practices/uptime-optimization\"},{\"title\":\"Reasoning Tokens\",\"seoTitle\":\"Reasoning Tokens | Enhanced AI Model Reasoning with OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Reasoning Tokens - Improve AI Model Decision Making\",\"og:description\":\"Learn how to use reasoning tokens to enhance AI model outputs. Implement step-by-step reasoning traces for better decision making and transparency.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Reasoning%20Tokens\u0026description=Enhance%20AI%20model%20outputs%20with%20OpenRouter\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"lightbulb\",\"description\":null,\"href\":\"/guides/best-practices/reasoning-tokens\"}]},{\"group\":\"Community\",\"icon\":\"users\",\"expanded\":false,\"pages\":[{\"title\":\"Provider Integration\",\"seoTitle\":\"Provider Integration | Add Your AI Models to OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Provider Integration - Add Your Models to OpenRouter\",\"og:description\":\"Learn how to integrate your AI models with OpenRouter. Complete guide for providers to make their models available through OpenRouter's unified API.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Provider%20Integration\u0026description=Add%20Your%20Models%20to%20OpenRouter\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"cloud\",\"sidebarTitle\":\"For Providers\",\"description\":null,\"href\":\"/guides/community/for-providers\"},{\"title\":\"Frameworks and Integrations Overview\",\"description\":\"Using OpenRouter with Popular Frameworks and Integrations\",\"seoTitle\":\"Frameworks and Integrations | OpenRouter SDK and Library Support\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Frameworks and Integrations - OpenRouter SDK Support\",\"og:description\":\"Integrate OpenRouter using popular frameworks and SDKs. Complete guides for OpenAI SDK, LangChain, PydanticAI, and Vercel AI SDK integration.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Frameworks\u0026description=Frameworks%20and%20SDK%20Support\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/frameworks-and-integrations-overview\"},{\"title\":\"Awesome OpenRouter\",\"description\":\"Community-curated list of projects built with OpenRouter\",\"seoTitle\":\"Awesome OpenRouter | Community Projects and Apps\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Awesome OpenRouter - Community Projects\",\"og:description\":\"Discover community-built projects and apps powered by OpenRouter. Submit your own project to the awesome-openrouter list.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Awesome%20OpenRouter\u0026description=Community%20Projects\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"star\",\"href\":\"/guides/community/awesome-openrouter\"},{\"title\":\"Effect AI SDK\",\"description\":\"Integrate OpenRouter using the Effect AI SDK\",\"seoTitle\":\"Effect AI SDK Integration | OpenRouter SDK Support\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Effect AI SDK Integration - OpenRouter SDK Support\",\"og:description\":\"Integrate OpenRouter using the Effect AI SDK. Complete guide for integrating the Effect AI SDK with OpenRouter.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Effect%20AI%20SDK\u0026description=Effect%20AI%20SDK%20Integration\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/effect-ai-sdk\"},{\"title\":\"Arize AX\",\"description\":\"Using OpenRouter with Arize AX\",\"seoTitle\":\"Arize AX Integration | OpenRouter SDK Support\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Arize AX Integration - OpenRouter SDK Support\",\"og:description\":\"Integrate OpenRouter using Arize AX for observability and tracing. Complete guide for Arize AX integration with OpenRouter for Python and JavaScript applications.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Arize%20AX\u0026description=Arize%20AX%20Integration\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/arize\"},{\"title\":\"LangChain\",\"description\":\"Using OpenRouter with LangChain\",\"seoTitle\":\"LangChain Integration | OpenRouter SDK Support\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"LangChain Integration - OpenRouter SDK Support\",\"og:description\":\"Integrate OpenRouter using LangChain framework. Complete guide for LangChain integration with OpenRouter for Python and JavaScript.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=LangChain\u0026description=LangChain%20Integration\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/langchain\"},{\"title\":\"LiveKit\",\"description\":\"Using OpenRouter with LiveKit Agents\",\"seoTitle\":\"LiveKit Integration | OpenRouter SDK Support\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"LiveKit Integration - OpenRouter SDK Support\",\"og:description\":\"Integrate OpenRouter using LiveKit Agents framework. Complete guide for LiveKit integration with OpenRouter to build voice AI agents with access to 400+ models.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=LiveKit\u0026description=LiveKit%20Integration\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/livekit\"},{\"title\":\"Langfuse\",\"description\":\"Using OpenRouter with Langfuse\",\"seoTitle\":\"Langfuse Integration | OpenRouter SDK Support\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Langfuse Integration - OpenRouter SDK Support\",\"og:description\":\"Integrate OpenRouter using Langfuse for observability and tracing. Complete guide for Langfuse integration with OpenRouter for Python applications.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Langfuse\u0026description=Langfuse%20Integration\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/langfuse\"},{\"title\":\"Mastra\",\"description\":\"Using OpenRouter with Mastra\",\"seoTitle\":\"Mastra Integration | OpenRouter SDK Support\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Mastra Integration - OpenRouter SDK Support\",\"og:description\":\"Integrate OpenRouter using Mastra framework. Complete guide for Mastra integration with OpenRouter for unified AI model access.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Mastra\u0026description=Mastra%20Integration\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/mastra\"},{\"title\":\"OpenAI SDK\",\"description\":\"Using OpenRouter with OpenAI SDK\",\"seoTitle\":\"OpenAI SDK Integration | OpenRouter SDK Support\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OpenAI SDK Integration - OpenRouter SDK Support\",\"og:description\":\"Integrate OpenRouter using the official OpenAI SDK. Complete guide for OpenAI SDK integration with OpenRouter for Python and TypeScript.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=OpenAI%20SDK\u0026description=OpenAI%20SDK%20Integration\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/openai-sdk\"},{\"title\":\"Anthropic Agent SDK\",\"description\":\"Using OpenRouter with the Anthropic Agent SDK\",\"seoTitle\":\"Anthropic Agent SDK Integration | OpenRouter SDK Support\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Anthropic Agent SDK Integration - OpenRouter SDK Support\",\"og:description\":\"Integrate OpenRouter using the Anthropic Agent SDK. Complete guide for building AI agents with OpenRouter in Python and TypeScript.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Anthropic%20Agent%20SDK\u0026description=Anthropic%20Agent%20SDK%20Integration\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/anthropic-agent-sdk\"},{\"title\":\"PydanticAI\",\"description\":\"Using OpenRouter with PydanticAI\",\"seoTitle\":\"PydanticAI Integration | OpenRouter SDK Support\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"PydanticAI Integration - OpenRouter SDK Support\",\"og:description\":\"Integrate OpenRouter using PydanticAI framework. Complete guide for PydanticAI integration with OpenRouter for Python applications.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=PydanticAI\u0026description=PydanticAI%20Integration\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/pydantic-ai\"},{\"title\":\"Render\",\"description\":\"Using OpenRouter with Render Workflows\",\"seoTitle\":\"Render Integration | OpenRouter with Render Workflows\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Render Integration - OpenRouter with Render Workflows\",\"og:description\":\"Run OpenRouter model calls inside Render Workflows with queuing, retries, and parallel task runs. Covers local development, deployment, and triggering from an app.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Render\u0026description=Using%20OpenRouter%20with%20Render%20Workflows\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/render\"},{\"title\":\"Replit\",\"description\":\"Using OpenRouter with Replit Agent and Replit Apps\",\"seoTitle\":\"Replit Integration | Add OpenRouter API Key to Replit\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Replit Integration - Add OpenRouter API Key to Replit\",\"og:description\":\"Add your OpenRouter API key to Replit to access 400+ AI models in Replit Agent and your Replit apps. Covers BYOK setup and project Secrets.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Replit\u0026description=Add%20OpenRouter%20API%20Key%20to%20Replit\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/replit\"},{\"title\":\"TanStack AI\",\"description\":\"Using OpenRouter with TanStack AI\",\"seoTitle\":\"TanStack AI Integration | OpenRouter SDK Support\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"TanStack AI Integration - OpenRouter SDK Support\",\"og:description\":\"Integrate OpenRouter using TanStack AI. Complete guide for TanStack AI integration with OpenRouter for React, Solid, and Preact applications.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=TanStack%20AI\u0026description=TanStack%20AI%20Integration\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/tanstack-ai\"},{\"title\":\"Vercel AI SDK\",\"description\":\"Using OpenRouter with Vercel AI SDK\",\"seoTitle\":\"Vercel AI SDK Integration | OpenRouter SDK Support\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Vercel AI SDK Integration - OpenRouter SDK Support\",\"og:description\":\"Integrate OpenRouter using Vercel AI SDK. Complete guide for Vercel AI SDK integration with OpenRouter for Next.js applications.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Vercel%20AI%20SDK\u0026description=Vercel%20AI%20SDK%20Integration\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/vercel-ai-sdk\"},{\"title\":\"Xcode\",\"description\":\"Using OpenRouter with Apple Intelligence in Xcode\",\"seoTitle\":\"Xcode Integration | OpenRouter Apple Intelligence Support\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Xcode Integration - OpenRouter Apple Intelligence Support\",\"og:description\":\"Integrate OpenRouter with Apple Intelligence in Xcode 26. Complete setup guide for accessing hundreds of AI models directly in your Xcode development environment.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Xcode\u0026description=Apple%20Intelligence%20Integration\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/xcode\"},{\"title\":\"Zapier\",\"description\":\"Build AI automations with OpenRouter \u0026 Zapier\",\"seoTitle\":\"Zapier Integration | OpenRouter AI Automations\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Zapier Integration - OpenRouter AI Automations\",\"og:description\":\"Build powerful AI automations by connecting OpenRouter with 8000+ apps through Zapier. Access 400+ AI models in your workflows.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Zapier\u0026description=Build%20AI%20automations%20with%20OpenRouter%20%26%20Zapier\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/zapier\"},{\"title\":\"Infisical\",\"description\":\"Automatic API Key Rotation with Infisical\",\"seoTitle\":\"Infisical Integration | OpenRouter API Key Management\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"Infisical Integration - OpenRouter API Key Management\",\"og:description\":\"Set up automatic API key rotation for OpenRouter using Infisical. Complete guide for secure key management and zero-downtime rotation.\",\"og:image\":\"https://openrouter.ai/dynamic-og?title=Infisical\u0026description=Automatic%20API%20Key%20Rotation\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"puzzle-piece\",\"href\":\"/guides/community/infisical\"}]}]},{\"tab\":\"API Reference\",\"icon\":\"code\",\"pages\":[{\"title\":\"API Reference\",\"href\":\"/api_reference/overview\"}]},{\"tab\":\"Client SDKs\",\"icon\":\"cube\",\"pages\":[{\"title\":\"Client SDKs\",\"href\":\"/client-sdks/overview\"}]},{\"tab\":\"Agent SDK\",\"icon\":\"cube\",\"pages\":[{\"title\":\"Agent SDK\",\"href\":\"/agent-sdk/overview\"}]},{\"tab\":\"Cookbook\",\"icon\":\"book-open\",\"pages\":[{\"title\":\"Cookbook\",\"href\":\"/cookbook/get-started/quickstart\"}]}]},\"maps\":{\"firstHrefInVersion\":{},\"firstHrefInLanguage\":{}},\"children\":\"$L44\"}]\n"])</script><script>self.__next_f.push([1,"45:I[27201,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"IconMark\"]\n"])</script><script>self.__next_f.push([1,"46:I[763509,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"ThemeLayout\"]\n"])</script><script>self.__next_f.push([1,"47:I[91557,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"ApiReferenceProvider\"]\n"])</script><script>self.__next_f.push([1,"48:I[91557,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"PageProvider\"]\n"])</script><script>self.__next_f.push([1,"49:I[91557,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"OpenApiProvider\"]\n"])</script><script>self.__next_f.push([1,"4a:I[525343,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"TabSyncContextProvider\"]\n"])</script><script>self.__next_f.push([1,"40:[\"$\",\"link\",\"31\",{\"rel\":\"icon\",\"href\":\"/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon-dark/favicon-32x32.png\",\"type\":\"image/png\",\"sizes\":\"32x32\",\"media\":\"(prefers-color-scheme: dark)\"}]\n41:[\"$\",\"link\",\"32\",{\"rel\":\"shortcut icon\",\"href\":\"/docs/_mintlify/favicons/openrouter-d02e98a0/EmhfYwFO2tvnkuV-/_generated/favicon-dark/favicon.ico\",\"type\":\"image/x-icon\",\"sizes\":\"$undefined\",\"media\":\"(prefers-color-scheme: dark)\"}]\n42:[\"$\",\"$L45\",\"33\",{}]\n4b:T7cc,"])</script><script>self.__next_f.push([1,"{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://openrouter.ai/#organization\",\"name\":\"OpenRouter | Documentation\",\"url\":\"https://openrouter.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/openrouter-d02e98a0/ksNSeB_K7gD-BUDh/assets/logo-v2-light.svg?fit=max\u0026auto=format\u0026n=ksNSeB_K7gD-BUDh\u0026q=85\u0026s=690e45873843519efe02bcbe45795dac\"}},{\"@type\":\"WebSite\",\"@id\":\"https://openrouter.ai/docs#website\",\"name\":\"OpenRouter | Documentation\",\"url\":\"https://openrouter.ai/docs\",\"publisher\":{\"@id\":\"https://openrouter.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://openrouter.ai/docs/guides/overview/auth/oauth#webpage\",\"url\":\"https://openrouter.ai/docs/guides/overview/auth/oauth\",\"name\":\"OAuth PKCE\",\"description\":\"Connect your users to OpenRouter\",\"dateModified\":\"2026-08-08T19:05:56.363Z\",\"isPartOf\":{\"@id\":\"https://openrouter.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://openrouter.ai/docs/guides/overview/auth/oauth#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://openrouter.ai/docs/guides/overview/auth/oauth#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Overview\",\"item\":\"https://openrouter.ai/docs/quickstart\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OAuth PKCE\",\"item\":\"https://openrouter.ai/docs/guides/overview/auth/oauth\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://openrouter.ai/docs/guides/overview/auth/oauth#article\",\"headline\":\"OAuth PKCE\",\"name\":\"OAuth PKCE\",\"description\":\"Connect your users to OpenRouter\",\"url\":\"https://openrouter.ai/docs/guides/overview/auth/oauth\",\"mainEntityOfPage\":{\"@id\":\"https://openrouter.ai/docs/guides/overview/auth/oauth#webpage\"},\"image\":\"https://openrouter.ai/dynamic-og?pathname=use-cases/oauth-pkce\u0026title=OAuth%20PKCE\u0026description=Secure%20one-click%20authentication%20for%20your%20OpenRouter%20users\",\"dateModified\":\"2026-08-08T19:05:56.363Z\",\"publisher\":{\"@id\":\"https://openrouter.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://openrouter.ai/docs#website\"}}]}"])</script><script>self.__next_f.push([1,"44:[\"$\",\"$L46\",null,{\"theme\":\"mint\",\"pageMetadata\":{\"title\":\"OAuth PKCE\",\"description\":\"Connect your users to OpenRouter\",\"seoTitle\":\"OAuth PKCE | Secure Authentication for OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OAuth PKCE - Secure User Authentication\",\"og:description\":\"Implement secure user authentication with OpenRouter using OAuth PKCE. Complete guide to setting up and managing OAuth authentication flows.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=use-cases/oauth-pkce\u0026title=OAuth%20PKCE\u0026description=Secure%20one-click%20authentication%20for%20your%20OpenRouter%20users\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"shield-check\",\"sidebarTitle\":\"OAuth\",\"href\":\"/guides/overview/auth/oauth\"},\"children\":[\"$\",\"$L47\",null,{\"value\":{\"apiReferenceData\":{},\"graphqlReferenceData\":\"$undefined\"},\"children\":[\"$\",\"$L48\",null,{\"value\":{\"pageMetadata\":\"$44:props:pageMetadata\",\"lastModified\":\"2026-08-08T19:05:56.363Z\",\"gitLastModified\":\"$undefined\",\"originalFileLocation\":\"guides/overview/auth/oauth.mdx\",\"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: \\\"Connect your users to OpenRouter\\\"\\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\":{}},\"mdxExtracts\":{\"tableOfContents\":[{\"title\":\"PKCE Guide\",\"slug\":\"pkce-guide\",\"depth\":2,\"children\":[{\"title\":\"Step 1: Send your user to OpenRouter\",\"slug\":\"step-1-send-your-user-to-openrouter\",\"depth\":3,\"children\":[]},{\"title\":\"How to Generate a Code Challenge\",\"slug\":\"how-to-generate-a-code-challenge\",\"depth\":4,\"children\":[]},{\"title\":\"Localhost Apps\",\"slug\":\"localhost-apps\",\"depth\":4,\"children\":[]},{\"title\":\"Headless Apps (SSH Servers, Containers)\",\"slug\":\"headless-apps-ssh-servers-containers\",\"depth\":4,\"children\":[]},{\"title\":\"Step 2: Exchange the code for a user-controlled API key\",\"slug\":\"step-2-exchange-the-code-for-a-user-controlled-api-key\",\"depth\":3,\"children\":[]},{\"title\":\"Deep-link to the user’s key\",\"slug\":\"deep-link-to-the-user’s-key\",\"depth\":3,\"children\":[]},{\"title\":\"Step 3: Use the API key\",\"slug\":\"step-3-use-the-api-key\",\"depth\":3,\"children\":[]}]},{\"title\":\"Error Codes\",\"slug\":\"error-codes\",\"depth\":2,\"children\":[]},{\"title\":\"External Tools\",\"slug\":\"external-tools\",\"depth\":2,\"children\":[]}],\"codeExamples\":{}},\"pageType\":\"$undefined\",\"panelMdxSource\":\"$undefined\",\"panelMdxSourceWithNoJs\":\"$undefined\",\"contextualStarterQuestions\":\"$undefined\",\"relatedPages\":\"$undefined\"},\"children\":[\"$\",\"$L49\",null,{\"pageMetadata\":\"$44:props:pageMetadata\",\"mdxExtracts\":\"$44:props:children:props:children:props:value:mdxExtracts\",\"openApiReferenceData\":\"$undefined\",\"children\":[\"$\",\"$L4a\",null,{\"children\":[[\"$\",\"script\",null,{\"type\":\"application/ld+json\",\"dangerouslySetInnerHTML\":{\"__html\":\"$4b\"}}],\"$L4c\",\"$L4d\",\"$L4e\",\"$L4f\",\"$L50\"]}]}]}]}]}]\n"])</script><script>self.__next_f.push([1,"51:I[228341,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"PageModeUpdater\"]\n"])</script><script>self.__next_f.push([1,"52:I[575126,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"Background\"]\n"])</script><script>self.__next_f.push([1,"54:I[36098,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"CustomJsFiles\"]\n"])</script><script>self.__next_f.push([1,"56:I[530359,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"MDXContentController\"]\n"])</script><script>self.__next_f.push([1,"57:I[448287,[\"/docs/_next/static/chunks/19ae1768f166fab9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/b664fc8bb1e7ab0d.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f5976305ab1768eb.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a5edc6734daa1561.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8195921497d29a61.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cde9521bba917b79.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0890ba15c670d9b1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/8778b596bb8e1fac.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/e157c74f66e9fd33.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f4004300900987e9.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cfd727ba62f1c54c.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/58c3a30fcb9735c1.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cc5fb492c7259b04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/9a9319ba237676a4.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/a919d558158c76f7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/c7c9dfd26f25e785.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/68ad056007b94e04.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0eb894a8519f24ea.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/cb00d03b4d1e9ae2.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/f48a8fa65184b0c7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/0dd7d15c30c41f1b.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/ca83a905f88dbab7.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/555577647291460f.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\",\"/docs/_next/static/chunks/2dd53f5a4cfe6dd5.js?dpl=dpl_DiH4JSspKRWUSpYuPX65YyMjrsgK\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"4c:[[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"document.documentElement.setAttribute('data-page-mode', \\\"none\\\");\"}}],[\"$\",\"$L51\",null,{\"pageMetadata\":\"$44:props:pageMetadata\"}]]\n4d:[\"$\",\"$L52\",null,{\"pageMetadata\":\"$44:props:pageMetadata\"}]\n53:T1c7d,"])</script><script>self.__next_f.push([1,"/*\n * OpenRouter Docs — Bauhaus theme overrides\n *\n * Custom CSS for Mintlify to align with the bauhaus design system.\n * Uses Mintlify's exposed ID/element selectors for targeted styling.\n *\n * Brand palette:\n *   Ink #03080A   Cloud #FCFCFE   Grape #7624F4\n *   Volt #C8FF00  Coral #FF6849   Royal #035ADE\n */\n\n/* ── Code font: Geist Mono ── */\n@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600\u0026display=swap');\n\n/*\n * Inverse semantic pair mirrors packages/frontend/components/v2/theme.css.\n * Mintlify is a separate app, so its generated tooltip DOM uses the same\n * light Ink/Cloud and dark Cloud/Ink values through RGB channel variables.\n */\n:root {\n  --inverse: 3 8 10;\n  --inverse-foreground: 252 252 254;\n  --tooltip-background: var(--inverse);\n  --tooltip-foreground: var(--inverse-foreground);\n}\n\ncode,\npre,\npre code,\n.code-block code,\n[class*=\"code\"] code {\n  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;\n}\n\n/* ── Text selection: accent tint per DESIGN.md ── */\n::selection {\n  background: rgb(118 36 244 / 0.14);\n}\n\n.dark ::selection,\nhtml.dark ::selection {\n  background: rgb(200 255 0 / 0.14);\n  color: inherit;\n}\n\n/* ── Dark-mode accent swap: Volt (#C8FF00 = rgb(200 255 0)) per DESIGN.md ──\n * Mintlify + Tailwind use space-separated RGB: rgb(var(--primary-light) / alpha).\n * Override accent in dark mode from Grape to Volt. */\n.dark,\n[data-theme=\"dark\"],\nhtml.dark {\n  --primary: 200 255 0;\n  --primary-light: 200 255 0;\n  --primary-dark: 200 255 0;\n  --light-primary: 200 255 0;\n  --primary-foreground: 3 8 10;\n  --inverse: 252 252 254;\n  --inverse-foreground: 3 8 10;\n\n  /* ── Dark-mode border: Cloud at 14% per DESIGN.md ── */\n  --default-border-color: rgb(252 252 254 / 0.14);\n}\n\n/* ── Border radius: bauhaus 4/6/8px scale ── */\n#navbar {\n  border-radius: 0;\n}\n\n/* Sidebar active item */\n#sidebar a[aria-current=\"page\"],\nnav[aria-label=\"Pages\"] a[aria-current=\"page\"] {\n  border-radius: 8px;\n}\n\n/* Cards and code blocks */\n[data-component-part=\"code-block-root\"] {\n  border-radius: 8px;\n}\n\n/* ── Link styling per DESIGN.md ──\n * underline at 40% opacity of current color, full on hover, offset 2px */\na:not([class]) {\n  text-decoration-thickness: 1px;\n  text-underline-offset: 2px;\n  text-decoration-color: rgb(0 0 0 / 0.4);\n}\n\na:not([class]):hover {\n  text-decoration-color: currentColor;\n}\n\n.dark a:not([class]),\nhtml.dark a:not([class]) {\n  text-decoration-color: rgb(255 255 255 / 0.4);\n}\n\n.dark a:not([class]):hover,\nhtml.dark a:not([class]):hover {\n  text-decoration-color: currentColor;\n}\n\n/* ── Sidebar badges: outline style ── */\n.nav-tag-pill-text {\n  background: transparent !important;\n  color: rgb(0 0 0 / 0.5) !important;\n  border: 1px solid rgb(0 0 0 / 0.2) !important;\n}\n\n.dark .nav-tag-pill-text,\nhtml.dark .nav-tag-pill-text {\n  background: transparent !important;\n  color: rgb(252 252 254 / 0.5) !important;\n  border: 1px solid rgb(252 252 254 / 0.2) !important;\n}\n\n/* Match the home navbar logo height (h-6 / 1.5rem). */\n.nav-logo {\n  height: 1.5rem;\n}\n\n/* ── Sidebar expand chevrons: raise dark-mode contrast ──\n * Collapsible group toggles render a caret whose default dark tone\n * (gray-600 on Ink) is nearly invisible, so it isn't clear which items\n * have subsections. Derive the caret from Cloud via the DESIGN.md opacity\n * scale: muted-foreground (Cloud `a0`) at rest, full Cloud (foreground) on\n * hover — no custom hex outside the brand palette. */\n.dark nav[aria-label=\"Pages\"] button[aria-expanded] svg.transition-transform,\nhtml.dark nav[aria-label=\"Pages\"] button[aria-expanded] svg.transition-transform {\n  color: rgb(252 252 254 / 0.627);\n}\n\n.dark nav[aria-label=\"Pages\"] button[aria-expanded]:hover svg.transition-transform,\nhtml.dark nav[aria-label=\"Pages\"] button[aria-expanded]:hover svg.transition-transform {\n  color: rgb(252 252 254);\n}\n\n/* ── Sidebar expand chevrons: enlarge for legibility ──\n * The default caret (w-2 ≈ 8px) is easy to miss; bump its footprint so it\n * reads clearly as an expandable affordance. */\nnav[aria-label=\"Pages\"] button[aria-expanded] svg.transition-transform {\n  width: 0.625rem;\n  height: 0.625rem;\n}\n\n/* ── Tooltips: inverse surface pairing ──\n * Mintlify has a foreground variable for Radix tooltips but no matching\n * background variable, so both values are mirrored here from the inverse pair.\n * Radix opens tooltips as \"delayed-open\" on a normal hover but \"instant-open\"\n * when moving between triggers within its skip-delay window; cover both. */\n[data-radix-popper-content-wrapper]\n  \u003e div[data-state=\"delayed-open\"],\n[data-radix-popper-content-wrapper]\n  \u003e div[data-state=\"instant-open\"] {\n  background-color: rgb(var(--tooltip-background)) !important;\n  color: rgb(var(--tooltip-foreground)) !important;\n}\n\n/* ── Callout + code block alignment ──\n * A code block that is the only child of a callout body carries Mintlify's default\n * prose margins (mt-5 mb-8), which push the snippet down so it no longer lines\n * up with the top-aligned callout icon. Drop those margins so the snippet's\n * top edge aligns with the icon. */\n.callout [data-component-part=\"callout-content\"] \u003e .code-block:first-child {\n  margin-top: 0;\n}\n\n.callout [data-component-part=\"callout-content\"] \u003e .code-block:last-child {\n  margin-bottom: 0;\n}\n\n/* ── Floating code-block buttons: opaque background ──\n * Mintlify only backs the floating buttons (report / copy / ask) with\n * gray-100/gray-800 when the code block has no fade overlay\n * (group-[:not(:has([data-fade-overlay]))]). Collapsible/expandable blocks\n * always carry a fade overlay, so the buttons stay transparent and the code\n * text bleeds through behind them. Apply the same background unconditionally\n * so the buttons are legible on every code block. */\n[data-floating-buttons] button {\n  background-color: rgb(241 239 245);\n}\n\n.dark [data-floating-buttons] button,\nhtml.dark [data-floating-buttons] button {\n  background-color: rgb(40 38 44);\n}\n\n/* ── Changelog: Update tags as outline pills (matches sidebar badges) ── */\n[data-component-part=\"update-tag\"] {\n  border: 1px solid rgb(0 0 0 / 0.2);\n  border-radius: 9999px;\n  padding: 0.125rem 0.625rem;\n  font-size: 0.75rem;\n  line-height: 1.25rem;\n  color: rgb(0 0 0 / 0.6);\n}\n\n.dark [data-component-part=\"update-tag\"],\nhtml.dark [data-component-part=\"update-tag\"] {\n  border-color: rgb(252 252 254 / 0.2);\n  color: rgb(252 252 254 / 0.6);\n}\n\n/* ── Changelog: selected filter pill readability ──\n * Mintlify renders the active filter as bg-primary + text-white/90. In dark\n * mode our primary is Volt (#C8FF00), so switch the text to Ink per DESIGN.md. */\n.dark #changelog-filters-content button.bg-primary,\nhtml.dark #changelog-filters-content button.bg-primary {\n  color: rgb(3 8 10 / 0.9) !important;\n}\n\n/* ── Changelog: separate inline status badges from bullet text ── */\n.changelog-status-badge {\n  margin-left: 0.5rem;\n}\n\n.changelog-status-badge[data-color=\"gray\"] {\n  border: 1px solid rgb(3 8 10 / 0.3) !important;\n}\n\n.dark .changelog-status-badge[data-color=\"gray\"],\nhtml.dark .changelog-status-badge[data-color=\"gray\"] {\n  border-color: rgb(252 252 254 / 0.4) !important;\n}\n"])</script><script>self.__next_f.push([1,"4e:[[\"$\",\"style\",\"0\",{\"data-custom-css-index\":0,\"data-custom-css-path\":\"style.css\",\"dangerouslySetInnerHTML\":{\"__html\":\"$53\"}}]]\n55:T5b9,"])</script><script>self.__next_f.push([1,"/*\n * Deep links (e.g. #response-data-pricing-overrides) can land behind the\n * sticky navbar: the browser scrolls to the anchor before hydration and\n * font loading finish, and the subsequent layout shift moves the target\n * up underneath the header. Re-align the anchor once the page has fully\n * settled, unless the user has already scrolled on their own.\n */\nlet didUserScrollAway = false;\n\nfunction markUserScrollAway() {\n  didUserScrollAway = true;\n}\n\nfunction anchorIdFromHash() {\n  const rawId = window.location.hash.slice(1);\n  try {\n    return decodeURIComponent(rawId);\n  } catch {\n    return rawId;\n  }\n}\n\nfunction realignAnchor() {\n  if (didUserScrollAway) {\n    return;\n  }\n  const target = document.querySelector(`[id=\"${CSS.escape(anchorIdFromHash())}\"]`);\n  // scrollIntoView respects the target's CSS scroll-margin-top,\n  // which Mintlify sets to clear the sticky navbar.\n  target?.scrollIntoView();\n}\n\nasync function settleAnchorScroll() {\n  await (document.fonts?.ready ?? Promise.resolve());\n  setTimeout(realignAnchor, 150);\n}\n\nfunction initAnchorScrollFix() {\n  if (!window.location.hash) {\n    return;\n  }\n  for (const event of ['wheel', 'touchmove', 'keydown']) {\n    window.addEventListener(event, markUserScrollAway, { passive: true, once: true });\n  }\n  if (document.readyState === 'complete') {\n    settleAnchorScroll();\n  } else {\n    window.addEventListener('load', settleAnchorScroll, { once: true });\n  }\n}\n\ninitAnchorScrollFix();\n"])</script><script>self.__next_f.push([1,"4f:[\"$\",\"$L54\",null,{\"customJsDisabled\":false,\"jsFiles\":[{\"_id\":\"6a58359481eda2c0540fae86\",\"filePath\":\"anchor-scroll-fix.js\",\"subdomain\":\"openrouter-d02e98a0\",\"__v\":0,\"content\":\"$55\"}]}]\n58:Tc686,"])</script><script>self.__next_f.push([1,"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Frame,Heading,Note,OptimizedImage,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Users can connect to OpenRouter in one click using `,_jsx(_components.a,{href:`https://oauth.net/2/pkce/`,children:`Proof Key for Code Exchange (PKCE)`}),`.`]}),`\n`,_jsx(_components.p,{children:`Here’s a step-by-step guide:`}),`\n`,_jsx(Heading,{level:`2`,id:`pkce-guide`,children:`PKCE Guide`}),`\n`,_jsx(Heading,{level:`3`,id:`step-1-send-your-user-to-openrouter`,children:`Step 1: Send your user to OpenRouter`}),`\n`,_jsxs(_components.p,{children:[`To start the PKCE flow, send your user to OpenRouter’s `,_jsx(_components.code,{children:`/auth`}),` URL with a `,_jsx(_components.code,{children:`callback_url`}),` parameter pointing back to your site:`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`With S256 Code Challenge (Recommended)`,lines:`true`,wrap:`true`,numberOfLines:`2`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`https://openrouter.ai/auth?callback_url=\u003cYOUR_SITE_URL\u003e\u0026code_challenge=\u003cCODE_CHALLENGE\u003e\u0026code_challenge_method=S256`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(CodeBlock,{filename:`With Plain Code Challenge`,lines:`true`,wrap:`true`,numberOfLines:`2`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`https://openrouter.ai/auth?callback_url=\u003cYOUR_SITE_URL\u003e\u0026code_challenge=\u003cCODE_CHALLENGE\u003e\u0026code_challenge_method=plain`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(CodeBlock,{filename:`Without Code Challenge`,lines:`true`,wrap:`true`,numberOfLines:`2`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`https://openrouter.ai/auth?callback_url=\u003cYOUR_SITE_URL\u003e`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`code_challenge`}),` parameter is optional but recommended.`]}),`\n`,_jsxs(_components.p,{children:[`Your user will be prompted to log in to OpenRouter and authorize your app. After authorization, they will be redirected back to your site with a `,_jsx(_components.code,{children:`code`}),` parameter in the URL:`]}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=15dba3246f0072ad883418114aeec7a1`,alt:`Alt text`,\"data-og-width\":`1422`,width:`1422`,\"data-og-height\":`1220`,height:`1220`,\"data-path\":`assets/guides/overview/auth/oauth/auth-request.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?w=280\u0026fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=953215bd24b2c8cb6e2d78b993f00f4b 280w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?w=560\u0026fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=6845e3b224d25553d4b4bc85a8d97b38 560w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?w=840\u0026fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=b9449e1bfcd3fedc734d727242b552b0 840w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?w=1100\u0026fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=1daa366042035ff232278c9c009bc261 1100w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?w=1650\u0026fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=705ced2c2169396f56011429a9d09b3f 1650w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/auth-request.png?w=2500\u0026fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=6e4e2f737f92c516da3edeee6d978666 2500w`})}),`\n`,_jsxs(Tip,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Use SHA-256 for Maximum Security`})}),_jsxs(_components.p,{children:[`For maximum security, set `,_jsx(_components.code,{children:`code_challenge_method`}),` to `,_jsx(_components.code,{children:`S256`}),`, and set `,_jsx(_components.code,{children:`code_challenge`}),` to the base64 encoding of the sha256 hash of `,_jsx(_components.code,{children:`code_verifier`}),`.`]}),_jsxs(_components.p,{children:[`For more info, `,_jsx(_components.a,{href:`https://auth0.com/docs/get-started/authentication-and-authorization-flow/call-your-api-using-the-authorization-code-flow-with-pkce#parameters`,children:`visit Auth0’s docs`}),`.`]})]}),`\n`,_jsx(Heading,{level:`4`,id:`how-to-generate-a-code-challenge`,children:`How to Generate a Code Challenge`}),`\n`,_jsx(_components.p,{children:`The following example uses the Web Crypto API and the Buffer API to generate a code challenge for the S256 method. You will need a bundler to use the Buffer API in the web browser:`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Generate Code Challenge`,lines:`true`,numberOfLines:`11`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Buffer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'buffer'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createSHA256CodeChallenge`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`input`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`  const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` encoder`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` TextEncoder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`  const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` encoder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`encode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`input`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`  const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` hash`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` crypto`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subtle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`digest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'SHA-256'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`  return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Buffer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`hash`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'base64url'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` codeVerifier`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your-random-string'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` generatedCodeChallenge`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createSHA256CodeChallenge`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`codeVerifier`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`4`,id:`localhost-apps`,children:`Localhost Apps`}),`\n`,_jsxs(_components.p,{children:[`Localhost callbacks are supported on `,_jsx(_components.strong,{children:`any port`}),`. This is useful for CLI tools and local-first apps that bind to an arbitrary free OS port for the OAuth callback (e.g. `,_jsx(_components.code,{children:`http://localhost:51423/callback`}),`).`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Localhost apps are assigned a fixed title matching the host and port (e.g. `,_jsx(_components.code,{children:`localhost:3000`}),`) but will not appear in the OpenRouter marketplace or rankings. If you want a custom app name and marketplace presence, use a public URL as the callback instead.`]})}),`\n`,_jsx(_components.p,{children:`When moving to production, replace the localhost callback URL with a public URL (your project website or a GitHub repo link) to get full app attribution.`}),`\n`,_jsx(Heading,{level:`4`,id:`headless-apps-ssh-servers-containers`,children:`Headless Apps (SSH Servers, Containers)`}),`\n`,_jsxs(_components.p,{children:[`If your app runs where a localhost callback can’t be reached (an SSH session, a remote dev box, a container), omit `,_jsx(_components.code,{children:`callback_url`}),` entirely:`]}),`\n`,_jsx(CodeBlock,{filename:`Headless (No Callback)`,lines:`true`,wrap:`true`,numberOfLines:`2`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`https://openrouter.ai/auth?code_challenge=\u003cCODE_CHALLENGE\u003e\u0026code_challenge_method=S256\u0026key_label=\u003cYOUR_APP_NAME\u003e`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`After the user authorizes, the page displays the authorization code on screen instead of redirecting. The user copies it and pastes it into your app (e.g. at a terminal prompt), and you exchange it in Step 2 exactly as usual.`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`code_challenge`}),` is `,_jsx(_components.strong,{children:`required`}),` in this mode: because the code is displayed on screen, PKCE ensures it is useless to anyone without your app’s `,_jsx(_components.code,{children:`code_verifier`}),`. The code is single-use and expires after 10 minutes.`]}),`\n`,_jsx(Heading,{level:`3`,id:`step-2-exchange-the-code-for-a-user-controlled-api-key`,children:`Step 2: Exchange the code for a user-controlled API key`}),`\n`,_jsxs(_components.p,{children:[`After the user logs in with OpenRouter, they are redirected back to your site with a `,_jsx(_components.code,{children:`code`}),` parameter in the URL:`]}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=10315413fb904ebcc3df28e2e9ccb0c1`,alt:`Alt text`,\"data-og-width\":`1850`,width:`1850`,\"data-og-height\":`296`,height:`296`,\"data-path\":`assets/guides/overview/auth/oauth/code-challenge.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?w=280\u0026fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=2a4ab60c35b17978557d2e87ff4efb21 280w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?w=560\u0026fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=4752b70cc85c53fc1fbbafab813166c0 560w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?w=840\u0026fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=c6256286fa67eb1026509f5cf724c491 840w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?w=1100\u0026fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=c3427d8ae0bde66ba7baaca6d956a6ec 1100w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?w=1650\u0026fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=4942facdfebb381007309752b56707a3 1650w, https://mintcdn.com/openrouter-d02e98a0/PSwwwiCqAD_BNeni/assets/guides/overview/auth/oauth/code-challenge.png?w=2500\u0026fit=max\u0026auto=format\u0026n=PSwwwiCqAD_BNeni\u0026q=85\u0026s=47e92ff14d2c0cf0c5f4bbc704a5ac29 2500w`})}),`\n`,_jsx(_components.p,{children:`Extract this code using the browser API:`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Extract Code`,lines:`true`,numberOfLines:`2`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` urlParams`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` URLSearchParams`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` code`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` urlParams`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'code'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`Then use it to make an API call to `,_jsx(_components.code,{children:`https://openrouter.ai/api/v1/auth/keys`}),` to exchange the code for a user-controlled API key:`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Exchange Code`,lines:`true`,numberOfLines:`13`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://openrouter.ai/api/v1/auth/keys'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`  method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`  headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`    'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`  },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`  body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`    code:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\u003cCODE_FROM_QUERY_PARAM\u003e'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`    code_verifier:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\u003cCODE_VERIFIER\u003e'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// If code_challenge was used`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`    code_challenge_method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\u003cCODE_CHALLENGE_METHOD\u003e'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// If code_challenge was used`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`  }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`deep-link-to-the-user’s-key`,children:`Deep-link to the user’s key`}),`\n`,_jsx(_components.p,{children:`Once you have the API key, you can create links to the user’s OpenRouter\nactivity and key settings pages by hashing the key with SHA-256. Use the\nlowercase hexadecimal digest in both URLs:`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Create Key Links`,lines:`true`,numberOfLines:`11`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` sha256Hex`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`  const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` TextEncoder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`encode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`  const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` hash`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` crypto`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subtle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`digest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'SHA-256'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`  return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Array`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Uint8Array`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`hash`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`byte`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=\u003e`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`    byte`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`16`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`padStart`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'0'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`  ).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`join`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`''`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` keyHash`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` sha256Hex`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` logsUrl`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `https://openrouter.ai/logs?api_key_hash=\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`keyHash`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` settingsUrl`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `https://openrouter.ai/keys/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`keyHash`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`The links only work for the signed-in owner of the API key. If the hash does\nnot resolve for the viewer, the page returns a `,_jsx(_components.code,{children:`404`}),` rather than showing\nunfiltered data.`]}),`\n`,_jsx(_components.p,{children:`And that’s it for the PKCE flow!`}),`\n`,_jsx(Heading,{level:`3`,id:`step-3-use-the-api-key`,children:`Step 3: Use the API key`}),`\n`,_jsxs(_components.p,{children:[`Store the API key securely within the user’s browser or in your own database, and use it to `,_jsx(_components.a,{href:`/api_reference/overview`,children:`make OpenRouter requests`}),`.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`TypeScript SDK`,lines:`true`,numberOfLines:`18`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OpenRouter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@openrouter/sdk'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` openRouter`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` OpenRouter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`  apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// The key from Step 2`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` completion`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` openRouter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chat`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`send`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`  model:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '~openai/gpt-latest'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`  messages:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`    {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`      role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'user'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`      content:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Hello!'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`    },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`  ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`  stream:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`choices`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript (fetch)`,lines:`true`,numberOfLines:`16`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://openrouter.ai/api/v1/chat/completions'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`  method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`  headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`    Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Bearer \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`key`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`    'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`  },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`  body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`    model:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '~openai/gpt-latest'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`    messages:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`      {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`        role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'user'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`        content:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Hello!'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`      },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`    ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`  }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`error-codes`,children:`Error Codes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`400 Invalid code_challenge_method`}),`: Make sure you’re using the same code challenge method in step 1 as in step 2.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`403 Invalid code or code_verifier`}),`: Make sure your user is logged in to OpenRouter, and that `,_jsx(_components.code,{children:`code_verifier`}),` and `,_jsx(_components.code,{children:`code_challenge_method`}),` are correct.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`403 Authorization code expired`}),`: Authorization codes expire 10 minutes after issuance. Restart the OAuth flow and exchange the new code promptly.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`405 Method Not Allowed`}),`: Make sure you’re using `,_jsx(_components.code,{children:`POST`}),` and `,_jsx(_components.code,{children:`HTTPS`}),` for your request.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`external-tools`,children:`External Tools`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://example-app.com/pkce`,children:`PKCE Tools`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://tonyxu-io.github.io/pkce-generator/`,children:`Online PKCE Generator`})}),`\n`]})]})}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.\")}"])</script><script>self.__next_f.push([1,"50:[\"$\",\"$L56\",null,{\"slug\":\"guides/overview/auth/oauth\",\"pageMetadata\":\"$44:props:pageMetadata\",\"theme\":\"mint\",\"children\":[\"$\",\"$L57\",null,{\"mdxSource\":{\"compiledSource\":\"$58\",\"frontmatter\":{},\"scope\":{\"config\":{},\"pageMetadata\":{\"title\":\"OAuth PKCE\",\"description\":\"Connect your users to OpenRouter\",\"seoTitle\":\"OAuth PKCE | Secure Authentication for OpenRouter\",\"og:site_name\":\"OpenRouter Documentation\",\"og:title\":\"OAuth PKCE - Secure User Authentication\",\"og:description\":\"Implement secure user authentication with OpenRouter using OAuth PKCE. Complete guide to setting up and managing OAuth authentication flows.\",\"og:image\":\"https://openrouter.ai/dynamic-og?pathname=use-cases/oauth-pkce\u0026title=OAuth%20PKCE\u0026description=Secure%20one-click%20authentication%20for%20your%20OpenRouter%20users\",\"og:image:width\":1200,\"og:image:height\":630,\"twitter:card\":\"summary_large_image\",\"twitter:site\":\"@OpenRouter\",\"noindex\":false,\"nofollow\":false,\"icon\":\"shield-check\",\"sidebarTitle\":\"OAuth\",\"href\":\"/guides/overview/auth/oauth\"}}},\"mdxSourceWithNoJs\":\"$undefined\",\"displayDomain\":\"openrouter.ai/docs\"}]}]\n"])</script><script>(function(){function c(){var b=a.contentDocument||(a.contentWindow&&a.contentWindow.document);if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'a2e964f89fdd16f4',t:'MTc4NzMxMjc1Ng=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script><script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496" integrity="sha512-ZE9pZaUXND66v380QUtch/5sE9tPFh2zg45pR2PB0CVkCtOREv2AJKkSidISWkysEuQ0EH8faUU5du78bx87UQ==" data-cf-beacon='{"version":"2024.11.0","token":"805cc649ceeb4d638e3690a3ff168bfe"}' crossorigin="anonymous"></script>
</body></html>