# Pricing

You pay for input tokens: **$0.042 per million input tokens** (that is $42 per billion). Output is free. This is the same way TypeSafe prices Jev, at the same price. Jers is for business customers; prices exclude VAT and other taxes, which are added where the law requires.

Input tokens are what the engine read to answer: the state, your questions and their options, and the memory lines it recalled for the subject. `usage.input_tokens` in every answer is the engine's own count, never an estimate, and `usage.output_tokens` is always 0, because Jers does not generate text.

Memory writes (`remember`, rules) are free; the lines are paid for as input when a decision reads them.

## How it is counted

The engine reads the state once per question, so a request with three questions reads it three times. Measured on 2026-09-24 through `https://api.getjers.com` with `jers-english`, a 74-character support message:

| Request | `input_tokens` | Cost at $0.042 per million (arithmetic) |
|---|---|---|
| one yes/no question | 47 | $0.000002 |
| three questions (choice, yes/no, score) | 128 | $0.0000054 |
| the same three, with a state four times as long | 245 | $0.0000103 |
| the same three with `"robust": true` | 208 | $0.0000087 |

- `"robust": true` reads each choice once per option order, `"windows": true` reads every window, and a choice with more than 20 options is read in two rounds; all of that is in the engine's count and billed.
- `"memory": {"compare": true}` (the same call without memory) and `"memory": {"placebo": true}` (the neutral pass) are extra passes that are not billed.
- A cache hit is billed like the first call; `usage.cached` says it cost no engine work.

Every priced request is one line in your tenant's ledger with the time, the route, the counts and the cost, and is charged against your prepaid credit at once. `GET /v1/usage` returns credited, spent, balance, requests, the prices, your rate limit, your key ids, the ledger totals and the last twenty lines; the totals and the balance always agree. A request that fails upstream (502) or in the gateway (500) is not charged.

## Credit

Jers adds credit to your tenant after a payment. When the balance is zero or below, priced requests answer 402 until credit is added; `GET` routes still work so you can see the account.

## Rate limits

Each key has a limit of requests per minute, set for its tenant (default 600; 60 for a tenant made by sign-up). Over it, 429 with `Retry-After`.
