Costs

Track token costs per session and execution

List Session Costs Endpoint

GET
/costs/sessions

Query Parameters

execution_id?|

Filter by execution ID

limit?integer

Max items to return

Default50
Range1 <= value <= 200

Response Body

application/json

application/json

curl -X GET "https://loading/costs/sessions"
[
  {
    "session_id": "string",
    "execution_id": "string",
    "workflow_id": "string",
    "phase_id": "string",
    "workspace_id": "string",
    "total_cost_usd": "0",
    "token_cost_usd": "0",
    "compute_cost_usd": "0",
    "input_tokens": 0,
    "output_tokens": 0,
    "total_tokens": 0,
    "cache_creation_tokens": 0,
    "cache_read_tokens": 0,
    "tool_calls": 0,
    "turns": 0,
    "duration_ms": 0,
    "cost_by_model": {
      "property1": "string",
      "property2": "string"
    },
    "cost_by_tool": {
      "property1": "string",
      "property2": "string"
    },
    "tokens_by_tool": {
      "property1": 0,
      "property2": 0
    },
    "cost_by_tool_tokens": {
      "property1": "string",
      "property2": "string"
    },
    "is_finalized": false,
    "started_at": "string",
    "completed_at": "string"
  }
]
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Session Cost Endpoint

GET
/costs/sessions/{session_id}

Path Parameters

session_id*string

Query Parameters

include_breakdown?boolean

Include model/tool breakdowns

Defaulttrue

Response Body

application/json

application/json

curl -X GET "https://loading/costs/sessions/string"
{
  "session_id": "string",
  "execution_id": "string",
  "workflow_id": "string",
  "phase_id": "string",
  "workspace_id": "string",
  "total_cost_usd": "0",
  "token_cost_usd": "0",
  "compute_cost_usd": "0",
  "input_tokens": 0,
  "output_tokens": 0,
  "total_tokens": 0,
  "cache_creation_tokens": 0,
  "cache_read_tokens": 0,
  "tool_calls": 0,
  "turns": 0,
  "duration_ms": 0,
  "cost_by_model": {
    "property1": "string",
    "property2": "string"
  },
  "cost_by_tool": {
    "property1": "string",
    "property2": "string"
  },
  "tokens_by_tool": {
    "property1": 0,
    "property2": 0
  },
  "cost_by_tool_tokens": {
    "property1": "string",
    "property2": "string"
  },
  "is_finalized": false,
  "started_at": "string",
  "completed_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Execution Costs Endpoint

GET
/costs/executions

Query Parameters

limit?integer

Max items to return

Default50
Range1 <= value <= 200

Response Body

application/json

application/json

curl -X GET "https://loading/costs/executions"
[
  {
    "execution_id": "string",
    "workflow_id": "string",
    "session_count": 0,
    "session_ids": [
      "string"
    ],
    "total_cost_usd": "0",
    "token_cost_usd": "0",
    "compute_cost_usd": "0",
    "input_tokens": 0,
    "output_tokens": 0,
    "total_tokens": 0,
    "cache_creation_tokens": 0,
    "cache_read_tokens": 0,
    "tool_calls": 0,
    "turns": 0,
    "duration_ms": 0,
    "cost_by_phase": {
      "property1": "string",
      "property2": "string"
    },
    "cost_by_model": {
      "property1": "string",
      "property2": "string"
    },
    "cost_by_tool": {
      "property1": "string",
      "property2": "string"
    },
    "is_complete": false,
    "started_at": "string",
    "completed_at": "string"
  }
]
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Execution Cost Endpoint

GET
/costs/executions/{execution_id}

Path Parameters

execution_id*string

Query Parameters

include_breakdown?boolean

Include phase/model/tool breakdowns

Defaulttrue
include_session_ids?boolean

Include list of session IDs

Defaultfalse

Response Body

application/json

application/json

curl -X GET "https://loading/costs/executions/string"
{
  "execution_id": "string",
  "workflow_id": "string",
  "session_count": 0,
  "session_ids": [
    "string"
  ],
  "total_cost_usd": "0",
  "token_cost_usd": "0",
  "compute_cost_usd": "0",
  "input_tokens": 0,
  "output_tokens": 0,
  "total_tokens": 0,
  "cache_creation_tokens": 0,
  "cache_read_tokens": 0,
  "tool_calls": 0,
  "turns": 0,
  "duration_ms": 0,
  "cost_by_phase": {
    "property1": "string",
    "property2": "string"
  },
  "cost_by_model": {
    "property1": "string",
    "property2": "string"
  },
  "cost_by_tool": {
    "property1": "string",
    "property2": "string"
  },
  "is_complete": false,
  "started_at": "string",
  "completed_at": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Cost Summary Endpoint

GET
/costs/summary

Response Body

application/json

curl -X GET "https://loading/costs/summary"
{
  "total_cost_usd": "0",
  "total_sessions": 0,
  "total_executions": 0,
  "total_tokens": 0,
  "total_tool_calls": 0,
  "top_models": [
    {}
  ],
  "top_sessions": [
    {}
  ]
}

Syntropic137 Docs v0.18.0 · Last updated March 2026

On this page