# Manual price book

**Last updated:** 2026-11-23T10:59:54-03:00 (UTC-3)

[Automatic pricing](/docs/features/automatic-pricing/) covers most models. For the rest, such as an open source model on a provider that does not publish a price, or a contract with its own rate, you record the price by hand in the price book. A manual entry is an explicit value, so it wins over the automatic price for the model it names. Flag: `manual_price_catalog`.

## How to use it

```yaml
features:
  manual_price_catalog: true
price_book:
  - provider_id: deepinfra
    model_id: lab/open-model
    input_per_million: "0.10"
    output_per_million: "0.35"
    effective_from: "2026-10-23T00:00:00Z"
    source_url: https://deepinfra.com/models/lab/open-model
```

The numbers are only an example: use the values verified on the provider's page.

| Field | Rule |
| --- | --- |
| `provider_id` + `model_id` | The provider connection and the exact upstream ID. The same model on DeepInfra, OpenRouter and Groq has different entries |
| `input_per_million`, `output_per_million` | USD per million text tokens, a decimal as a string, not negative |
| `effective_from` | RFC3339 date from which the rate applies; a future rate does not apply before then |
| `source_url` | Public HTTPS, without credentials, query or fragment |

An entry may add `service_tiers` (`priority`, `flex`, `batch`), each with `input_per_million` and `output_per_million` and optional `cache_read_per_million` and `cache_write_per_million`. A tier price wins over the catalog's price for that tier; a tier the entry leaves out keeps the catalog's price. See [service-tier pricing](/docs/features/service-tier-pricing/).

## Media models no catalog prices

Some media models are in no catalog. The community cost map lists only Replicate's chat models, for example, and none of the Replicate image models the gateway serves on `/v1/images/generations`. For such a model, an entry may carry one media unit price instead of text rates:

```yaml
price_book:
  - provider_id: replicate
    model_id: black-forest-labs/flux-schnell
    unit: per_image
    unit_price: "0.003"
    effective_from: "2026-01-01T00:00:00Z"
    source_url: https://replicate.com/black-forest-labs/flux-schnell
```

The price is only an example: check it on the model's page.

| Field | Rule |
| --- | --- |
| `unit` | `per_image` (images returned), `per_character` (characters spoken), `per_audio_second` (seconds transcribed) or `per_video_second` (seconds rendered) |
| `unit_price` | USD per unit, a decimal as a string, not negative, at most 9 decimal places |

A media entry has no `input_per_million`, `output_per_million` or `service_tiers`; the gateway rejects an entry that mixes them, a `unit_price` without a `unit` and any other unit. The entry prices only an alias that serves that media capability alone (`capabilities: [images]` for `per_image`), never a text alias of the same model, and never in another unit. It wins over a catalog that publishes the unit, or token prices, for that model.

Valuation counts the units from the answer, as for a catalog price: the images in `data[]` and the seconds a transcription reports. Without a count the cost stays unknown, never zero. An explicit `unit_price: "0"` is accepted, as for text rates, and values the model at zero: write it only when the provider publishes the model as free. Before saving a media entry from the console, upgrade every replica: an older version cannot read it. Price only a model billed per unit: a Replicate model billed by hardware time has no per-image price, so leave it without an entry and its cost stays unknown.

The gateway rejects negative or non-numeric rates, duplicate entries and more than 10,000 rows. An entry can exist before the connection, but it creates neither a provider nor an alias. The YAML is validated even with the flag off.

In the console, global admin and viewer see the list in **Settings & sources**. To edit from the console, with history, turn on [price book management](/docs/features/price-book-management/).

## When the manual price is used

- **Whenever an entry is in effect** for that connection and model (`effective_from` reached, `manual_price_catalog` on). It wins over every automatic price for what it prices: the catalogs, an approved [catalog review](/docs/features/catalog-review/) rate and a provider's documented free tier. Without an entry, the automatic price applies as before.
- What it prices, it prices whole: text-token rates (with the tiers it names), or one media unit. The catalog's cache, media-token and long-context prices for that model are not mixed into a manual text rate, so cached or media tokens it does not price stay unknown.
- The response identifies `source: manual` and `manual_fallback: true` (the field keeps its original name). When an automatic price was available and the entry replaced it, it also says `override: true`, and the catalogs' votes stay listed. A conflict between catalogs is not an override: no automatic price was available.
- With [valuation](/docs/features/usage-valuation/) on, the manual price goes into the per-event estimate, frozen at the time of the call, with the same `source`, `manual_fallback` and `override`; with the [span store](/docs/features/traces/), the request and attempt spans carry `price.source: manual` and, for an override, `price.override: true`. Changing the YAML later does not reprice the past.
- To go back to the automatic price for a model, remove its entry. An entry effective in the future changes nothing until its date.
- The manual price is a reference: the `cost` [routing strategy](/docs/features/routing-strategies/) ranks targets by the price that wins, but [budgets](/docs/features/budgets-and-tpm/) use separate approved rates.

## Good practices

1. Check the upstream ID, unit, currency and effective period on the provider's official page.
2. Record the link and the rate in a code review.
3. Run `gateway validate` before applying.
4. Do not copy one provider's rate to another: the same model costs differently at each intermediary.

The community cost map helps you discover prices, but it does not prove the rate contracted for your account.

## Upgrade notes

Earlier versions used a manual entry only where no automatic price was available; now an entry in effect wins. Deployments that relied on manual entries only as gap-fillers should remove the entries they no longer want to win before upgrading.

## Limits

- One unit per entry: text-token rates, or one media unit price. Token-priced image models such as GPT Image are priced by the [automatic catalog](/docs/features/automatic-pricing/#media).
- It is neither an invoice nor a ledger. The real invoice comes in through [billing imports](/docs/features/native-billing-imports/).

## See also

- [Automatic pricing](/docs/features/automatic-pricing/).
- [Price book management](/docs/features/price-book-management/).
