# Token Economics

## Pricing model overview

Foundation model API pricing is charged on consumption of compute resources expressed as token counts or equivalent units. The billing dimensions are:

| Dimension | Definition |
|---|---|
| Input tokens | Tokens in the prompt sent to the model, including system prompt, user turn, tool definitions, and injected context |
| Output tokens | Tokens generated by the model in its response, including reasoning tokens where applicable |
| Cached input tokens | Input tokens served from the provider's prompt cache rather than re-computed; priced at a discount to standard input |
| Batch input tokens | Input tokens submitted through an asynchronous batch API; priced at a discount to real-time input |
| Batch output tokens | Output tokens returned from an asynchronous batch job |
| Image input | Image tiles or full images submitted as multimodal input; some providers charge per tile, others per image |
| GPU-hour | Compute time consumed by a dedicated model endpoint (provisioned throughput), independent of token count |

## $/M token calculation

To express a per-token price as $/1M tokens:

- If the provider publishes $/token: multiply by 1,000,000.
- If the provider publishes per 1K tokens: multiply by 1,000.
- If the provider publishes per 1M tokens: use as-is.

Example: AWS Bedrock publishes Claude Haiku at $0.00025 per 1K input tokens.
Normalized: $0.00025 × 1,000 = $0.25 per 1M input tokens.

## Monthly cost estimate formula

```
monthly_cost = (monthly_input_tokens / 1_000_000 × input_price_per_M)
             + (monthly_output_tokens / 1_000_000 × output_price_per_M)
```

Where cached or batch tokens replace standard tokens at the relevant discount rate:

```
effective_input_cost = (uncached_input_tokens / 1_000_000 × standard_input_price)
                     + (cached_input_tokens / 1_000_000 × cached_input_price)
```

## How context caching changes the cost curve

Context caching allows the provider to store the KV (key-value) state of a fixed prefix — typically a long system prompt or retrieval context — and reuse it across multiple requests without recomputing it from scratch.

Effect on pricing:

- The cached prefix is charged at the **cache write price** (typically equal to or slightly above the standard input price) on first ingestion.
- Subsequent requests that hit the cache are charged at the **cached read price**, which is typically 80–90% cheaper than the standard input price.
- Storage of cached context may also incur a time-based charge (e.g., Vertex AI charges per 1M cached tokens per hour of storage).

Break-even analysis: context caching becomes cost-effective when the same prefix is reused across enough requests that the cumulative cache read savings exceed the cache write cost plus storage cost.

Example: a 100K-token system prompt sent to 10 requests per hour.

Without caching: 100K tokens × 10 req/hr × $3.00/1M = $3.00/hr input cost.
With caching (write once at $3.75/1M, read at $0.30/1M + $0.48/1M/hr storage for 100K tokens):
- Write: 100K × $3.75/1M = $0.375 (one-time per cache TTL)
- Reads: 100K × 10 × $0.30/1M = $0.30/hr
- Storage: 100K × $0.48/1M/hr = $0.048/hr
- Total: $0.348/hr after initial write — 88% cheaper than uncached.

The specific prices in this example are illustrative; always fetch live prices before computing.

## Batch pricing trade-offs

Batch APIs (Anthropic Batch API, OpenAI Batch API, AWS Bedrock Batch Inference) offer 50% discounts on input and output tokens in exchange for:

- Asynchronous delivery (results returned within a fixed SLA window, typically 24 hours)
- No real-time latency guarantee
- Minimum batch size requirements on some providers

Batch pricing is appropriate for: offline evaluation, document processing, embedding generation at scale, non-interactive summarization pipelines.

Batch pricing is not appropriate for: real-time user-facing inference, streaming responses, interactive agents.

## FOCUS column mapping

When expressing foundation model costs as FOCUS v1.2 line items:

| FOCUS column | Value |
|---|---|
| `ServiceCategory` | AI and Machine Learning |
| `ServiceName` | Provider-specific (e.g., Amazon Bedrock, Azure OpenAI Service, Vertex AI) |
| `ChargeCategory` | Usage |
| `ChargeFrequency` | Usage-based |
| `BilledCost` | Actual amount charged (post any negotiated discounts) |
| `EffectiveCost` | BilledCost minus any credits or committed-use amortization |
| `ListCost` | Published on-demand price before discounts |
| `SkuId` | Model identifier (e.g., `anthropic.claude-sonnet-4-5-v1:0`) |
| `SkuPriceId` | Price dimension (e.g., `input-token`, `output-token`, `cached-input-token`, `batch-input-token`) |
| `ResourceId` | API endpoint or model deployment ARN/resource ID if available |
| `UsageType` | Token dimension (e.g., `InputTokens`, `OutputTokens`) |
| `UsageQuantity` | Number of tokens in the pricing unit (e.g., count of 1M-token increments) |
