# Billing and receipts

- Credit is prepaid in USD; the ledger accounts in micro-USD
  (1,000,000 = $1) fixed-point, never floats.
- Reserve-then-settle: before dispatch the worst-case cost is held; after
  completion the actual cost is charged and the remainder released.
- Every charge settles against a receipt co-signed by the provider that did
  the work. The response's `openmayhem.receipt` carries the receipt
  identity; `GET https://api.openmayhem.ai/v1/requests/{id}` returns settled cost and usage.
- Spend limits per key (see Authentication) bound how much a single key can
  settle per day, week, month or lifetime.
- Usage and invoices live on the dashboard; media-job artifacts are cached for
  at most 12 hours from job creation and are never backed up.
- Text in a finished job's result (answers, reasoning, tool calls, transcripts,
  prompts) is deleted five minutes after you first read the finished job, and at
  most one hour after it finishes. The result then carries `text_expired: true`;
  status, usage, cost and receipts remain.

## Per-request retail cost limit

`X-OpenMayhem-Max-Cost-Usd` rejects a request before spend when its
worst-case retail hold exceeds the supplied exact USD amount. The stricter of
this value and the API key's per-request cap wins.

Do not confuse it with `X-Mayhem-Max-Price-Au`, the platform's private
standardized wholesale rate-basis gate. It is not a request-total ceiling,
and hosted customers cannot control it.

<a id="media-estimates"></a>

## Media estimates and credit holds

An example image price illustrates the displayed settings. A representative tariff price is a standardized pricing reference, not a quote for every generation. Compare prices with the same dimensions, steps and output count.

Studio’s estimated_cost is the expected charge for the prepared request. maximum_cost is the temporary credit reservation, which can be higher. The final job cost is settled from receipted work; unused reserved credit is released. An estimate is not a guarantee of the final charge.

Price filters and representative-price ceilings use the tariff reference, even when a card shows an example image price. X-OpenMayhem-Max-Cost-Usd instead caps the worst-case retail hold for an individual request. Budget for the hold, not just the estimate.

<a id="media-units"></a>

## How media settings affect cost

Read the selected model’s pricing units and granularity. Media may be priced per image, step, second or a resolution-dependent unit; smaller dimensions do not always lower the price.

For image workflows billed in whole megapixel-steps, usage is ceil(width × height / 1,000,000) × steps × image count. A 960 × 960 image uses one rounded megapixel per step; 1024 × 1024 uses two. At the same rate, steps and count, the resolution-dependent usage doubles. This formula is not universal for video or other tariffs.

The applicable rate and its granularity convert usage into cost; fees or minimum charges may also apply. Recheck the quote after changing settings or routing, and use the settled job cost for your actual spend.

- [Presets, dimensions and repeatability](https://openmayhem.ai/docs/media#media-settings)
- [When a media request cannot run](https://openmayhem.ai/docs/errors#media-troubleshooting)
