# Wattfare > Wattfare is an OAuth-like consent layer for AI spend. Your users connect their own LLM inference budget, set a spending cap, and you call any model through one SDK — billed to them, not you. This is the llms.txt index (see https://llmstxt.org). Each link points to a clean Markdown version of a docs page. For every page in a single file, fetch https://wattfare.com/llms-full.txt. ## Build with AI - [Prompts & AI editors](https://wattfare.com/docs/ai.md): Wattfare is built to be wired in by an AI coding agent. Copy the prompt below into Cursor, Claude Code, Lovable, Bolt, or v0 — it carries the whole integration, so the agent can ship it in one pass. - [Docs for LLMs](https://wattfare.com/docs/ai/llms-txt.md): Every page of these docs is published as plain text following the llms.txt standard — optimised for AI coding assistants and autonomous agents that want structured content without the HTML. ## Getting started - [Introduction](https://wattfare.com/docs.md): Wattfare is an OAuth-like consent layer for AI spend. Your users connect their own inference budget, set a cap, and you call any model through one SDK — charged to them, not you. - [Quickstart](https://wattfare.com/docs/quickstart.md): From zero to a working “Connect AI budget” button in about five minutes. Five steps: install, get keys, mint sessions, connect, infer. - [How it works](https://wattfare.com/docs/concepts.md): The consent flow, the moving parts, and the guarantees behind them. Read this once and the SDK reference will feel obvious. - [One-time grants](https://wattfare.com/docs/grants.md): One-time grants let users approve a fixed number of AI requests without signing in or creating a persistent connection — ideal for single-purpose tools like file converters, text rewriters, or any feature where users interact once and move on. ## SDK reference - [Server SDK](https://wattfare.com/docs/server-sdk.md): Import from wattfare/server. This runs on your backend, holds the secret key, and brokers everything that must never touch the browser — minting sessions and running inference. - [Client SDK](https://wattfare.com/docs/client-sdk.md): Import from wattfare/client. Framework-agnostic, runs in the browser, never touches the secret key — it works entirely with session tokens minted by your backend. - [React SDK](https://wattfare.com/docs/react-sdk.md): Import from wattfare/react. A provider that owns one client, and a useWattfare() hook that exposes reactive connection state and the connect / disconnect / refresh actions. - [Error handling](https://wattfare.com/docs/errors.md): Every SDK error extends WattfareError. The “not connected” case is the expected first-run path, so it's modeled as a branch — not a crash. Helpers recover typed errors even when the AI SDK wraps them. ## Guides - [Next.js integration](https://wattfare.com/docs/guides/nextjs.md): A complete Next.js App Router integration: a shared server client, a session route, a streaming chat route, the provider, and a chat UI that tracks budget. Copy it wholesale. - [Error recovery](https://wattfare.com/docs/guides/error-recovery.md): Every failure mode maps to a specific, recoverable piece of UI. This guide turns Wattfare's typed errors into states your users actually understand — connect, top up, slow down, or retry. - [Budget UI patterns](https://wattfare.com/docs/guides/budget-ui.md): The budget is the part of your product users feel. These patterns — a clear connect button, a live budget bar, depletion warnings, and an obvious disconnect — turn “AI billing” into something users trust. ## Platform - [HTTP API](https://wattfare.com/docs/api-reference.md): The raw REST API the SDK wraps. You rarely call this directly — the SDK handles auth, token caching, and error typing — but it's here for debugging, non-JS stacks, and custom integrations.