Cost Attribution

Every token consumed through the Thinklio API is attributed to a specific entity. This attribution powers the budget system, the usage dashboard, and any external billing integration.

Attribution Model

Channel API

Costs are attributed to the user on whose behalf the message was sent. The X-Channel-User-Id header identifies this user. The cost appears in that user's usage within their team and org context.

If no user ID is provided, costs are attributed to the API key's owning entity (org or team).

Platform API

Costs are attributed to the organisation or team associated with the API key. Jobs dispatched via the Platform API carry the same cost attribution as jobs dispatched by agents — the API key's org/team context is the billable entity.

For jobs that spawn subjobs, the cost of all subjobs is attributed to the org/team that initiated the top-level job.

Integration API

Thinklio calling your tool: Tool execution costs (compute, tokens consumed by the agent while using the tool) are attributed to the agent's interaction context — the same org/team that owns the agent.

Your system invoking Thinklio agents: When an external system dispatches jobs via the Platform API's job dispatch endpoint, costs are attributed to the external system's associated organisation.

Reading Attribution Data

The Usage API returns cost data broken down by attribution entity. You can query:

  • Total cost by org, team, agent, or user
  • Cost by API surface (channel vs platform vs integration)
  • Cost by time period
  • Cost by specific job or session

External Billing

If you are building a billing integration on top of Thinklio (e.g., reselling Thinklio capabilities to your own customers), use the Usage API to pull attribution data and incorporate it into your own billing system. Costs are reported in token units and can be converted to currency using the pricing rates from your contract.