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 balance

Choosing a Mode

ConsiderationDeveloper BillingUser Billing
Setup complexitySimpleRequires user management
Cost controlYou control all costsUsers control their costs
Revenue modelSubscription or freePer-use or credit packs