Skip to main content

Cost Allocations

Cost allocations define how costs are attributed to actions.

Get Cost Allocations

GET /api/v1/action-costs
Returns cost allocation configuration for the workspace. Response:
{
  "cost_allocations": [
    {
      "action_name": "llm_call",
      "cost_per_unit": 0.002,
      "unit_type": "token"
    }
  ]
}

Update Cost Allocations

PUT /api/v1/action-costs
Body:
{
  "cost_allocations": [
    {
      "action_name": "llm_call",
      "cost_per_unit": 0.002,
      "unit_type": "token"
    }
  ]
}

Cost Measures

Get aggregated cost data for analysis.
GET /api/v1/cost-measures
Query Parameters:
  • start_date (string): Start date (YYYY-MM-DD)
  • end_date (string): End date (YYYY-MM-DD)
  • agent_instance_id (string, optional): Filter by agent instance