# Optimizing credit usage

> Stretch every monthly credit further with proven habits for scoping prompts, locking designs early, stopping patch loops, and keeping runtime lean.

- Canonical: https://exaspark.ai/docs/optimizing-credits/

## Why workflow order determines credit cost

Two builders can ship the exact same app while spending completely different credit totals. High credit burn rarely comes from building ambitious features — it almost always comes from two avoidable habits: redesigning visual layout after backend logic is wired, and nursing broken turns with vague follow-up prompts.

Treat credits the way experienced teams treat engineering time: lock decisions in cheap stages first, use the lightest editing tool for each tweak, and keep live database queries lean so hosting stays inexpensive as users grow.

## Six high-leverage credit-saving habits

Use this quick reference to spot expensive habits and switch to leaner alternatives immediately.

| Workflow habit | Expensive pattern | Lean pattern | Why it saves credits |
| --- | --- | --- | --- |
| **Visual exploration** | Rebuilding a wired app 4 times to test different hero styles | Compare concepts on **Design Canvas** first, then build once | Visual iteration runs light without touching API or database files |
| **First prompt scope** | Sending "Build a booking app" and adding rules over 8 turns | List roles, fields, exact pricing, and attach references upfront | Prevents cascading schema and route rewrites later |
| **Small copy & style edits** | Prompting chat to change one headline or button hex color | Use **Click-to-edit** directly in **Preview** or **Design** | Zero full-turn reasoning overhead for minor text and CSS tweaks |
| **Edit grouping** | Sending 6 separate prompts for spacing, colors, and icon tweaks | Batch visual polish into one clean prompt; isolate risky logic | Cuts repeated turn startup cost while keeping logic changes safe |
| **Error recovery** | Spending 5 chat turns patching a broken experiment | Click **Undo** after 2 failed fixes and re-prompt cleanly | Stops compounding broken context across multiple turns |
| **Live app runtime** | Rendering unpaginated tables and raw 8 MB image uploads | Paginate server-side, index queries, compress hero media | Keeps awake database compute and bandwidth near minimum |

## Lock layout on Design Canvas before full-stack builds

Changing fonts, hero composition, navigation bars, or color palettes after your app already has authentication, 12 database tables, and Stripe checkout touches far more files than deciding visual direction upfront.

