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

# How prices work

> How NagaAI sets a model's lowest and highest price, why it's below the market price, what the trade-offs are and how often prices change.

A model on NagaAI has a lowest price and, on some models, a highest one. Both are below the market price, the median of what the providers that sell the model charge. This page explains where the prices come from, why they're low, what that costs you, and how often they change.

## How the price of a request is set

NagaAI tries the model's providers cheapest first. The first provider that answers sets the price of the request:

```mermaid theme={"theme":{"light":"github-light-default","dark":"github-dark-dimmed"}}
flowchart LR
    A[Your request] --> B[Provider at the lowest price]
    B -- Answers --> C[You pay the lowest price]
    B -- "Can't serve it" --> D[Next provider]
    D -- Answers --> E[You pay its rate, at most the highest price]
```

Three numbers describe the price of every model:

| Price | Field in `pricing` | What it is |
| - | - | - |
| Lowest price | `price` | Half the price of the cheapest offer from another provider, with the offer's prices taken together on the mix of tokens NagaAI serves for the model. Every request tries it first. |
| Highest price | `max_price` | Half the market price. A request never pays more, and a model without `max_price` has one price. naga.ac shows it after "up to" next to the lowest price. |
| Market price | Not in the API | The median of what the providers that sell the model charge. naga.ac strikes it through on the model page and says how many providers it is across. |

Most paid requests pay the lowest price. On a model with a highest price, the ⓘ next to the price on naga.ac shows the share of its requests that paid the lowest one over the last 7 days.

## Why the price is low

The price is low for three reasons:

* **Capacity bought below public prices.** NagaAI buys part of its capacity for less than providers' public prices.
* **Low-cost providers behind routing.** NagaAI also uses low-cost providers. Each request goes to the lowest-priced provider that can serve it right now; if it fails, it moves to the next. See [Routing](https://docs.naga.ac/build/routing.md).
* **A rule, not a promotion.** The price follows the market both ways. When the market price rises, the NagaAI price rises with it, and the rule stays the same.

## Trade-offs

A low price comes with two trade-offs:

* **Capacity.** At times there isn't enough capacity at the NagaAI price, and a request can fail. Retry the request, or list [fallback models](https://docs.naga.ac/build/routing.md#fallback-models).
* **Data.** Each request is processed by a provider under that provider's terms. NagaAI itself never trains on requests. See [Model providers](https://docs.naga.ac/account/privacy-and-logging.md#model-providers).

To pay only the lowest price, set a price limit. A limit can fail a request that a dearer provider would have served. See [Limit the price of a request](https://docs.naga.ac/guides/limit-the-price.md).

## How often prices change

NagaAI reads the market prices of its models about every ten minutes. A drop applies within minutes. A rise applies once it has held for about 20 minutes, so a one-off spike doesn't reach you. NagaAI doesn't announce either in advance.

A request pays the price in force when it's served. `GET /v1/models` always lists the current prices, and `GET /v1/requests/{id}` shows what one request cost. See [Billing](https://docs.naga.ac/build/billing.md).

## See also

* [Billing](https://docs.naga.ac/build/billing.md): the meters of a price and what one request costs.
* [Limit the price of a request](https://docs.naga.ac/guides/limit-the-price.md): keep a request at the lowest price or under a cap.
* [Routing](https://docs.naga.ac/build/routing.md): how NagaAI orders providers and moves a failed request.
* [Model catalog](https://docs.naga.ac/product/model-catalog.md): where the market price is shown.


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