Credits and how they are used
A credit is worth one cent. Every AI run costs credits in proportion to the tokens it reads and writes, not a flat fee per action. This page explains the rate, the formula, and exactly what consumes credits.
Explanation
A credit is the unit MaShop bills your AI usage in. One credit is worth one cent. Every time you send a prompt and the AI generates code, MaShop measures the tokens it read and wrote, computes the real cost, multiplies by a fixed number, and deducts that many credits from your account. There is no flat per-action fee. A small edit costs a fraction of a credit; building a whole site costs more. This page explains how that mapping works and what draws credits down.
What a credit is worth
One credit equals $0.01. That rate is fixed in code as CREDIT_PRICE = 0.01 and is the single source of truth for every price you see in the app. When you buy credits, $1 buys 100 base credits before any volume bonus.
Credits are stored as a decimal with four places, so fractional credits are real. A short chat that costs 0.05 credits deducts 0.05, not a rounded-up whole credit. The smallest amount any run can cost is 0.01 credit.
One number, two places it shows up
You see the rate as a slider (dollars in, credits out) when you top up, and you see credits deducted per message in the chat. Both read the same $0.01 rate. They never disagree.
What consumes credits
AI generation is what consumes credits. Each prompt you send that makes the AI write or change code is one billable run. The cost of a run is driven by two token counts:
- Input tokens are everything the AI reads to do the work: your prompt, the relevant parts of your existing code, and the system instructions.
- Output tokens are everything the AI writes back: the generated code, file edits, and its explanation.
Bigger requests cost more because they move more tokens. Generating a complete storefront reads and writes far more than renaming a button, so the first costs many credits and the second costs a fraction of one. The model you pick also matters: a heavier model has a higher per-token rate, so the same request costs more credits on it than on a lighter one.
Reading your own data does not cost credits. Browsing your files in the workspace, viewing past versions, opening settings, and the credit breakdown screen are all free. Only a run that calls the AI to produce code draws credits down.
How cost maps to usage
The cost of a run is computed server-side by the calculate_ai_credit_cost database function so the price is always authoritative and cannot be faked by the client. The formula is:
credit_cost = real_cost_usd x markup_multiplier x 100
where:
real_cost_usd = (input_tokens / 1000) x input_rate_per_1k
+ (output_tokens / 1000) x output_rate_per_1k
markup_multiplier = 5.0 (uniform, every model)
x 100 converts dollars to credits (1 credit = $0.01)
The result is rounded up to two decimal places, and the floor is 0.01 credit. The markup_multiplier is a single global value of 5.0 applied to every model, with no per-model override. So the credits you pay equal five times the real compute cost of the run, expressed in cents.
A worked example: a run that reads 2,000 tokens and writes 4,000 tokens at a mid rate has a real cost near $0.017. Multiply by 5, then by 100, and you get roughly 8.7 credits. A large build that costs a small trial budget125 credits. The cost scales with the work, not with which button you pressed.
Estimate, then settle
MaShop does not wait until a run finishes to protect your balance. Before the AI starts, it reserves an estimated cost and checks you can afford it. After the run finishes, it settles against the real token counts: if the estimate was high, the difference is refunded to the bucket it came from; if the estimate was low, the extra is charged. You are billed for what the run actually used, not for the estimate.
If a run fails before producing output, the full reservation is refunded. You are not charged for a generation that errored out.
Where the cost shows up
After each AI message in the workspace chat, MaShop prints a small line under the reply showing the credits charged and the token count for that run, for example 8.70 credits · 6,000 tokens. This is the actual amount deducted for that message, settled against real usage. Use it to learn which kinds of requests are cheap and which are expensive.
Your remaining credits and their breakdown live in the workspace settings under the Credits section. See Manage billing for where to find your balance and history.
Which credits get spent first
If you are on a paid plan, MaShop spends your monthly plan credits before it touches the wallet balance you funded with top-ups, so the renewable allowance is used first and your purchased balance is preserved. This plan-before-wallet order runs inside one locked database transaction that deducts the cost, so concurrent runs cannot double-spend. Within the wallet, bonus credits are counted as spent last, so your paid top-up base draws down before the bonus you were granted on top of it.
| Bucket | Source | Spent |
|---|---|---|
| Plan credits | Your monthly Pro or Max allowance, reset each cycle | First |
| Top-up credits | The paid portion of credits you bought | Next |
| Bonus credits | Volume bonus on top-ups, referrals, and promos | Last |
See Plans for the monthly allowances, Top-ups for how purchased credits and the volume bonus work, and Referrals for bonus credits.
The trial before you pay
A new account that has not subscribed gets a small one-time trial budget measured in real compute cost, not a fixed pile of credits. You spend it across as many prompts as you like until the cumulative real cost of your trial runs reaches the cap. It is not a visible credit balance; it is a spend allowance that lets you try generation before you pay. Once it is used up, you add credits or subscribe to keep generating.
Running out
If a run would cost more credits than you have across all your buckets, MaShop blocks it before the AI starts and the workspace shows an insufficient-credits error rather than charging you part way. To continue, buy more credits on the top-up slider or move to a plan with a monthly allowance. Nothing you have already generated is affected; only new runs are gated.
Privacy note
Billing measures token counts to compute cost. Your prompts and generated code are not sent to OpenAI or Anthropic.
What this is not
- No flat fee per action. Two prompts that produce different amounts of code cost different amounts of credits.
- No charge for reading. Viewing files, versions, or settings is free; only AI generation costs credits.
- No surprise rounding. Credits are fractional to four decimal places and you are settled against real usage after each run.
