Why this matters
Credits are the line on a Base44 bill that surprises teams. The subscription is predictable. The credit overage is not. We have walked into engagements where credits had quietly become the largest single cost in the team's monthly stack, exceeding the platform subscription by 3–5x. Almost every one of those was reducible by 50–70% with a few mechanical changes.
This article is the working model for how credits actually work, what consumes them disproportionately, and the specific patterns that cut burn without changing the team's velocity.
How credits actually work
Three rules to internalize:
- Credits reset monthly. Cycle starts at signup-date or billing date depending on tier. Whatever you don't use is gone.
- You cannot purchase additional credits mid-cycle on most tiers. If you exhaust your allowance, the only path forward is a tier upgrade.
- Burn rate is decoupled from feature value. A small change can cost more credits than a large feature, depending on how the agent handles the request.
Rule 3 is the source of most surprise costs. The instinct is "small change = small cost." The reality is "small change = small cost only if the agent's response is small," which is not the default.
What consumes credits
Empirically, on a typical Base44 app:
| Source | % of monthly burn | Typical pattern |
|---|---|---|
| Agent prompts | 60–80% | Each turn regenerates large regions |
| Managed integrations | 15–30% | invokeLLM, generateImage, sendEmail |
| Discuss-mode turns | 5–15% | Clarifying questions before code |
| Long-running backend functions | 0–10% | Background jobs, batch processing |
The tail (long-running functions) is small for most apps but becomes significant if you run nightly batch jobs or external-API-heavy workflows.
The credit-burn anatomy of a single change
Walk through a realistic example. You want to add a logout button to the header.
Naive prompt: "Add a logout button to the header."
What happens:
- Agent reads the entire
Header.tsxfile (200 lines). - Agent considers the surrounding components for context (3–5 files).
- Agent regenerates the full
Header.tsxwith the logout button added and minor "improvements" the model decided to make. - Agent submits the diff for review.
Credit cost: roughly 5–15 credits, depending on file size and model.
What's wasted:
- The 195 lines of
Header.tsxthat didn't need to change were re-emitted. - The "improvements" the agent made elsewhere may be regressions you'll need to fix in subsequent turns.
- The clarifying-question discuss turns the agent may add (1–3 turns at 1–3 credits each).
Tighter prompt: "In components/Header.tsx, between the user menu and notification bell (around line 45), add a logout button that calls base44.auth.signOut() then redirects to /. Do not modify any other line of this file. Do not modify any other file."
What happens:
- Agent reads
Header.tsx. - Agent generates a small diff (5–10 lines).
- Submits for review.
Credit cost: roughly 1–3 credits.
The 5x reduction is not exotic. We see it on every audit. The same prompt structure applies to every change.
The regression-loop credit trap
The single largest credit drain we audit is the regression loop, covered in detail in the AI agent regression loop fix.
The pattern: agent introduces a regression on prompt N. You ask it to fix on prompt N+1. The fix introduces a different regression. Three turns later, the original change is still not stable, and you have burned 30–80 credits on what should have been a 3-credit change.
Cumulative cost per affected feature: 50–250 credits over a few days. One Medium author burned 15 credits trying to change a single CTA link, which is exactly this pattern.
The fix is structural, not tactical: scope every prompt narrowly, snapshot before every turn, and revert immediately rather than asking the agent to re-fix. We have a complete playbook in the linked fix article.
Cost of integration calls
Each managed integration call costs credits roughly proportional to the underlying provider's rate. For typical volumes:
| Integration | Credit cost per call (approximate) |
|---|---|
invokeLLM (gpt-4o-mini, short prompt) | 1–3 |
invokeLLM (gpt-4o, long prompt) | 5–20 |
generateImage (default) | 5–15 |
sendEmail (transactional) | 0.5–2 |
These add up fast. An app that calls invokeLLM on every page load, with no caching, can burn its monthly allowance in under a week.
The fix: cache aggressively. For deterministic prompts (same inputs produce the same output), store the result in an entity:
async function getCachedOrFresh(promptHash: string, prompt: string) {
const cached = await base44.entities.LLMCache.list(
{ hash: promptHash },
null,
1
);
if (cached.length > 0) return cached[0].response;
const response = await base44.integrations.invokeLLM({ prompt });
await base44.entities.LLMCache.create({
hash: promptHash,
response: response,
created_date: new Date().toISOString(),
});
return response;
}
Cache hit rate for typical product workloads is 60–90%. A 70% hit rate cuts integration credit cost by 70%.
Discuss-mode credit cost
Discuss mode lets the agent ask clarifying questions before generating code. Each turn costs credits.
When discuss mode helps: greenfield, high-uncertainty work where the agent's clarification prevents a wasted generation.
When discuss mode burns credits: routine iteration where you already know what you want. The agent's questions add friction, you answer, then it generates. Each round-trip is paid.
The pattern that helps: turn off discuss mode for routine work. Use direct edit. Save discuss mode for genuinely ambiguous tasks.
Backend function execution credits
Long-running backend functions (over a few seconds) and functions that loop over many records consume credits. A backfill function that processes 100,000 records via paginated list() calls can cost noticeable credits.
The fix: for one-time migrations, factor the credit cost into your migration plan. For recurring batch jobs, schedule them externally rather than running synchronously inside platform-bound functions when possible. Cache aggressively to avoid re-fetching.
How to measure your real burn rate
Build it yourself; the platform's dashboard is shallow. A simple instrumentation:
// backend/functions/recordCreditUsage.ts
export default async function handler(req: Request) {
const { operation, beforeBalance, afterBalance, metadata } = await req.json();
await base44.entities.CreditLog.create({
operation,
cost: beforeBalance - afterBalance,
metadata,
user_id: metadata.user_id,
timestamp: new Date().toISOString(),
});
return new Response(JSON.stringify({ ok: true }), { status: 200 });
}
Wrap each significant operation in the frontend or backend function with a before/after read of credit balance, then call recordCreditUsage. Aggregate weekly to see where the burn actually goes.
Most teams find:
- 60–80% comes from agent iteration on a small number of "hot" files.
- 10–25% from a single high-volume integration (often LLM-on-page-load).
- The rest distributed across many small operations.
Once you know the breakdown, optimization is straightforward.
Credit-saving patterns
A focused pass through these patterns typically cuts burn by 50–70% over 1–2 weeks:
- Scope every agent prompt. Name the file, function, and lines. Forbid changes elsewhere. 5x reduction per turn.
- Snapshot before every agent turn. Revert cheaply if the turn fails. No more re-fix loops.
- Cache integration calls in entities. 60–90% reduction on cacheable workloads.
- Use the code editor directly for small fixes. The agent isn't always the right tool.
- Move stable code to backend functions. The agent rewrites stable code less often when it's behind an HTTP boundary.
- Turn off discuss mode for routine work. Reduces credit-per-feature.
- Audit hot files monthly. The top 3–5 files by edit frequency are where most burn happens. Refactor or freeze them.
- Set per-user rate limits on AI-triggering endpoints. Prevents abuse and runaway loops.
- Track burn rate as a metric. Alert if today exceeds 2x the trailing 14-day average.
- Plan for tier upgrades, don't fight them. If you genuinely need more credits than your tier allows, the upgrade is cheaper than perpetual mid-cycle scrambling.
Common credit mistakes
Treating credits as unlimited until the end of the cycle. Track burn weekly, not at month-end.
Assuming the agent is the cheapest path. For small edits, the editor is cheaper. For greenfield, the agent is cheaper.
Ignoring discuss-mode cost. It feels like "free planning" but each turn is paid.
Not caching integration calls. The single highest-leverage credit fix.
Letting one regression loop eat half the cycle. Snapshot, revert, escalate to human review.
Buying upgrades reactively, not predictively. If your trailing 14-day burn says you'll exceed the tier, upgrade preemptively at the start of the next cycle.
When to stop optimizing and just upgrade
Optimization has diminishing returns. After a focused pass, your burn rate is mostly necessary work, not waste. At that point:
- Calculate the marginal cost of one more tier of credits vs. the engineering hours you'd spend further optimizing.
- If the upgrade costs less than 5–10 hours of engineering time per cycle, upgrade.
- If you're consistently at 90%+ utilization on a higher tier, you've sized correctly.
Don't optimize for status. Optimize for total cost (cash + engineering opportunity cost). Sometimes the right answer is to pay more.
Credit summary checklist
| Pattern | Effort | Expected reduction |
|---|---|---|
| Narrow-scope prompts | Behavioral | 3–5x per turn |
| Snapshot before turns | Behavioral | 50% reduction in regression-loop burn |
| Cache integrations | 2–4 hours | 60–90% on cacheable calls |
| Use editor for small fixes | Behavioral | 30–50% on routine work |
| Stable code in backend functions | 4–8 hours | 20–40% on hot files |
| Turn off discuss mode | Behavioral | 5–15% |
| Per-user rate limits | 2–4 hours | Prevents runaway burns |
| Burn-rate alerting | 2–4 hours | Detects regressions early |
Want us to optimize your credit burn?
Our $497 audit instruments your credit usage, identifies the top 3–5 burn sources, and produces a prioritized fix list. Most apps see 50–70% reduction within 2 weeks of implementing the recommendations. Order an audit or book a free 15-minute call.
Related reading
- Base44 Pricing Real Costs Analysis — the broader cost picture, of which credits are one line.
- AI Agent Regression Loop — the largest single credit drain and how to break it.
- Base44 Performance Optimization Guide — performance and credit optimization overlap heavily on the integration-caching dimension.