# AI Gateway Custom Pricing

> **Scope of this page**
>
> This page documents the Zuplo **gateway** runtime (API, AI, and MCP gateways), not the Developer Portal.
>
> It applies to every Zuplo hosting option: Managed Edge, Managed Dedicated, and Self-Hosted. See [Hosting options](https://zuplo.com/docs/articles/hosting-options).

The AI Gateway prices every request from Zuplo's model catalog, which lists each
vendor's published per-token prices. If you've negotiated different rates with a
vendor—a committed-use discount, an enterprise contract, or credits—set those
prices on the provider so the gateway uses what you actually pay.

A price you set applies everywhere the gateway computes cost:

- Cost [budgets](./usage-limits.mdx) and [budget alerts](./budget-alerts.mdx)
- Spend in the gateway, pool, and app analytics
- The `tokenRateCard` that
  [custom policies](./cookbooks/dynamic-model-routing.mdx) read from
  `AIGatewayModels.load`

Prices apply to new requests within about a minute of saving. Setting a price
doesn't redeploy your gateway.

## What you can price

You can set a price for any rate the catalog lists for a model on a built-in
provider:

| Rate                       | What it prices                                                |
| -------------------------- | ------------------------------------------------------------- |
| **Input**                  | Prompt tokens                                                 |
| **Output**                 | Generated tokens                                              |
| **Cache read**             | Input tokens served from the provider's prompt cache          |
| **Cache write (5 minute)** | Input tokens written to a cache entry that lasts five minutes |
| **Cache write (1 hour)**   | Input tokens written to a cache entry that lasts one hour     |

Models that charge more above a prompt-size threshold also have long-context
rates. Those keep Zuplo's list prices.

A rate the catalog doesn't list for a model, such as a 1-hour cache write on a
model without one, can't be priced.

## How prices apply

Prices belong to a provider, not to your whole project. Two providers for the
same vendor can carry different prices: for example, `anthropic` and
`anthropic-2` with API keys under two different contracts. The gateway prices
each request at the rates of the provider named in its model reference, so
`anthropic-2/claude-sonnet-5` uses the prices on `anthropic-2`.

For each rate, the gateway uses your price when you've set one and Zuplo's list
price otherwise. A rate you leave unset follows the list price, including future
changes to it. Set only the rates your contract changes.

Deleting a provider deletes its prices. A provider you create later with the
same name starts at list prices.

[Custom providers](./custom-providers.mdx) don't use the catalog. You enter
their per-token costs on each model when you add it, so there's no list price to
override.

:::note{title="OpenRouter"}

[OpenRouter](./openrouter.mdx) reports the cost of each request itself, and the
gateway records that figure instead of computing one from prices. A price you
set on an OpenRouter provider applies only to a request whose response carries
no cost.

:::

## Set prices in the portal

Setting prices requires the same **Edit** permission as
[managing providers](./managing-providers.mdx).

<Stepper>

1. Open
   [**Settings → AI Providers**](https://portal.zuplo.com/+/account/project/ai/settings/data-models)
   in your AI Gateway project in the Zuplo Portal.

1. Click **Edit** next to a built-in provider.

1. In **Available Models**, find the model and enter your price in a price cell.
   Prices are per 1M tokens. An empty cell shows Zuplo's list price as its
   placeholder; leave it empty to use the list price.

   A model with at least one price of your own shows a **Custom price** badge.
   To return every rate on that model to list prices, click **Reset**. The
   change takes effect when you save.

1. Click **Save**.

</Stepper>
