# Credits & pricing

What a credit is, what each endpoint charges, the six rules, and worked examples.

## One number per response

Every response — success or error — carries

```plaintext
X-Credits-Charged: 6.25
```

the same number written to your usage. Errors say `0`. That header is the whole billing contract; the dashboard and `GET /v1/usage` only add it up.

## Weights per source

A shop’s cost is the source’s **weight**: 1 credit on Marriott, Hilton, Hyatt, IHG, Choice, Meliá, Premier Inn and I Prefer and on the five OTAs; 3 on Radisson; 5 on Best Western; 6 on Wyndham. Those four values are the only ones there are. The weight is our measured upstream cost of one shop, not a view of what the data is worth — a Best Western shop is a catalogue call plus one call per rate plan; Radisson and Wyndham take more upstream work per shop. The full table, with comp-set and calendar prices per source, is on the [pricing page](https://directrate.dev/pricing#weights) and in [/pricing.json](https://directrate.dev/pricing.json).

## Per endpoint

Quoted from each operation’s description in the [OpenAPI spec](https://directrate.dev/docs/reference):

| Endpoint                         | Billing                                                                                                                                                                                                                     |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `POST /shop`                     | Billed the chain’s shop weight per live shop; cache hits 0.25×; errors free. `max_age` caps cache staleness; `max_age=0` forces live.                                                                                       |
| `POST /award`                    | Billed like /shop (shop weight live, 0.25× cached).                                                                                                                                                                         |
| `POST /parity`                   | Billed as the shops it made (each chain’s weight, cached 0.25×) plus 1 credit when ids were resolved live.                                                                                                                  |
| `POST /calendar`                 | Billed the shop weight per LIVE night; cached nights 0.25× — and on native-calendar chains a night is priced through the calendar instead: 0.1 credit (0.25 on Wyndham).                                                    |
| `POST /compset`                  | Billed per hotel returned at the chain’s compset rate (hotels served from cache 0.25×; error/not_found free), minimum 1 credit per call. `rates: "member"` adds per-hotel credits only where it needs extra upstream calls. |
| `POST /compset/award`            | Billed like /compset; chains without award points return empty rows at 0 credit.                                                                                                                                            |
| `POST /stay`                     | Billed as the two calls would be: the shop weight (cached 0.25×) plus the calendar nights, under one usage line `stay`.                                                                                                     |
| `GET /hotels`                    | 1 credit on plane-A chains; Wyndham and Best Western bill their shop weight. Cached 0.25×.                                                                                                                                  |
| `GET /suggest`                   | 1 credit (cached 0.25×).                                                                                                                                                                                                    |
| `GET /hotels/{chain}/{code}/ids` | 0 credits from the map, 1 credit when a live resolution ran.                                                                                                                                                                |
| `GET /chains`, `GET /usage`      | free                                                                                                                                                                                                                        |

## The six rules

1. A result served from a recent cache bills **0.25×** the live price; `max_age: 0` forces a live shop at full price.
2. **Errors, `not_found`, upstream timeouts and an OTA with no listing cost nothing.** Lookups that find nothing because of what was asked (a hotel code the chain does not know, a date it does not sell) are free up to a fair-use allowance per account per UTC day: 50 on Free, 150 on Starter, 750 on Growth, 3,750 on Scale. Past it they are still free, but each further one pauses the account’s lookups for a minute per call it cost, at most 15 minutes (`429 rate_limited` with `Retry-After`).
3. `/compset` bills per hotel returned, minimum 1 credit per call; error and `not_found` hotels are not counted.
4. The quota is checked **before** a call is made: a request that would exceed it is refused with `429 quota_exceeded`, never half-billed.
5. Rate limits are an abuse guard per account, not a sold feature: `429 rate_limited` comes with `Retry-After`.
6. Every response states its own price in `X-Credits-Charged`.

## Worked examples

All measured against production:

- One Hilton rate matrix: **1 credit**. One Wyndham matrix: **6**.
- A 10-hotel Marriott comp set: **2.5 credits** (10 × 0.25). A 3-hotel one: **1**, the per-call minimum.
- A 30-night IHG calendar: **3 credits** (30 × 0.1). The same on an OTA: 30 shops, 30 credits. Hyatt’s and Meliá’s calendars carry no cash, so their open nights are shopped at the shop weight.
- A `/parity` call on a Choice hotel against all five OTAs, four of them listing it, with the ids already mapped: **5.25 credits** (0.25 cached direct shop + 4 × 1 channel shops + 1 for resolving the ids live; the channel with no listing is free). The home page’s Hyatt example, resolved live: **6.25**.
- A 3-night `/stay` on Choice: **1.3 credits** (1 shop + 3 × 0.1 nights).

## The same allowance everywhere

REST, the [MCP server](https://directrate.dev/docs/mcp.md) and the [Apify Actor](https://apify.com/mu0i/hotel-rates-award-points) are three doors to one meter. An MCP tool call is replayed through the `/v1` pipeline and bills exactly what the REST call bills, with `credits_charged` on the result where `X-Credits-Charged` would be; a connector that signed in with OAuth spends from the key you chose on its consent page. There is no surcharge for any door and no separate quota.

## Plans

Free 250 / Starter 3,000 ($29) / Growth 15,000 ($99) / Scale 75,000 ($349, 1-month rollover) / Enterprise from 250,000 ($1,000+, annual). Annual billing is two months free.

Starter, Growth and Scale are bought with a card in the dashboard, under [Settings → Billing](https://directrate.dev/dashboard/settings#billing). An upgrade takes effect at once; a cancelled plan runs to the end of the period you paid for. Enterprise is arranged by email, from the [pricing page](https://directrate.dev/pricing).

---

This page for people: https://directrate.dev/docs/credits-and-pricing
