> ## Documentation Index
> Fetch the complete documentation index at: https://sudomock.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The base URL is https://api.sudomock.com.
> Authenticate every request with the x-api-key header. Keys begin with sm_.
> A render returns the finished image at data.print_files[0].export_path. A request sent with is_async true returns a job_id to poll at GET /api/v1/jobs/{job_id}.
> Prefer the official SDKs over hand-written HTTP calls: npm install sudomock for Node, pip install sudomock for Python.

# In what order credits are spent

> Plan credits first, then extra credits, then balance.

Three things can pay for an operation, and they are always tried in the same
order: your plan's monthly credits, then extra credits, then a pay as you go
balance. Nothing reaches the balance while credits of either kind remain.

## One operation, one source

An operation is funded from a single source. If your plan credits cannot cover
the whole amount, the charge does not split: it moves on to extra credits and is
taken there in full. So the last few plan credits of a month sit untouched while
a larger operation is paid for out of the next source along.

<img src="https://mintcdn.com/sudo-mock/53o0Yh4GbbEUGCXx/images/knowledge-base/credit-usage.png?fit=max&auto=format&n=53o0Yh4GbbEUGCXx&q=85&s=c6c8a9a01bec01f3d44d5671ecfbcbfc" alt="The usage tab, breaking the monthly allowance into granted, used and available credits." width="2880" height="1440" data-path="images/knowledge-base/credit-usage.png" />

## What each operation weighs

| Operation | Credits |
| - | - |
| PSD render | 1 |
| Photo mockup render | 5 |
| Photo mockup create | 25 |
| Background removal | 25 |
| Mask, print area and other setup edits | 0 |

Video mockups are weighted by the clip you ask for rather than by a flat figure.

## Plan credits

Plan credits are the monthly allowance that comes with your plan. At each
renewal the allowance is set back to the plan's figure and the usage counter
returns to zero, so unused plan credits do not carry into the next month. On a
plan change the allowance is recalculated for the plan you moved to and the
usage you have already recorded that period stays as it is.

## Extra credits

Extra credits are bought in packs on top of a plan, and they behave differently
on purpose. They do not reset at renewal, they do not expire, and they stay on
the account after a plan ends. A pack is a count of credits rather than a sum of
money, so its size does not change when you move between plans: one credit buys
the same work on every plan.

Because they sit second in the order, a pack is only touched once the month's
plan credits are gone. That is what makes it useful as a reserve for a heavy
month rather than something you have to plan around.

## The balance

A [pay as you go balance](/docs/knowledge-base/how-pay-as-you-go-works) is last. It is
money rather than credits, so it is spent per operation at the price for your
account, and it is what keeps a queue running when both credit pools are empty.

## Refunds

A failed operation is returned to the source it came from: plan credits to plan
credits, extra credits to extra credits, balance to balance. A render that never
produced an image is never charged for.

## Reading the numbers

The [Billing](https://sudomock.com/dashboard/billing) page shows all three: the
month's remaining plan credits, the extra credit count, and the balance with a
ledger of what was added and what it went on.
[Retrieve the current account](/docs/api-reference/account/retrieve-the-current-account)
reports the plan's remaining credits and the balance to your own code.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.