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

> ## Agent Instructions
> Choose User guide for browser tasks, Developers for CLI, SDK and external agents, and Administration for organization management.
> Confirm identity and organization/project context before operations. Documentation access does not grant ThinkPlatform permissions.
> Review side effects, verify changes with a read, and do not blindly retry an operation with an uncertain outcome.
> Use documented UI steps for the web app and documented public CLI or SDK interfaces for automation. Follow each page’s prerequisites and authentication requirements.

# Agent cost model

> Calculate agent costs from provider pricing, token usage, and billing data.

## Evidence hierarchy

Use evidence in this order:

1. Provider-billed (actual) costs for financial totals.
2. ThinkPlatform allocated provider actuals for project, user, Agent, task, and model attribution.
3. Runtime measured `estimatedCost` for diagnostic detail.
4. Token/request/duration proxies when direct cost is unavailable.

Provider actuals and runtime estimates can differ because of reporting delays, currency conversion, discounts, service tiers, rounding, cached-token treatment, tool charges, credits, or incomplete attribution. Reconcile the differences rather than combining the figures.

## General formula

For each provider, model, service tier, and context tier:

```text theme={"system"}
request cost
  = uncached input tokens × uncached input rate
  + cached input tokens × cached input rate
  + cache-write tokens × cache-write rate
  + output tokens × output rate
  + audio/image tokens × modality rates
  + built-in tool, storage, retrieval, container, or other service charges
```

Then:

```text theme={"system"}
period cost = sum(request cost) + fixed/provisioned capacity charges
```

Do not assume all providers expose every component or that cached tokens are separate from total input tokens. Confirm field semantics before subtracting or adding token categories.

## Metrics to calculate

* Cost share: `slice actual cost / project actual cost`.
* Activity share: `slice requests / project requests`.
* Effective cost per request: `slice actual cost / slice requests`.
* Effective cost per million input/output tokens: use only when token coverage is adequate and label it as blended.
* Cache ratio: `cached input tokens / input tokens` only when input tokens include cached tokens.
* Output amplification: `output tokens / input tokens`.
* Reasoning share: `reasoning tokens / output tokens` only when the provider documents reasoning as part of output.
* Daily execution rate: `requests or tasks / active days`.
* Schedule overhead: failed, retried, duplicated, or overlapping executions × representative task cost.
* Concentration: cost share of top model, Agent, task, user, and day.

Always handle zero denominators and disclose low token coverage.

## Current pricing verification

Pricing is time-sensitive. At analysis time, verify the specific provider, model snapshot, region, service tier, and context length using official sources:

* OpenAI API pricing: [https://developers.openai.com/api/docs/pricing](https://developers.openai.com/api/docs/pricing)
* OpenAI prompt caching: [https://developers.openai.com/api/docs/guides/prompt-caching](https://developers.openai.com/api/docs/guides/prompt-caching)
* OpenAI Batch API: [https://developers.openai.com/api/docs/guides/batch](https://developers.openai.com/api/docs/guides/batch)
* OpenAI Usage API: [https://platform.openai.com/docs/api-reference/usage](https://platform.openai.com/docs/api-reference/usage)
* Azure OpenAI pricing: [https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/)
* Azure OpenAI prompt caching: [https://learn.microsoft.com/azure/ai-services/openai/how-to/prompt-caching](https://learn.microsoft.com/azure/ai-services/openai/how-to/prompt-caching)
* Azure provisioned throughput billing: [https://learn.microsoft.com/azure/foundry/openai/concepts/provisioned-throughput-billing](https://learn.microsoft.com/azure/foundry/openai/concepts/provisioned-throughput-billing)

Record the URL and access date in the report. Do not copy a price from this skill.

## Pricing distinctions that change conclusions

* Input, cached input, cache writes, and output can have different rates.
* Long-context tiers can change rates above provider-specific thresholds.
* Standard, Batch, Flex, priority/fast, and provisioned capacity have different economics.
* Some built-in tools and storage are billed separately from model tokens.
* Azure Standard token billing and provisioned throughput unit/hour billing require different utilization analyses.
* A cheaper model that increases retries, output, or tool loops can cost more per successful outcome.

## Prompt caching interpretation

Caching helps only when requests are eligible and share an exact stable prefix under the provider's rules. Place stable instructions and common context before variable user/task content when platform behavior permits.

Do not treat low cache usage as waste when:

* requests are below the provider's cache eligibility threshold;
* prompts legitimately differ at the beginning;
* traffic is too sparse or separated beyond cache lifetime;
* the provider/model/tier does not support the expected cache behavior.

## Currency and billing period

Keep provider currencies separate unless ThinkPlatform supplies a documented conversion. State the exchange-rate source and date when converting. Align analysis dates with provider reporting timezone and note that very recent days may be incomplete.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.