Monthly credits
Learn how Shaw meters template pages in credits, grants lifetime updates per unlocked page, supports Auto Top-Up, and handles 402 errors.
Shaw meters per-page code unlocks (POST /api/templates/use / use_template)
and direct library email imports to Klaviyo
(POST /api/email-studio/klaviyo/publish-template /
publish_template_to_klaviyo) based on each page's HTML and linked CSS bundle.
Browsing the catalog, inspecting Brand DNA, and checking per-page credit costs
are always free (0 credits).
Interactive credit estimator
Estimate how many credits a template page consumes on Free vs. Shaw Pro:
How per-page credit pricing works
Shaw calculates each page's credit cost from the single-page HTML + linked CSS bundle returned to your app or MCP client:
- Website & app pages:
5,000to15,000credits per pulled page (5,000 creditsminimum and15,000 creditsmaximum cap per page). Multi-page subpages are unlocked individually only when pulled. - Email templates: starting at
2,500 credits(2,500 creditsminimum for nearly every email, scaling up for larger HTML/CSS emails). - Measured code: The requested page HTML plus up to 6 linked local
.cssstylesheets (capped at120 KiBbundle size). - Binary assets excluded: Images (
.png,.jpg,.webp),.woff2fonts, and media files add0credits. - Pre-flight cost preview:
GET /api/templates/detail/{id}(get_template, with optionalpathquery parameter) returnscodeMetrics(credits,codeBytes,fileCount,estimated) at0credit cost before you spend anything.
Monthly plans, credit packs, & lifetime updates
Monthly credit allowances reset at 00:00 UTC on the first day of each
calendar month (YYYY-MM period key, such as 2026-11) and offer a discounted
per-credit rate compared to one-time packs. Purchased one-time credit packs
never expire and are spent FIFO only after your monthly allowance is exhausted.
| Tier / Pack | Credits | Details | Purchase / Upgrade path |
|---|---|---|---|
| Free | 5,000 credits (one-time) | 2 emails or 1 light page ($0) | shaw.ai/credits |
| Shaw Plus | 30,000 credits / month | $20/month (33% off the $1.00/1,000 base rate at $0.667/1,000 credits) | Stripe Checkout on Credits |
| Shaw Pro | 100,000 credits / month | $50/month (50% off the $1.00/1,000 base rate at $0.50/1,000 credits) | Stripe Checkout on Credits |
| Shaw Ultra | 500,000 credits / month | $200/month (60% off the $1.00/1,000 base rate at $0.40/1,000 credits) | Stripe Checkout on Credits |
| Operator | 1,000,000 credits / month | Managed operator workspace | Managed operator workspace |
| 15,000 Pack | 15,000 one-time credits ($15) | Never expires ($1.00 per 1,000 credits) | Account / Credits pack checkout |
| 60,000 Pack | 60,000 one-time credits ($50) | Never expires ($0.833 per 1,000 credits — Save 17%) | Account / Credits pack checkout |
| 150,000 Pack | 150,000 one-time credits ($100) | Never expires ($0.667 per 1,000 credits — Save 33%) | Account / Credits pack checkout |
Lifetime updates per unlocked page
Credits are charged once permanently per
(organizationId, templateSlug, pagePath) (with emails normalized to "/"),
independent of template version:
- Lifetime updates across future versions: Unlocking
v1of a template page grants lifetime updates on that page for your organization. Whenv2ships, re-fetchingv2HTML and CSS withPOST /api/templates/use(use_template) costs0extra credits forever (alreadyUnlocked: true,chargedCredits: 0) across billing months—even when remaining credits reach0. - Per-path & per-organization boundaries: Subpages (such as
/vs./pricing) and organizations remain independently unlocked. - Atomic FIFO ledger: Credits are spent from monthly allowance first, then oldest credit packs FIFO, and enforced atomically in D1 so concurrent requests cannot overspend.
Opt-in Auto Top-Up & passive Stripe metering
Organizations can opt into Auto Top-Up in
shaw.ai/app/account so unlocks never stall on
402 INSUFFICIENT_CREDITS when monthly credits run low:
- Saved payment method required: Save a card off-session via
POST/api/billing/payment-method/setupbefore enabling Auto Top-Up. Turning on Auto Top-Up without a saved card is rejected (400 PAYMENT_METHOD_REQUIRED). - Threshold & monthly dollar cap: Configure the refill pack (
pack_50000,pack_200000, orpack_500000), trigger threshold (thresholdCredits), and hard monthly spend cap (monthlyCapCents) viaGET/PUT/api/billing/auto-topup. - Transparent refill & safe fallback: When an unlock exceeds available
credits (or leaves remaining credits below
thresholdCredits), Shaw charges the saved card off-session, grants a non-expiringstripe_auto_topupcredit pack, and completes the unlock cleanly (autoTopUpTriggered: true). If the card declines or the monthly dollar cap is reached, Shaw returns402withautoTopUpErrororautoTopUpCapReached: true. - Optional passive Stripe Billing Metering: Deployments that configure
STRIPE_BILLING_METER_EVENT_NAMEalso emit passive credit usage meter events to Stripe Billing in the background for usage analytics and reconciliation without changing the D1 ledger or charging twice.
Checking balance & handling 402 errors
/api/creditsReturn the organization plan, UTC period key, monthly credit allowance, remaining monthly and pack credits, Auto Top-Up status, and permanently unlocked template pages.
/api/templates/useSpend credits for a page (if not yet permanently unlocked) and return the page HTML plus up to 6 linked stylesheets (120 KiB response bundle). Future versions of unlocked pages re-fetch at 0 credits.
Balance & insufficient credit responses
Poll GET /api/credits (org:read) before triggering batch workflows:
- Balance check 200OK — returns
plan,periodKey(YYYY-MM),planCredits,monthlyUsedCredits,monthlyRemainingCredits,packCreditsRemaining,remainingCredits,packs,autoTopUp, and permanentlyunlockedTemplates. - Credit limit reached 402Payment Required —
returned by
POST /api/templates/useorPOST /api/email-studio/klaviyo/publish-templatewithcode: "INSUFFICIENT_CREDITS"anderror: "You need more credits"whenrequiredCredits > remainingCreditsand Auto Top-Up is disabled, fails, or reaches its monthly dollar cap.
Recommended agent & client behavior on 402:
- Do not retry automatically—the ledger will continue rejecting the spend until a credit pack is purchased, Auto Top-Up cap/card is updated, the plan is upgraded, or the UTC month rolls over.
- Surface
requiredCredits,remainingCredits, and anyautoTopUpErrororautoTopUpCapReachedfields to the user. - Direct the user to
upgradeUrl(shaw.ai/credits) to subscribe to Plus (30,000 credits/monthat$20/month), Pro (100,000 credits/monthat$50/month), or Ultra (500,000 credits/monthat$200/month), buy a one-time credit pack (15,000,60,000, or150,000 credits), or enable Auto Top-Up.
{
"ok": true,
"data": {
"organizationId": "org_01j9x2m4p7q8w2ab",
"plan": "free",
"periodKey": "2026-11",
"planCredits": 5000,
"monthlyUsedCredits": 2500,
"monthlyRemainingCredits": 2500,
"packCreditsRemaining": 50000,
"usedCredits": 2500,
"remainingCredits": 52500,
"locPerCredit": 1,
"approxRemainingLoc": 52500,
"unlockedTemplates": [
{
"templateSlug": "aura/landing",
"templateVersion": "2026-11-01",
"slug": "aura/landing",
"version": "2026-11-01",
"pagePath": "/",
"loc": 4200,
"creditsSpent": 5000,
"unlockedAt": "2026-11-21T14:20:00.000Z"
}
],
"packs": [
{
"id": "pack_01j9x2m4p7q8w2ab",
"packId": "pack_50000",
"creditsTotal": 50000,
"creditsRemaining": 50000,
"priceCents": 1500,
"source": "stripe_checkout",
"createdAt": "2026-11-20T09:00:00.000Z"
}
],
"autoTopUp": {
"enabled": true,
"packId": "pack_50000",
"thresholdCredits": 5000,
"monthlyCapCents": 10000,
"hasPaymentMethod": true,
"cardBrand": "visa",
"cardLast4": "4242",
"monthlySpendCents": 0,
"monthlyRemainingCapCents": 10000,
"lastError": null,
"lastRefilledAt": null
},
"upgradeUrl": "https://shaw.ai/app/account"
}
}Next steps
- Connect Claude, ChatGPT, Codex, or Cursor in Claude, ChatGPT & MCP Plugin.
- Check OAuth scopes and error handling in Authentication & API keys.
- Explore the Credits API Reference and Templates API Reference.
Claude, ChatGPT & MCP Plugin
Connect Claude, ChatGPT, Codex, and Cursor to Shaw via OAuth 2.1 MCP with Template Code Library pulls, Brand Kit sync, and direct Klaviyo email import.
Authentication & API keys
Authenticate Shaw API and MCP requests with OAuth 2.1 PKCE tokens or scoped sk_ keys, configure plugin permissions, and handle 401-403 and 402 errors.