# Token-based Credits

> How Runcell converts AI model token usage into Credits

Canonical HTML: https://www.runcell.dev/docs/token-based-credits

Runcell calculates **Ask/Chat** and **Agent** usage from the tokens reported for the selected model. Regular input, cached input, cache writes, and output can have different provider prices, so the backend calculates those usage buckets separately.

Token-based Credits currently apply to Ask/Chat and Agent mode. Other AI features, such as code completion, code apply, image generation, predictive interaction, visualization analysis, and title generation, still use their standard feature-based credit rules.

## Current conversion rate

The current token billing policy converts provider-equivalent model usage into Credits at a fixed rate:

```text
1 USD of billable model usage = 30 Credits (changed from 100 Credits/USD on July 15, 2026)
1 Credit = 0.033333... USD of billable model usage
```

The default token billing policy does not add a separate product markup. The current model multiplier and token-bucket multipliers are `1.0`. Provider-specific input, output, cache-read, and cache-write prices are part of the model usage cost.

## How credits are calculated

The backend first converts each usage bucket into a provider cost in USD. Prices in the model table below are expressed as USD per 1 million tokens:

```text
regular_input_cost = regular_input_tokens / 1,000,000 * input_usd_per_mtok

cache_read_cost = cache_read_tokens / 1,000,000 * cache_read_usd_per_mtok

cache_write_cost = cache_write_tokens / 1,000,000 * cache_write_usd_per_mtok

output_cost = output_tokens / 1,000,000 * output_usd_per_mtok

billable_cost_usd = regular_input_cost + cache_read_cost + cache_write_cost + output_cost
```

The USD-equivalent cost is then converted to Credits and rounded up to the nearest `0.01 Credit`:

```text
raw_credits = billable_cost_usd * 30
total_credits = ceil(raw_credits / 0.01) * 0.01
```

Any request with billable usage has a minimum final charge of `0.01 Credit`.

For example, Claude Sonnet 4.5 currently uses `$3 / 1M` regular input tokens and `$15 / 1M` output tokens. A request with `10,000` regular input tokens and `1,000` output tokens costs:

```text
10,000 / 1,000,000 * $3 = $0.03
1,000 / 1,000,000 * $15 = $0.015

Provider cost = $0.045
Credits = $0.045 * 30 = 1.35 Credits
```

## Model token credit rates

The table below applies the current `30 Credits / USD` conversion to the backend's provider token prices. It shows regular input and output costs before final `0.01 Credit` rounding. Cache-read and cache-write rates are model-specific and are described below.

The table reflects the backend pricing snapshot dated September 5, 2026, sourced from the OpenRouter Models API.

### Anthropic

| Model                         | Credits / 1K input tokens | Credits / 1K output tokens | Credits / 100K input tokens | Credits / 100K output tokens |
| ----------------------------- | ------------------------: | -------------------------: | --------------------------: | ---------------------------: |
| `anthropic/claude-sonnet-5`   |                      0.09 |                       0.45 |                           9 |                           45 |
| `anthropic/claude-sonnet-4-6` |                      0.09 |                       0.45 |                           9 |                           45 |
| `anthropic/claude-sonnet-4-5` |                      0.09 |                       0.45 |                           9 |                           45 |
| `anthropic/claude-haiku-4-5`  |                      0.03 |                       0.15 |                           3 |                           15 |
| `anthropic/claude-opus-4-5`   |                      0.15 |                       0.75 |                          15 |                           75 |
| `anthropic/claude-opus-4-6`   |                      0.15 |                       0.75 |                          15 |                           75 |
| `anthropic/claude-opus-4-7`   |                      0.15 |                       0.75 |                          15 |                           75 |
| `anthropic/claude-opus-4-8`   |                      0.15 |                       0.75 |                          15 |                           75 |
| `anthropic/claude-opus-5`     |                      0.15 |                       0.75 |                          15 |                           75 |
| `anthropic/claude-fable-5`    |                      0.30 |                       1.50 |                          30 |                          150 |
| `anthropic/claude-fable-5.1`  |                      0.30 |                       1.50 |                          30 |                          150 |

### OpenAI

| Model                  | Credits / 1K input tokens | Credits / 1K output tokens | Credits / 100K input tokens | Credits / 100K output tokens |
| ---------------------- | ------------------------: | -------------------------: | --------------------------: | ---------------------------: |
| `openai/gpt-5.2`       |                    0.0525 |                       0.42 |                        5.25 |                           42 |
| `openai/gpt-5.4`       |                     0.075 |                       0.45 |                         7.5 |                           45 |
| `openai/gpt-5.4-mini`  |                    0.0225 |                      0.135 |                        2.25 |                         13.5 |
| `openai/gpt-5.5`       |                      0.15 |                       0.90 |                          15 |                           90 |
| `openai/gpt-5.6-luna`  |                      0.03 |                       0.18 |                           3 |                           18 |
| `openai/gpt-5.6-terra` |                     0.075 |                       0.45 |                         7.5 |                           45 |
| `openai/gpt-5.6-sol`   |                      0.15 |                       0.90 |                          15 |                           90 |
| `openai/gpt-6-astra`   |                      0.30 |                       1.50 |                          30 |                          150 |
| `openai/gpt-5.2-codex` |                    0.0525 |                       0.42 |                        5.25 |                           42 |
| `openai/gpt-5.3-codex` |                    0.0525 |                       0.42 |                        5.25 |                           42 |
| `openai/gpt-4o-mini`   |                    0.0045 |                      0.018 |                        0.45 |                          1.8 |

