Production API base URL:
https://api.paywalls.ai/v1
Get started in minutes
1
Create an API key
Sign up and create a paywall in the Dashboard. Copy the secret API key.
2
Point your client to the proxy
Replace your OpenAI base URL and key with Paywalls.ai.
3
Identify the user on every request
Pass a stable user ID via request body (
user
) or header (X-Paywall-User
).This enables authorization and billing.Learn more: User Identity
4
Handle paywall responses
- Not authorized → you’ll get an authorization URL
- Low balance → you’ll get a top-up URL
- Authorized + funded → request is billed and proxied to the model
Why Paywalls.ai
- Drop-in OpenAI compatibility (no SDK lock-in)
- Real-time cost control and guaranteed margins
- Works with any stack: code and no-code
- Monetize anywhere: frontends, backends, agents, and MCP tools
What happens on each request
- Authenticate your paywall via Bearer API key
- Extract user ID (body, header, or URL)
- Check authorization and balance; return actionable links if needed
- Compute and charge per your pricing rules (per-request and/or per-token)
- Forward to the provider and stream results back
Explore next
Quickstart
First proxy request and common patterns.
Overview
Architecture, flows, and core components.
User Identity
How to pass user IDs (body, header, URL).
Proxy
Endpoint, auth, and runtime behavior.
Payments
Authorization and top-up flows.
Billing
Pricing rules, metering, and charging.
Configuration
Set up rules, limits, and defaults.
API Reference
Endpoints, schemas, and examples.