Let users bring their AI wallet to your app.
Stop eating your users' LLM bills or building complex billing meters. Users connect their funded Zorveus wallet to your AI app with custom spending caps. You execute model inference, Zorveus handles the billing.
5-minute setup · TypeScript & Python SDKs · No credit card required
Connect user wallets in minutes
Allow end-users to authorize your app with OAuth 2.0 PKCE and fund model inference directly.
import { ZorveusOAuth } from "@zorveus/sdk";
// 1. Generate PKCE verifier, S256 challenge, and state CSRF token
const pkce = ZorveusOAuth.generatePKCE();
sessionStorage.setItem("zorveus_code_verifier", pkce.codeVerifier);
sessionStorage.setItem("zorveus_auth_state", pkce.state);
// 2. Build authorization URL (requests inference & model access)
const authUrl = ZorveusOAuth.getAuthorizationUrl({
clientId: process.env.NEXT_PUBLIC_ZORVEUS_CLIENT_ID!,
redirectUri: "https://myapp.com/oauth/callback",
state: pkce.state,
codeChallenge: pkce.codeChallenge,
scopes: ["inference:write", "models:*"],
});
// 3. Redirect browser to Zorveus authorization consent page
window.location.href = authUrl;import { ZorveusOAuth } from "@zorveus/sdk";
// 1. Generate PKCE verifier, S256 challenge, and state CSRF token
const pkce = ZorveusOAuth.generatePKCE();
sessionStorage.setItem("zorveus_code_verifier", pkce.codeVerifier);
sessionStorage.setItem("zorveus_auth_state", pkce.state);
// 2. Build authorization URL (requests inference & model access)
const authUrl = ZorveusOAuth.getAuthorizationUrl({
clientId: process.env.NEXT_PUBLIC_ZORVEUS_CLIENT_ID!,
redirectUri: "https://myapp.com/oauth/callback",
state: pkce.state,
codeChallenge: pkce.codeChallenge,
scopes: ["inference:write", "models:*"],
});
// 3. Redirect browser to Zorveus authorization consent page
window.location.href = authUrl;import { ZorveusOAuth } from "@zorveus/sdk";
// 1. Read stored state & verifier on callback page
const savedState = sessionStorage.getItem("zorveus_auth_state");
const codeVerifier = sessionStorage.getItem("zorveus_code_verifier");
// 2. Validate callback state CSRF token
const validation = ZorveusOAuth.validateCallback(window.location.href, savedState);
// 3. Exchange authorization code for user access token
const tokenResponse = await ZorveusOAuth.exchangeToken({
clientId: process.env.NEXT_PUBLIC_ZORVEUS_CLIENT_ID!,
code: validation.code!,
codeVerifier: codeVerifier!,
redirectUri: "https://myapp.com/oauth/callback",
});
// Note: The OAuth access_token IS the user's API key for inference
const userApiKey = tokenResponse.access_token;import { ZorveusOAuth } from "@zorveus/sdk";
// 1. Read stored state & verifier on callback page
const savedState = sessionStorage.getItem("zorveus_auth_state");
const codeVerifier = sessionStorage.getItem("zorveus_code_verifier");
// 2. Validate callback state CSRF token
const validation = ZorveusOAuth.validateCallback(window.location.href, savedState);
// 3. Exchange authorization code for user access token
const tokenResponse = await ZorveusOAuth.exchangeToken({
clientId: process.env.NEXT_PUBLIC_ZORVEUS_CLIENT_ID!,
code: validation.code!,
codeVerifier: codeVerifier!,
redirectUri: "https://myapp.com/oauth/callback",
});
// Note: The OAuth access_token IS the user's API key for inference
const userApiKey = tokenResponse.access_token;import { Zorveus } from "@zorveus/sdk";
// 1. Initialize Zorveus client using the user's access_token as the API key
const client = new Zorveus({ apiKey: userApiKey });
// 2. Execute AI inference charged directly to the user's wallet
const response = await client.chat.completions.create({
model: "openai/gpt-4o",
messages: [{ role: "user", content: "Summarize Q3 financial report." }],
});
console.log(response.choices[0].message.content);import { Zorveus } from "@zorveus/sdk";
// 1. Initialize Zorveus client using the user's access_token as the API key
const client = new Zorveus({ apiKey: userApiKey });
// 2. Execute AI inference charged directly to the user's wallet
const response = await client.chat.completions.create({
model: "openai/gpt-4o",
messages: [{ role: "user", content: "Summarize Q3 financial report." }],
});
console.log(response.choices[0].message.content);npm i @zorveus/sdkYour app makes requests.
Zorveus handles billing.
Users connect their Zorveus wallet through OAuth. Your app uses their access token to request models, and Zorveus charges their wallet for usage.
Your app
Sends a model request with the user's access token.
Checks access and spending limits, then routes the request.
Model providers
OpenAI, Anthropic, Gemini, and other supported providers.
Zorveus bills usage toUsage billed to
User's Zorveus wallet
The user approves how much your app can spend.
- User-funded requests
- Usage is charged to the connected wallet. Your app does not collect payment details.
- User-controlled limits
- Users approve how much your app can spend when they connect.
- One model gateway
- Use the same access token to call supported models across providers.
Start building in under 5 minutes
Create a developer workspace, register your client application, and connect your first user wallet.