# How billing works

kenari bills in Rupiah. Most requests are paid from a prepaid balance, a plan can cover chat usage on listed models, and free models and your own provider keys cost nothing. This page is the one home for money: top up, spend limits, how a request is charged, and what each endpoint is billed by.

## How you pay

| Way to pay | What it means |
| --- | --- |
| PAYG | Each paid request is charged to your balance at the model price. This is the default. |
| Subscription | A plan gives you quota for chat on listed models. See [Subscriptions](/en/docs/subscriptions). |
| Free models | `:free` models cost Rp 0 within daily and per-minute limits. See [Free models](/en/docs/free-models). |
| BYOK | Requests served by your own provider key or connected AI subscription cost Rp 0 on kenari. See [Providers](/en/docs/byok). |

## Balance and top up

Open the **Balance** page, or use **Top up** in the top bar. Under **Pay with**, choose a method.

| Method | How you pay | Balance is added |
| --- | --- | --- |
| QRIS | Enter an amount, then scan the QR on the payment page with your banking or e-wallet app | When the payment completes |
| USDC / USDT | Send any amount to your own deposit address. See [Deposit USDC or USDT](#deposit-usdc-or-usdt). | When the network confirms the transfer |
| Other crypto | Enter an amount, then pay the invoice in the coin and network you choose | When the network confirms the payment |

The minimum and maximum for each method are shown on the **Balance** page.

For QRIS and **Other crypto** you enter the amount in Rupiah. For **Other crypto**, kenari issues the invoice in US dollars at the platform exchange rate when the invoice is created, and the network fee is paid by the payer on top of the invoice. For QRIS, the payment page can show a **Service fee** added to the amount. **Total to pay** is the figure your banking app asks for. Your balance is credited the amount you chose.

Each invoice has its own link, so you can reopen the payment page while the invoice is valid. The page checks the status every few seconds, and **Check now** forces a check. Subscription payments use the same page. An expired invoice cannot be paid, so choose **Create new payment**.

A top-up bonus code adds extra balance when you top up. See [Codes and referral](/en/docs/codes-referral).

### Deposit USDC or USDT

**USDC / USDT** gives you a deposit address that is yours alone and does not change, so you can send to it again for every top up. There is no invoice and no time limit.

1. On the **Balance** page, choose **USDC / USDT**, then **Continue to deposit address**.
2. Under **Network**, pick the network you will send on. The page says which tokens that network takes.
3. Copy the address or scan the QR, then send USDC or USDT on that network from any wallet or exchange.

The transfer shows on the page as soon as the network sees it, with its progress. kenari adds the balance by itself once the network confirms it, usually within a few minutes. The amount is converted at the platform exchange rate when the transfer is first seen, and kenari charges no fee.

- Send only the token and network the page names. Another token or another network does not reach your balance.
- A transfer below the minimum shown on the page is not added to your balance. Contact support if you sent one.
- A very large transfer is held for review before it is added.
- In a team workspace, a deposit always goes to your Personal balance. Move it into the team with **Move to team**.
- A top-up bonus code does not apply to a deposit. It works with QRIS or an **Other crypto** invoice.

## PAYG spend limit

You can cap how much PAYG can spend. On the **Plan** page, open the section **When your quota runs out**, set **PAYG balance limit** to **Daily** or **Monthly** with an amount in Rupiah, then click **Save**. The change does not apply until you save. To turn the cap off, choose **No limit** and click **Save**.

- **Daily** counts spend over the last 24 hours. **Monthly** counts spend over the last 30 days. Both are rolling windows.
- Only PAYG spend counts. That includes web and X search fees taken from your balance and video renders that are still in progress. Plan quota, coupons, free models and BYOK do not.
- A paid request is refused with HTTP 402 and code `payg_limit_reached` once the spend in the window has reached the limit, even if your balance has money.
- The limit is checked before a request starts, so the request that crosses it still completes and the next one is refused. A web search, page fetch or X search that would take the spend past the limit is refused instead. Searches still running count toward it, so parallel searches cannot pass the limit together.
- The limit applies to all PAYG spend from your balance, whatever you choose for **Keep using your balance**.

## How a chat request is charged

A paid chat request is charged in two steps. Other endpoints reserve and charge by their own unit, described under [What each endpoint is billed by](#what-each-endpoint-is-billed-by).

1. **Reservation.** Before the request runs, kenari reserves its worst case: the estimated input plus `max_tokens` at the Output price. If you omit `max_tokens`, a large default applies. The reservation must fit in your balance minus the reservations of your other requests in flight.
2. **Settlement.** When the response ends, kenari charges the actual usage and releases the rest of the reservation.

If your balance cannot cover the requested `max_tokens`, kenari lowers `max_tokens` to what the balance can pay for, as long as at least 1,024 output tokens remain. The response can then end early with `finish_reason` set to `length`. Below that floor the request is refused with HTTP 402:

```json
{
  "error": {
    "message": "insufficient balance: available Rp 19,589; this request reserves up to Rp 21,500 worst-case (input estimate + max_tokens x output rate). Send a shorter prompt or top up at https://kenari.id/pay",
    "type": "insufficient_balance",
    "param": null,
    "code": "insufficient_balance"
  }
}
```

The message shows the balance available right now and the worst-case cost of this one request. A request funded by plan quota, a coupon or a free model does not need balance.

### No output, no charge

A chat request that finishes with no output tokens costs Rp 0, even if the prompt was processed. This holds whether the request was funded by balance or by plan quota. The request still appears in your usage history with zero cost.

If you close a stream before it ends and the provider did not report usage, kenari charges for what it had already delivered, estimated from the text sent. Closing the connection after the last token does not make it free.

<aside><strong>Note</strong> Reasoning tokens count as output. A reasoning model that spends all of <code>max_tokens</code> thinking and writes no answer is still charged for the tokens it used. Raise <code>max_tokens</code> if you expect long reasoning.</aside>

## Price dimensions

Chat models are priced on four dimensions per 1M tokens. Each dimension is charged as tokens × price ÷ 1,000,000.

| Dimension | Billed on | If no price is set |
| --- | --- | --- |
| Input | Prompt tokens that were not read from or written to the cache | Always set |
| Output | Tokens the model generates, including reasoning tokens | Always set |
| Cache read | Prompt tokens served from the cache | Billed at the Input price. A Cache read price is never charged above Input. |
| Cache write | Prompt tokens written to the cache | Billed at the Input price |

Prices and balances are stored in micro-Rupiah, where Rp 1 is 1,000,000 micro-Rupiah. `GET /v1/models` returns prices in micro-Rupiah per 1M tokens, so `2000000000` means Rp 2,000 per 1M tokens. The dashboard shows ordinary Rupiah. To read your balance from code, call `GET /v1/account/balance`. See [Account balance](/en/docs/account-balance).

```bash
curl -s https://kenari.id/v1/models \
  | jq '.data[] | select(.id == "deepseek-v4-flash") | .pricing'
```

Prices for every model are on [Models and pricing](/en/docs/models).

### Long-context prices

Some models cost more for long requests, the way their vendor bills them. Such a model has one or more thresholds, each with its own Input, Output, Cache read and Cache write prices. When a request's input tokens, cache reads and cache writes included, are above a threshold, the whole request is billed at that threshold's prices, not only the tokens past it. When a model has several thresholds, the highest one the request passes applies.

For example, a model priced Rp 3,000 Input and Rp 15,000 Output per 1M tokens, with prices of Rp 15,000 and Rp 75,000 above 100,000 input tokens:

| Request | Cost |
| --- | --- |
| 100,000 input tokens, 1,000 output tokens | 100,000 × 3,000 ÷ 1,000,000 + 1,000 × 15,000 ÷ 1,000,000 = Rp 315 |
| 120,000 input tokens, 1,000 output tokens | 120,000 × 15,000 ÷ 1,000,000 + 1,000 × 75,000 ÷ 1,000,000 = Rp 1,875 |

A request that runs kenari's server tools, such as `kenari:web_search`, calls the model more than once, and each call is priced by its own input. Plan quota is used at the same prices. A model's thresholds and prices are in `pricing.tiers` on `GET /v1/models` (see [Models and pricing](/en/docs/models#prices-in-the-list)) and in the model detail in the dashboard Katalog.

## What each endpoint is billed by

| Endpoint | Billed by |
| --- | --- |
| [Chat completions](/en/docs/chat), [Messages](/en/docs/messages), [Responses](/en/docs/responses) | Tokens, on the four price dimensions above. Images and files that the model reads itself count as Input tokens. |
| [Embeddings](/en/docs/embeddings), [Rerank](/en/docs/rerank), [Moderations](/en/docs/moderations) | Input tokens, estimated from the text at about four characters per token |
| [System One](/en/docs/systemone) | Input tokens. The estimate is about four characters per token, and the charge never exceeds it. Output tokens are not billed. |
| [Images](/en/docs/images) | Per image, `n` times the model price |
| [Text to speech](/en/docs/audio-speech) | Per 1,000 input characters, rounded up |
| [Transcriptions](/en/docs/audio-transcriptions) | Per second of audio, rounded up |
| [Music](/en/docs/music) | Per song |
| [Videos](/en/docs/videos) | Per second of video, at the price of the resolution you ask for |
| [OCR](/en/docs/ocr) and the `ocr` engine in [Read documents](/en/docs/documents) | Per page read, for the `ocr` engine and `/v1/ocr` only. These are the only document paths not billed by tokens, and plans never cover them. Every other way of attaching a document is billed as input tokens. See [Images and files as input](/en/docs/vision). |
| [Server tools](/en/docs/server-tools) and [Web and X search](/en/docs/web-search) | Per call |
| [Providers](/en/docs/byok) | Free on kenari |

Paid non-chat requests reserve an amount of balance before they run, calculated from the estimate for that endpoint. Embeddings, Rerank and Moderations charge the estimated input tokens, and the `usage` in the response is for display only. For Transcriptions, kenari estimates the duration from the file size, then charges the real duration the provider reports, and the estimate if the provider reports none. The charge never exceeds the reservation, and the rest is released. A request fails with `402` when the balance cannot cover the reservation, even if the actual audio or text is short.

Plan quota covers chat only. Paid requests to every other endpoint are paid from your balance. That holds while quota remains, after a quota window is spent and after a plan has ended. **Keep using your balance** and **Switch to free models** do not change it. The one exception is the daily allowance of web search and page fetch calls that plans include. Free models, such as `clef:free`, do not need balance. See [Subscriptions](/en/docs/subscriptions) for the endpoints a plan never covers.

## Usage history

Open the **Usage** page in the dashboard. The **Usage** tab shows requests, tokens and cost per model and per API key, with a filter for free, plan, PAYG and own-key usage, and a CSV download. The **Balance & billing** tab shows your balance history, your payments, and an invoice builder for any period.

The same usage is available over the API with `GET /v1/usage`, `/v1/usage/daily` and `/v1/usage/log`. Amounts there are in micro-Rupiah, which is Rupiah times 1,000,000. Reading usage is free. See [Usage](/en/docs/usage).

## See also

- [Free models](/en/docs/free-models)
- [Subscriptions](/en/docs/subscriptions)
- [Codes and referral](/en/docs/codes-referral)
- [Errors](/en/docs/errors)
