Skip to main content

Cost Allocation

Cost allocation is performed on the Control Plane for each @action. This lets you understand what each action costs and track profitability.

Allocating Costs

You can allocate costs in different ways as per Unit of Measure Allocate costs based on a specific metric from your actions:
  • Per token (input tokens, output tokens, or total tokens)
  • Per API call

Per Token

For LLM usage, allocate costs based on token consumption: The Control Plane automatically calculates costs as per automatic traces from the value-client-sdk.

Per Unit

Allocate a fixed cost per action:
  • $0.05 per action
  • $0.10 per API call

How It Works

When an action is processed, the Control Plane:
  1. Applies the cost allocation rules you’ve configured
  2. Calculates the cost for that Action
This gives you visibility into costs at the action level, which helps you understand profitability and optimize pricing.