Start new projects or major landing page overhauls in **Design** mode before wiring backend logic. Compare side-by-side concepts, lock typography and palette, and click **Use this design** once the visual layout feels settled. See [Design Canvas](https://exaspark.ai/docs/design-canvas/).

## Write complete scoped prompts with attachments

A vague opening prompt forces the Agent to guess your business model — and every wrong guess costs another turn to unwind. Spend two minutes writing a complete specification before clicking Send.

### What makes a high-efficiency prompt

Include five concrete details in your opening request whenever building a new app or major workflow:

```text
High-Efficiency Prompt Checklist
- Audience & core job: Who uses this app and what single task must succeed?
- User roles: Exact difference between guest, signed-in member, and admin
- Data fields: Key tables and columns (for example bookings: date, slot, status, notes)
- Money rules: Exact price, currency, billing interval, and post-payment unlock
- Visual anchor: Attach 1-2 screenshots, brand logo, or phone product photo via +
```

Compare an expensive vague prompt ("Make a tutoring app with payments") against a lean scoped prompt that lands close to production on turn one:

> **Example prompt (App):** Build a 1-on-1 math tutoring booking app for high school students and parents. Guests can browse tutor bios and weekly availability. Signed-in parents book 60-minute sessions at $45 USD via Stripe one-off checkout, receive a confirmation email, and can reschedule up to 24 hours ahead. Only admins can add tutors, edit time slots, and view the daily roster. Match the attached brand palette and clean minimal typography.

Attaching a reference screenshot, sketch, or product snap with **+** removes ambiguity visually so you reach your target design in one pass instead of four. See [Writing good prompts](https://exaspark.ai/docs/prompting/).

## Pick the cheapest editing tool for each change

Not every edit deserves a full Agent conversation turn. Match the tool to the size of the change:

- **Use Click-to-edit for micro-tweaks.** Changing a headline, fixing a typo, swapping button copy, adjusting padding, or nudging a brand accent color directly in **Preview** or **Design** avoids unnecessary full-codebase turns.
- **Batch related visual polish together.** Collect five small layout adjustments — footer link spacing, card corner radius, table alignment, mobile font scale, and button label clarity — into one numbered checklist inside a single chat prompt.
- **Isolate risky logic changes.** Keep database schema changes, role permission rules, and Stripe webhook updates in their own dedicated turns. If something behaves unexpectedly, **Undo** reverts only that clean unit of work without throwing away unrelated visual polish.

## Stop multi-turn patch loops early with Undo

One of the largest hidden credit drains is fighting a tangled turn for four or five messages in a row. When a change breaks behavior across several files, piling patch prompts on top of patch prompts bloats context and burns credits fast.

1. **Set a two-fix ceiling** — If **Ask AI to fix** or a targeted follow-up does not resolve a regression within two turns, stop patching.
2. **Click Undo to the last green checkpoint** — Return cleanly to the exact working state saved before the faulty turn started.
3. **Narrow the request** — Split the feature into two smaller steps (for example, add the database column first, then build the admin filter UI).
4. **Verify before stacking** — Test the happy path in **Preview** so your next saved checkpoint is verified solid.

See [Multi-turn best practices](https://exaspark.ai/docs/multi-turn-best-practices/) for patterns that keep complex projects clean across dozens of turns.

## Keep live app-running usage lean

On **Free**, published apps run from a separate **5,000/month** app-running pool; on **Starter** and **Pro**, live hosting shares your monthly rollover credit balance. Good engineering hygiene keeps live operating costs tiny even as traffic climbs.

- **Close idle preview workspaces.** Active preview environments consume metered compute while open. Keep only the project you are actively shaping awake (Free allows 1 active preview, Starter 3, Pro 10).
- **Paginate database lists and add indexes.** Fetching 2,000 rows on every dashboard load wakes unnecessary database compute. Limit queries to 20–25 items per page and index filtered columns like `user_id` and `status`.
- **Compress media before publishing.** Serve properly sized hero shots and transparent cutouts from [Creative Studio](https://exaspark.ai/docs/media/) instead of multi-megabyte raw uploads that waste bandwidth on every page view.
- **Keep marketing pages lightweight.** Static landing pages, portfolios, and content pages consume close to zero runtime credits because they rarely wake database compute.
- **Audit slow routes monthly.** Glance at database latency and frontend speed in [Analytics & live health](https://exaspark.ai/docs/analytics/) once a week to catch inefficient queries early.

> **Note:** Prefer fewer, richer turns over twenty rapid one-line nudges. Reviewing **Preview** carefully for two minutes and sending one clear checklist almost always ships faster and cheaper.

## Next steps

- [Plans & credits](https://exaspark.ai/docs/plans-and-credits/) — Review Free daily grants, rollover rules, and top-up credit packs.
- [Design Canvas](https://exaspark.ai/docs/design-canvas/) — Explore visual layouts cheaply before generating full-stack code.
- [Multi-turn best practices](https://exaspark.ai/docs/multi-turn-best-practices/) — Structure long builds cleanly without regressions.

## From the blog

- [Common vibe coding mistakes](https://exaspark.ai/blog/vibe-coding-mistakes/) — Avoid habits that waste turns and introduce fragile bugs.
- [What an app costs to build](https://exaspark.ai/blog/how-much-does-it-cost-to-build-an-app/) — Budget realistically across building, domains, and live traffic.
- [Make your website load faster](https://exaspark.ai/blog/how-to-make-a-website-load-faster/) — Lean pages convert better and use less runtime compute.
