[{"data":1,"prerenderedAt":288},["ShallowReactive",2],{"navigation_docs":3,"landing":169},[4,27,53,119,145,159],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":26},"Getting started","i-lucide-rocket","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started",[10,14,18,22],{"title":11,"path":12,"stem":13},"Introduction","\u002Fdocs\u002Fgetting-started\u002Fintroduction","docs\u002F1.getting-started\u002F1.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002F1.getting-started\u002F2.installation",{"title":19,"path":20,"stem":21},"Register the application","\u002Fdocs\u002Fgetting-started\u002Fregister-the-application","docs\u002F1.getting-started\u002F3.register-the-application",{"title":23,"path":24,"stem":25},"Quick start","\u002Fdocs\u002Fgetting-started\u002Fquick-start","docs\u002F1.getting-started\u002F4.quick-start",false,{"title":28,"icon":29,"path":30,"stem":31,"children":32,"page":26},"Concepts","i-lucide-book-open","\u002Fdocs\u002Fconcepts","docs\u002F2.concepts",[33,37,41,45,49],{"title":34,"path":35,"stem":36},"Architecture","\u002Fdocs\u002Fconcepts\u002Farchitecture","docs\u002F2.concepts\u002F1.architecture",{"title":38,"path":39,"stem":40},"Sessions and grants","\u002Fdocs\u002Fconcepts\u002Fsessions-and-grants","docs\u002F2.concepts\u002F2.sessions-and-grants",{"title":42,"path":43,"stem":44},"Entitlements","\u002Fdocs\u002Fconcepts\u002Fentitlements","docs\u002F2.concepts\u002F3.entitlements",{"title":46,"path":47,"stem":48},"Credit wallet and LiteLLM gateway","\u002Fdocs\u002Fconcepts\u002Fwallet-and-gateway","docs\u002F2.concepts\u002F4.wallet-and-gateway",{"title":50,"path":51,"stem":52},"Security model","\u002Fdocs\u002Fconcepts\u002Fsecurity-model","docs\u002F2.concepts\u002F5.security-model",{"title":54,"icon":55,"path":56,"stem":57,"children":58,"page":26},"Guides","i-lucide-compass","\u002Fdocs\u002Fguides","docs\u002F3.guides",[59,81,91,105],{"title":60,"icon":61,"path":62,"stem":63,"children":64,"page":26},"Backend","i-lucide-server","\u002Fdocs\u002Fguides\u002Fbackend","docs\u002F3.guides\u002F1.backend",[65,69,73,77],{"title":66,"path":67,"stem":68},"FastAPI backend","\u002Fdocs\u002Fguides\u002Fbackend\u002Ffastapi","docs\u002F3.guides\u002F1.backend\u002F1.fastapi",{"title":70,"path":71,"stem":72},"Other frameworks","\u002Fdocs\u002Fguides\u002Fbackend\u002Fother-frameworks","docs\u002F3.guides\u002F1.backend\u002F2.other-frameworks",{"title":74,"path":75,"stem":76},"Protect an API","\u002Fdocs\u002Fguides\u002Fbackend\u002Fprotect-an-api","docs\u002F3.guides\u002F1.backend\u002F3.protect-an-api",{"title":78,"path":79,"stem":80},"Implement the stores","\u002Fdocs\u002Fguides\u002Fbackend\u002Fcustom-stores","docs\u002F3.guides\u002F1.backend\u002F4.custom-stores",{"title":82,"icon":83,"path":84,"stem":85,"children":86,"page":26},"Frontend","i-lucide-monitor","\u002Fdocs\u002Fguides\u002Ffrontend","docs\u002F3.guides\u002F2.frontend",[87],{"title":88,"path":89,"stem":90},"Use the TypeScript client","\u002Fdocs\u002Fguides\u002Ffrontend\u002Fuse-the-typescript-client","docs\u002F3.guides\u002F2.frontend\u002F1.use-the-typescript-client",{"title":92,"icon":93,"path":94,"stem":95,"children":96,"page":26},"AI and billing","i-lucide-wallet","\u002Fdocs\u002Fguides\u002Fai-and-billing","docs\u002F3.guides\u002F3.ai-and-billing",[97,101],{"title":98,"path":99,"stem":100},"Call the LiteLLM gateway","\u002Fdocs\u002Fguides\u002Fai-and-billing\u002Flitellm-gateway","docs\u002F3.guides\u002F3.ai-and-billing\u002F1.litellm-gateway",{"title":102,"path":103,"stem":104},"Billing and consumption","\u002Fdocs\u002Fguides\u002Fai-and-billing\u002Fbilling-and-consumption","docs\u002F3.guides\u002F3.ai-and-billing\u002F2.billing-and-consumption",{"title":106,"icon":107,"path":108,"stem":109,"children":110,"page":26},"Operations","i-lucide-settings-2","\u002Fdocs\u002Fguides\u002Foperations","docs\u002F3.guides\u002F4.operations",[111,115],{"title":112,"path":113,"stem":114},"Production checklist","\u002Fdocs\u002Fguides\u002Foperations\u002Fproduction-checklist","docs\u002F3.guides\u002F4.operations\u002F1.production-checklist",{"title":116,"path":117,"stem":118},"Example app","\u002Fdocs\u002Fguides\u002Foperations\u002Fexample-app","docs\u002F3.guides\u002F4.operations\u002F2.example-app",{"title":120,"icon":121,"path":122,"stem":123,"children":124,"page":26},"Reference","i-lucide-list-tree","\u002Fdocs\u002Freference","docs\u002F4.reference",[125,129,133,137,141],{"title":126,"path":127,"stem":128},"Configuration","\u002Fdocs\u002Freference\u002Fconfiguration","docs\u002F4.reference\u002F1.configuration",{"title":130,"path":131,"stem":132},"Core API","\u002Fdocs\u002Freference\u002Fcore-api","docs\u002F4.reference\u002F2.core-api",{"title":134,"path":135,"stem":136},"Server API","\u002Fdocs\u002Freference\u002Fserver-api","docs\u002F4.reference\u002F3.server-api",{"title":138,"path":139,"stem":140},"Web handlers and ASGI","\u002Fdocs\u002Freference\u002Fweb-and-asgi","docs\u002F4.reference\u002F4.web-and-asgi",{"title":142,"path":143,"stem":144},"Error codes","\u002Fdocs\u002Freference\u002Ferror-codes","docs\u002F4.reference\u002F5.error-codes",{"title":146,"icon":147,"path":148,"stem":149,"children":150,"page":26},"Project","i-lucide-map","\u002Fdocs\u002Fproject","docs\u002F5.project",[151,155],{"title":152,"path":153,"stem":154},"Roadmap","\u002Fdocs\u002Fproject\u002Froadmap","docs\u002F5.project\u002F1.roadmap",{"title":156,"path":157,"stem":158},"Release channels","\u002Fdocs\u002Fproject\u002Frelease-channels","docs\u002F5.project\u002F2.release-channels",{"title":160,"icon":161,"path":162,"stem":163,"children":164,"page":26},"Community","i-lucide-users","\u002Fdocs\u002Fcommunity","docs\u002F6.community",[165],{"title":166,"path":167,"stem":168},"Contributing","\u002Fdocs\u002Fcommunity\u002Fcontributing","docs\u002F6.community\u002F1.contributing",{"id":170,"title":171,"body":172,"description":171,"extension":279,"meta":280,"navigation":281,"path":282,"seo":283,"stem":286,"__hash__":287},"landing\u002Findex.md","",{"type":173,"value":174,"toc":276},"minimark",[175,220],[176,177,180,184,201],"u-page-hero",{"className":178},[179],"circle-hero",[181,182,183],"template",{"v-slot:title":171},"CIRCLE auth-ai (Python)",[181,185,186,187,194,195,200],{"v-slot:description":171},"A Python SDK for applications that sign their users in through a ",[188,189,193],"a",{"href":190,"rel":191},"https:\u002F\u002Fdocs.circle-cyber.com\u002Fauth-service\u002F",[192],"nofollow","CIRCLE auth-service",". Run the OIDC flow on your asyncio backend, keep tokens off the browser, read roles and plan features, and let users call LLMs through the LiteLLM gateway against their credit wallet. It is the Python port of the ",[188,196,199],{"href":197,"rel":198},"https:\u002F\u002Fdocs.circle-cyber.com\u002Fauth-ai\u002Ftypescript\u002F",[192],"TypeScript SDK",", with the same wire contract.",[181,202,203,210,214],{"v-slot:links":171},[204,205,209],"u-button",{"color":206,"size":207,"to":12,"trailing-icon":208},"neutral","xl","i-lucide-arrow-right","Get started",[204,211,199],{"color":206,"size":207,"to":197,"icon":212,"variant":213},"i-simple-icons-typescript","outline",[204,215,219],{"color":206,"size":207,"to":216,"icon":217,"variant":213,"target":218},"https:\u002F\u002Fgithub.com\u002Fcircle-rd\u002Fauth-ai-py","i-simple-icons-github","_blank","GitHub",[221,222,225,228],"u-page-section",{"className":223},[224],"circle-section",[181,226,227],{"v-slot:title":171},"What it does",[181,229,230,236,241,245,250,253,257,261,266,271],{"v-slot:features":171},[231,232],"u-page-feature",{"description":233,"icon":234,"title":235},"Authorization code flow with PKCE on your server. The browser only holds an opaque, HttpOnly session cookie: access and refresh tokens never reach it.","i-lucide-shield-check","Backend-for-frontend sign-in",[231,237],{"description":238,"icon":239,"title":240},"One refresh-token chain per user, rotated under a lock, and short-lived access tokens minted per audience (RFC 8707) for your API, the gateway and auth-service.","i-lucide-key-round","Grants and per-audience tokens",[231,242],{"description":243,"icon":161,"title":244},"Roles, permissions, plan features and organisation are read from the ID token and renewed from the provider on a schedule. has_role, has_permission, has_feature and get_feature are typed helpers.","Entitlements from claims",[231,246],{"description":247,"icon":248,"title":249},"OIDC Back-Channel Logout verified and replay-protected: signing out of auth-service ends your local sessions and revokes the grant.","i-lucide-log-out","Back-channel logout",[231,251],{"description":252,"icon":93,"title":46},"Read the user's prepaid balance and spend, and call an OpenAI-compatible gateway with the user's own token through an httpx2 client. The gateway debits the wallet; your app never handles a debit.",[231,254],{"description":255,"icon":256,"title":102},"From your backend with a machine token: read a user's subscription, metered usage and invoices, and report consumption with idempotency keys.","i-lucide-receipt",[231,258],{"description":259,"icon":260,"title":74},"Verify JWT bearer tokens for your own audience, require scopes, and publish RFC 9728 protected-resource metadata so MCP and OAuth clients can discover the provider.","i-lucide-lock",[231,262],{"description":263,"icon":264,"title":265},"An adapter for FastAPI and Starlette, and framework-agnostic WebRequest and WebResponse handlers you can bridge to any other framework.","i-lucide-layers","FastAPI, Starlette, any ASGI framework",[231,267],{"description":268,"icon":269,"title":270},"Python 3.12 or later, built on httpx2 and pydantic, shipped with type information (py.typed). Pair it with the TypeScript browser client and the React and Vue bindings.","i-lucide-code","Async and typed",[231,272],{"description":273,"icon":274,"title":275},"Every failure is an AuthAiError with a stable code. Details stay in your logs; HTTP responses carry the code and a generic message only.","i-lucide-triangle-alert","Errors safe to show",{"title":171,"searchDepth":277,"depth":277,"links":278},2,[],"md",{},true,"\u002F",{"title":284,"description":285},"CIRCLE auth-ai (Python) — Python SDK for auth-service applications","Python SDK for applications relying on a CIRCLE auth-service identity provider. Async backend-for-frontend OIDC sign-in, entitlements from claims, back-channel logout, bearer token verification, credit wallet, LiteLLM gateway client, billing and consumption.","index","exU0QzNc7H-L-YWEEP3tDkhYDUKwTbuql6biC7SE_2c",1794131106865]