# Fees

The exchange adds a fee to the charge of each job. The provider earns its own price. The fee pays for the auction, the hold, the settlement and the receipt. Each [receipt](https://inference.ai.exchange/docs/receipts.md) shows the fee in `fee_usd`.

## What you pay

```
buyer_charge_usd = supplier_charge_usd + fee_usd - credits_usd
```

- `supplier_charge_usd` is what the provider earns, from the offer rates and the metered usage.
- `fee_usd` is what the exchange keeps.
- `credits_usd` is credit that the exchange gives back. It is usually zero.

A job that fails before any output pays no fee. The exchange releases the hold.

## The fee rule

For a job priced in tokens, the fee is the larger of two amounts:

1. **A percentage.** 5% of the supplier charge.
2. **A floor.** A least fee for each metered token, by kind of token.

| Kind of token | Highest floor, USD per million tokens |
| ------------- | ------------------------------------- |
| Input         | 0.01                                  |
| Cache read    | 0.001                                 |
| Cache write   | 0.01                                  |
| Output        | 0.01                                  |

An offer that charges nothing for a kind, such as a free offer, pays less when the model has a reference price. The reference is the list price of the model creator, or the mean rate of the other providers of the model if there is no list price.

$$
\text{floor}_k = \begin{cases} \text{highest}_k & \text{rate}_k > 0 \\ \min\left(\text{highest}_k,\; 0.05 \times \text{reference}_k\right) & \text{rate}_k = 0 \text{ and a reference exists} \\ \text{highest}_k & \text{rate}_k = 0 \text{ and no reference exists} \end{cases}
$$

$$
\text{fee} = \max\left(0.05 \times \text{supplier charge},\;\; \sum_k \text{tokens}_k \times \text{floor}_k\right)
$$

Here `k` is the kind of token. For example, a free offer of a model with a reference of 0.02 USD per million input tokens pays an input floor of 0.001 USD, not 0.01 USD. The exchange can change these values.

## Which rule applies

The percentage wins above about 20 cents per million tokens. The floor wins on cheap models and free offers.

| Offer                          | Fee                                          | What decides   |
| ------------------------------ | -------------------------------------------- | -------------- |
| A model at $5 per Mtok         | 5% of the charge                             | The percentage |
| A model at $0.02 per Mtok      | 1 cent per Mtok                              | The floor      |
| A free offer, or `liquid.free` | 5% of the reference, at most 1 cent per Mtok | The floor      |
| An image, speech or video job  | 5% of the charge                             | The percentage |

On a very cheap model, the fee can be a large share of the charge, although the amount is tiny. A job of 76 input tokens at $0.02 per Mtok paid the provider $0.00000152 and a floor fee of $0.00000076, which is 50%.

## Free offers and `liquid.free`

A job on a free offer is not free for the buyer. The supplier charge is zero, so the fee is the floor, at most 1 cent per million tokens. A job of 2,040 tokens on a free offer of a model with no reference pays $0.0000204.

`liquid.free` buys only offers that charge nothing. It pays the floor, so its price cap and hold are above zero. Receipts from before 2026-10-22 show a fee of zero on free offers.

## Other cases

- **BYOK.** The supplier charge is zero, because the cloud bills you. The fee is the percentage of the charge at the list price of the model. A model with no list price pays the floor. See [Bring your own key (BYOK)](https://inference.ai.exchange/docs/byok.md).
- **No token count.** A job that the provider prices by image, character or second pays 5% of the supplier charge and no floor.
- **Cache.** A cache read has a lower floor, so a job with many cache reads pays less floor.
- **Web search.** A job with `:web` pays the cost of the search service and a fixed exchange fee. Both are in `fee_usd`, and a referral discount does not reduce them. A job that settles with no charge pays nothing for the search.
- **Reservations.** A job on a reservation has no charge when it runs. The exchange fee is added to the monthly fee. See [Reservations](https://inference.ai.exchange/docs/reservations.md).

## Cap and hold

The price cap of a job includes the fee. Before the first token, the exchange computes the highest fee that the job can pay, with the highest input floor. It holds the cap from your balance and returns the unused part at settlement.

Settlement never exceeds the cap. If usage passes the cap, the provider carries the excess. The receipt shows the amount in `cap_held_usd`.

## Discounts

A person who joined with a referral link pays 10% less fee for a set period. The provider earns the same. `fee_usd` is the fee after the discount, and `fee_discount_usd` is the amount taken off. See [Referrals](https://inference.ai.exchange/docs/referrals.md).

## Read the fee on a receipt

| Field                 | Description                                                                                       |
| --------------------- | ------------------------------------------------------------------------------------------------- |
| `supplier_charge_usd` | What the provider earns.                                                                          |
| `fee_usd`             | The exchange fee, after any discount. It includes the web search charge.                          |
| `fee_discount_usd`    | The amount that a referral discount took off the fee.                                             |
| `charge_split`        | The cost of input, cache reads, cache writes and output. Each part includes its share of the fee. |
| `rates`               | The provider rates, before the fee.                                                               |

To check a fee:

1. Multiply `supplier_charge_usd` by 0.05.
2. Multiply each token count in `meters` by the floor of its kind, and add them.
3. Take the larger result and subtract `fee_discount_usd`. The result is `fee_usd`, unless the job used a web search.

The rates in the book are before the fee. [Market data](https://inference.ai.exchange/docs/market.md) shows the buyer rate with the fee added.
