Billing Modes
Quota supports two billing modes: developer billing and user billing.
Developer Billing (Default)
In developer billing mode, all AI usage is charged to your developer account. This is the simplest mode and works well for:
- Internal tools
- Fixed-price products
- Freemium apps where you absorb AI costs
How it works
// All requests use your API key
const client = new OpenAI({
baseURL: "https://api.usequota.app/v1",
apiKey: "sk-quota-your-api-key",
});
// Credits deducted from YOUR balance
await client.chat.completions.create({...});User Billing
In user billing mode, you can give each of your users their own credit balance. Credits are deducted from the user's balance instead of yours. This works well for:
- Pay-as-you-go products
- Apps where users buy credits
- Multi-tenant platforms
How it works
// First, fund the user's wallet
await fetch("https://api.usequota.app/v1/funding/credit", {
method: "POST",
headers: {
"Authorization": "Bearer sk-quota-your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
external_user_id: "user_123",
amount: 1000,
}),
});
// Then, make requests on their behalf
await fetch("https://api.usequota.app/v1/users/user_123/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer sk-quota-your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "gpt-4o",
messages: [{role: "user", content: "Hello!"}],
}),
});
// Credits deducted from USER's balanceChoosing a Mode
| Consideration | Developer Billing | User Billing |
|---|---|---|
| Setup complexity | Simple | Requires user management |
| Cost control | You control all costs | Users control their costs |
| Revenue model | Subscription or free | Per-use or credit packs |