> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ruapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How billing works

> Pay-as-you-go token billing, a log entry for every request, and per-key spend limits.

Your RuAPI balance is debited on usage: each request costs exactly the tokens the model actually consumed. No subscriptions, no monthly fee — the only extras are one-off discounts when you top up.

## How charges are calculated

<Steps>
  <Step title="You send a request">
    Your SDK hits our endpoint. We route it to the appropriate provider.
  </Step>

  <Step title="The provider runs it">
    Returns the response plus token counts (input + output).
  </Step>

  <Step title="We deduct from your balance">
    Your balance is reduced by the USD value of the tokens you used. Internal accounting is in USD at 1 USDT / USDC = 1 USD — no conversion to local currencies.
  </Step>

  <Step title="We log the call">
    In the Console → **Logs**, every request shows the model, input/output tokens, and the exact deduction.
  </Step>
</Steps>

<Tip>
  Vendor prices per token can change. Current per-token rates are shown at [www.ruapi.ai](http://www.ruapi.ai) and update automatically.
</Tip>

## Cache and the effective price

Many workloads send the same context over and over — a system prompt, a long document, the history inside agent loops (Claude Code and similar tools). Those repeated input tokens **hit the cache and cost far less**: about 1/10 of the input price on Claude, and even less on DeepSeek. Exact per-model rates are on the [pricing page](https://www.ruapi.ai/pricing).

On agent workloads the cache covers most of the input — often 80–97% of tokens. So the real average input price comes out **well below the list rate**. That average is what we show next to each model as the **"effective price."**

<Note>
  The "effective price" is an estimate for a typical agent workload at \~80% cache hits, not a fixed rate. Your cache share depends on how much repeated context you send. Output tokens aren't cached and bill at the normal rate. Writing a prefix to the cache costs slightly more than a normal input token, but only once; every read after that is cheap.
</Note>

For a breakdown on a real working day — how many tokens go to cache and what it does to the bill — see [DeepSeek vs Claude: what one day of work actually costs](/en/deepseek-vs-claude).

## A log entry for every request

Every call lands in the Console → **Logs**. Each row shows the model, the input and output token counts, and the USD amount debited. That lets you check at any time where your balance went and spot requests that cost more than expected.

## Per-key spend limits

When you create an API key, you can set a **spend limit in USD** — a cap on how much that single key can draw from your overall balance. Useful for:

* Production / staging / test keys with different limits.
* Sharing a key with a contractor, capped to a set budget.
* Protecting against runaway scripts.

See [Authentication](/en/authentication) for details.

## Refunds and unused balance

Unused balance **doesn't expire**: it sits on your account indefinitely. See the [Refund Policy](/en/legal/refund) for refund rules.

## How to pay

Payment methods, USDT networks, and top-up discounts are covered separately — see [Top-up Guide](/en/topup).
