Tiers & Margins
Tiers define pricing plans for your customers. Each tier has two key parameters: subscription price (what customers pay) and API budget (how much AI usage they get). Your profit is the difference.
The Pricing Model
ModelRelay uses a simple two-knob pricing model:
Profit = Subscription Price - (API Budget × 1.045)
- Subscription price: What your customer pays per month/year
- API budget: Monthly allowance for AI provider costs
- 1.045: Provider cost + 4.5% ModelRelay platform fee
Token prices are fixed at provider cost + 4.5%. You don’t configure per-token markup—you control margins through the gap between subscription and budget.
Example
| Tier | Subscription | API Budget | Your Cost | Profit | Margin |
|---|---|---|---|---|---|
| Starter | $29/mo | $15 | $15.68 | $13.32 | 46% |
| Pro | $99/mo | $60 | $62.70 | $36.30 | 37% |
| Business | $299/mo | $200 | $209.00 | $90.00 | 30% |
To increase profit: raise subscription price or reduce API budget.
What Are Tiers?
A tier is a pricing plan that controls:
- Subscription price: Monthly or annual fee (via Stripe)
- API budget: How much provider cost the customer can consume
- Model access: Which AI models are available
- Trial period: Optional free trial days
flowchart LR
subgraph project["Your Project"]
direction LR
subgraph starter["Starter Tier"]
s1["$29/month"]
s2["$15 API budget"]
s3["~46% margin"]
end
subgraph pro["Pro Tier"]
p1["$99/month"]
p2["$60 API budget"]
p3["~37% margin"]
end
subgraph business["Business Tier"]
b1["$299/month"]
b2["Unlimited"]
b3["Volume pricing"]
end
starter ~~~ pro ~~~ business
end
Tier Structure
Core Fields
| Field | Type | Description |
|---|---|---|
tier_code |
string | Unique identifier (e.g., “starter”, “pro”) |
display_name |
string | Human-readable name |
billing_mode |
string | subscription (default) or paygo |
spend_limit_cents |
number | API budget in cents (0 = unlimited, ignored for PAYGO) |
models |
array | Allowed models for this tier |
Billing Fields (Subscription Only)
| Field | Type | Description |
|---|---|---|
price_amount_cents |
number | Subscription price in cents |
price_interval |
string | “month” or “year” |
trial_days |
number | Optional trial period |
Creating Tiers
Dashboard
The ModelRelay dashboard includes an AI-powered tier generator. Describe your product and target market, and it will suggest tiers with appropriate pricing and budgets.
You can also manually create tiers under Project Settings > Tiers.
SDK
List and inspect tiers programmatically:
const tiers = await mr.tiers.list();
for (const tier of tiers) {
console.log(`${tier.tier_code}: ${tier.display_name}`);
console.log(` Price: $${tier.price_amount_cents / 100}/${tier.price_interval}`);
console.log(` API Budget: $${tier.spend_limit_cents / 100}`);
// Calculate margin
const subscription = tier.price_amount_cents;
const cost = tier.spend_limit_cents * 1.045;
const margin = ((subscription - cost) / subscription * 100).toFixed(0);
console.log(` Margin: ${margin}%`);
}
tiers, err := client.Tiers.List(ctx)
if err != nil {
return err
}
for _, tier := range tiers {
fmt.Printf("%s: %s\n", tier.TierCode, tier.DisplayName)
fmt.Printf(" Price: $%.2f/%s\n", float64(tier.PriceAmountCents)/100, tier.PriceInterval)
fmt.Printf(" API Budget: $%.2f\n", float64(tier.SpendLimitCents)/100)
// Calculate margin
subscription := float64(tier.PriceAmountCents)
cost := float64(tier.SpendLimitCents) * 1.045
margin := (subscription - cost) / subscription * 100
fmt.Printf(" Margin: %.0f%%\n", margin)
}
let tiers = client.tiers().list().await?;
for tier in tiers {
println!("{}: {}", tier.tier_code, tier.display_name);
println!(" Price: ${:.2}/{}", tier.price_amount_cents as f64 / 100.0,
tier.price_interval.unwrap_or_default());
println!(" API Budget: ${:.2}", tier.spend_limit_cents as f64 / 100.0);
// Calculate margin
let subscription = tier.price_amount_cents as f64;
let cost = tier.spend_limit_cents as f64 * 1.045;
let margin = (subscription - cost) / subscription * 100.0;
println!(" Margin: {:.0}%", margin);
}
Understanding API Budgets
The API budget is the maximum provider cost a customer can consume per billing period.
How It Works
- Usage tracking: Each API request calculates cost at provider rates + 4.5%
- Budget enforcement: Requests fail with HTTP 402 when budget is exhausted
- Period reset: Budget resets at the start of each billing period
Budget vs. Subscription
The budget doesn’t have to equal the subscription price. The gap is your margin:
| Strategy | Subscription | Budget | Margin | Use Case |
|---|---|---|---|---|
| High margin | $99 | $30 | 68% | Premium brand, support included |
| Balanced | $99 | $60 | 37% | Standard SaaS |
| Low margin | $99 | $85 | 10% | Competitive market, volume play |
| Subsidized | $29 | $50 | -80% | Customer acquisition, freemium |
Unlimited Tiers
Set spend_limit_cents to 0 for unlimited usage:
// Enterprise tier with no budget limit
const unlimitedTier = tiers.find(t => t.spend_limit_cents === 0);
For unlimited tiers, your cost varies with usage. Consider usage-based pricing or volume commitments for these customers.
Common Tier Patterns
Starter Tier
Entry-level paid tier with healthy margins:
tier_code: "starter"
display_name: "Starter"
price_amount_cents: 2900 # $29/month
price_interval: "month"
spend_limit_cents: 1500 # $15 API budget
trial_days: 7
models:
- claude-sonnet-4-5 (default)
Margin: $29 - ($15 × 1.045) = $13.32 (46%)
Pro Tier
Mid-tier with more budget and model access:
tier_code: "pro"
display_name: "Pro"
price_amount_cents: 9900 # $99/month
price_interval: "month"
spend_limit_cents: 6000 # $60 API budget
trial_days: 14
models:
- claude-sonnet-4-5 (default)
- claude-sonnet-4-5
Margin: $99 - ($60 × 1.045) = $36.30 (37%)
Business Tier
High-value tier with premium models:
tier_code: "business"
display_name: "Business"
price_amount_cents: 29900 # $299/month
price_interval: "month"
spend_limit_cents: 20000 # $200 API budget
models:
- claude-sonnet-4-5 (default)
- claude-sonnet-4-5
- claude-opus-4-5
Margin: $299 - ($200 × 1.045) = $90.00 (30%)
Free Tier
Limited free tier for evaluation (negative margin, acquisition cost):
tier_code: "free"
display_name: "Free"
price_amount_cents: 0
spend_limit_cents: 500 # $5 API budget
models:
- claude-sonnet-4-5 (default)
Cost to you: $5 × 1.045 = $5.23 per free user per month
Pay-as-you-go (PAYGO) Tier
PAYGO tiers let customers prepay a balance:
tier_code: "paygo"
display_name: "Pay As You Go"
billing_mode: "paygo"
models:
- claude-sonnet-4-5 (default)
- claude-sonnet-4-5
PAYGO tiers have no subscription price or spend limit—customers top up their balance and usage deducts from it. See Customer Billing: PAYGO for implementation details.
Margin Strategies
Target Margin Approach
Decide your target margin, then set budget accordingly:
Budget = Subscription × (1 - Target Margin) / 1.045
For $99 subscription with 50% target margin:
Budget = $99 × 0.50 / 1.045 = $47.37
Value-Based Pricing
Price based on customer value, not costs:
- AI code review tool: Saves 10 dev hours/month → worth $500+
- Your price: $99/month with $30 budget
- Margin: 68%
Customers pay for outcomes, not tokens.
Tiered Margins
Higher tiers often have lower percentage margins but higher absolute profit:
| Tier | Price | Budget | Margin % | Profit |
|---|---|---|---|---|
| Starter | $29 | $10 | 64% | $18.55 |
| Pro | $99 | $50 | 47% | $46.75 |
| Business | $299 | $180 | 37% | $110.90 |
Lower margins at higher tiers incentivize upgrades while maintaining profitability.
Upgrading Customers
Move customers between tiers via checkout:
const session = await mr.customers.subscribe(customerId, {
tier_id: proTierUUID,
success_url: "https://myapp.com/success",
cancel_url: "https://myapp.com/cancel",
});
// Redirect to Stripe checkout
window.location.href = session.url;
session, err := client.Customers.Subscribe(ctx, customerID, sdk.CustomerSubscribeRequest{
TierID: proTierUUID,
SuccessURL: "https://myapp.com/success",
CancelURL: "https://myapp.com/cancel",
})
if err != nil {
return err
}
http.Redirect(w, r, session.URL, http.StatusSeeOther)
Best Practices
1. Start with 2-3 Tiers
Free, Pro, and Business covers most use cases. Add complexity only when you have data on customer needs.
2. Target 30-50% Margins
This leaves room for support costs, customer acquisition, and business growth while remaining competitive.
3. Use Trials Strategically
7-14 day trials on paid tiers let customers experience value before committing. Track conversion rates.
4. Monitor Usage Patterns
If most customers never hit their budget, you can reduce it (higher margins). If many hit limits, consider increasing budget or adding overage options.
5. Price for Value, Not Cost
Your AI feature might save customers hours of work. Price based on that value, not on token costs.
Next Steps
- Customer Billing — Manage subscriptions and payments
- Customer Tokens — Authenticate customers
- Webhooks — React to billing events