Skip to main content
Client‑agnostic by design. If your client can call an OpenAI‑style HTTP API, it works with Paywalls. In most cases you only change the baseURL and the API key — no new SDK integration or code changes required. Works with: official OpenAI SDK, Vercel AI SDK, OpenRouter SDK, community clients, and plain HTTP requests. Edge/serverless runtimes are supported. Compatibility: Chat Completions (including streaming), tools/function‑calling, JSON/structured outputs.

OpenAI SDK

Vercel AI SDK with Next.js

OpenRouter

Together AI

Environment Setup

Ensure you have your Paywalls API key set in your environment variables:
Always send a stable, pseudonymous user id. For browser-only apps, do not expose your paywall key — use a server or edge function.