### Google

| Model                                   | Credits / 1K input tokens | Credits / 1K output tokens | Credits / 100K input tokens | Credits / 100K output tokens |
| --------------------------------------- | ------------------------: | -------------------------: | --------------------------: | ---------------------------: |
| `google/gemini-3.1-pro-preview`         |                      0.06 |                       0.36 |                           6 |                           36 |
| `google/gemini-3.5-flash`               |                     0.045 |                       0.27 |                         4.5 |                           27 |
| `google/gemini-3-flash-preview`         |                     0.015 |                       0.09 |                         1.5 |                            9 |
| `google/gemini-3-pro-image-preview`     |                      0.06 |                       0.36 |                           6 |                           36 |
| `google/gemini-2.5-flash-image`         |                     0.009 |                      0.075 |                         0.9 |                          7.5 |
| `google/gemini-3.1-flash-image-preview` |                     0.015 |                       0.09 |                         1.5 |                            9 |

### Other providers

| Model                                                      | Credits / 1K input tokens | Credits / 1K output tokens | Credits / 100K input tokens | Credits / 100K output tokens |
| ---------------------------------------------------------- | ------------------------: | -------------------------: | --------------------------: | ---------------------------: |
| `moonshotai/kimi-k2.6`                                     |                    0.0222 |                      0.105 |                        2.22 |                         10.5 |
| `moonshotai/kimi-k2.7-code`                                |                    0.0285 |                       0.12 |                        2.85 |                           12 |
| `deepseek/deepseek-v4-pro`                                 |                   0.01305 |                     0.0261 |                       1.305 |                         2.61 |
| `qwen/qwen3-coder-plus`                                    |                    0.0195 |                     0.0975 |                        1.95 |                         9.75 |
| `x-ai/grok-4.3`                                            |                    0.0375 |                      0.075 |                        3.75 |                          7.5 |
| `x-ai/grok-4.5`                                            |                      0.06 |                       0.18 |                           6 |                           18 |
| `x-ai/grok-4.6`                                            |                      0.06 |                       0.18 |                           6 |                           18 |
| `minimax/minimax-m2.7`                                     |                    0.0084 |                      0.036 |                        0.84 |                          3.6 |
| `minimax/minimax-m3`                                       |                     0.009 |                      0.036 |                         0.9 |                          3.6 |
| `xiaomi/mimo-v2.5-pro`                                     |                   0.01305 |                     0.0261 |                       1.305 |                         2.61 |
| `z-ai/glm-5.1`                                             |                    0.0315 |                      0.105 |                        3.15 |                         10.5 |
| `z-ai/glm-5.2`                                             |                     0.036 |                      0.123 |                         3.6 |                         12.3 |
| `cognitivecomputations/dolphin-mistral-24b-venice-edition` |                     0.006 |                      0.027 |                         0.6 |                          2.7 |

## Cache pricing

The backend treats cache-read and cache-write tokens as separate usage buckets when the provider reports them. It subtracts those buckets from the cache-inclusive input total before applying the regular input rate. The exact charge therefore depends on the selected model's cache prices and the number of tokens in each bucket.

For example, the current Claude Sonnet 4.5 provider rates produce these Credits rates:

| Usage bucket  | Provider price | Credits / 1K tokens |
| ------------- | -------------: | ------------------: |
| Regular input |   `$3.00 / 1M` |                0.09 |
| Cache read    |   `$0.30 / 1M` |               0.009 |
| Cache write   |   `$3.75 / 1M` |              0.1125 |
| Output        |  `$15.00 / 1M` |                0.45 |

A cache hit can lower the cost when the model's cache-read rate is below its regular input rate. A cache write can cost more than regular input. There is no universal `1/5`, `1/4`, or `1/10` discount that applies to every model or conversation.

## Models without a token pricing entry

If the selected model has no current token pricing entry, the backend cannot calculate a token-based charge. The service logs the pricing failure and falls back to the legacy message-based rate. That fallback is an operational safety path, not the current Ask/Chat or Agent pricing model.

## Quick reference

The actual Credits used by a request depend on the selected model, provider-reported usage buckets, cache rates, the current `30 Credits / USD` conversion, and final `0.01 Credit` rounding.
