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

# Balance and billing

> How reserve, settlement, release, balance, and usage work.

Each account has one USD balance shared by all of its projects. Money is represented with four decimal places.

## Reserve

When a generation request is accepted, its maximum price is reserved atomically. The hold appears as `reserved_amount` on the job.

Available balance is the account balance minus all active reserves, so the same funds cannot be spent twice.

## Settlement

On success, the exact cost is charged and the reserve is cleared.

On failure, cancellation, timeout, or content-policy rejection, the reserve is released in full and nothing is charged.

If the reserve cannot be created, the API returns `402 insufficient_balance` and no job is created.

## Balance and usage

`GET /v1/balance` returns:

* total account balance
* currently reserved amount
* amount available for new jobs

`GET /v1/usage` lists settled charges for the project belonging to the API key. It supports `from`, `to`, and `model` filters.

Failed or released jobs never appear in usage because they were not charged.
