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

# Agent Cost Calculator

> Estimate what a long-running agent costs on Sail and compare with traditional inference providers

Estimate your agent's inference cost by choosing a workload profile or entering
your own.

<div id="sail-cost-calculator" className="sail-calc">
  <p>
    The interactive calculator needs JavaScript, which your browser doesn't support. Here is a representative
    worked example instead: a deep-research agent that runs 50 turns and
    totals 4.0M cached input reads, 1.5M fresh input tokens, and 250K output
    tokens, priced on Sail's `zai-org/GLM-5.3` and on generic
    traditional inference provider tiers at generic list prices (Sonnet-class:
    \$3 input / \$15 output / \$0.30 cache reads per 1M tokens; Opus-class: \$5
    / \$25 / \$0.50).
  </p>

  | Where it runs | Cost | vs Sail `balanced` |
  | - | - | - |
  | Sail `flex` | \$1.37 | 0.7x |
  | Sail `balanced` | \$1.86 | 1x |
  | Sail `asap` | \$1.94 | 1x |
  | Sonnet-class API, batch tier (24h window) | \$4.73 | 2.5x |
  | Sonnet-class API | \$9.45 | 5.1x |
  | Opus-class API | \$15.75 | 8.5x |
</div>

## How the math works

```
cost per run = turns × (fresh × P_input + cached × P_cached + Supercache reads × P_supercache_read + Supercache writes × P_supercache_write + output × P_output) / 1,000,000
```

* **Fresh input**: tokens the model reads for the first time each turn (new
  tool results, search snippets, file contents).
* **Cached input**: tokens reread from prompt cache (the growing conversation
  history). Cache reads are billed at the `cached` rate.
* **Supercache reads**: tokens read from [Supercache](/supercache). They use
  the Supercache read rate.
* **Supercache writes**: tokens written to Supercache. They use the Supercache
  write rate.
* **Output**: tokens the model writes (reasoning and answers).

Sail rates come from the [Pricing](/pricing) page for the selected model and
[completion window](/completion-windows).

## Assumptions and caveats

* **Each turn must fit the model's supported token budget.** The calculator counts all
  input categories plus output per turn. If that total exceeds the selected
  model's budget, it shows a warning instead of cost estimates and
  keeps your inputs unchanged.
* **Traditional inference provider tiers use generic list prices.** "Sonnet-class" is \$3 input /
  \$0.30 cache reads / \$15 output per 1M tokens (batch tier = 50% off inside
  a 24-hour window); "Opus-class" is \$5 / \$0.50 / \$25.
* **Sail's ASAP prices undercut traditional inference providers for many models.** The
  calculator uses Sail's published rates and generic list prices from
  traditional inference providers. A same-model row appears only when the
  pricing data includes a maintained traditional inference provider price. The
  calculator does not substitute ASAP for that price.
* **The model has to do the job.** For simplicity, the math assumes you're using one frontier-class open
  model for your task. Often, we see the hybrid approach using both frontier closed models and open models, or a mix of open models.
