---
title: "Get Component Costs"
method: GET
path: "/api/v1/cost/components/costs"
---

# Get Component Costs

`GET /api/v1/cost/components/costs`

## Request

- Base URL: `https://api.stacktrace.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stacktrace.ai/api/v1/cost/components/costs`
- Auth: none declared

What each component adds to the org's context a day, its trend, reach
and why it moved (`stacktrace` cost-notifications §7).

## Query parameters

- `window` '7d' | '30d'

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- ComponentCostsResponse
  - `window` '7d' | '30d', required
  - `generated_at` string, date-time, required
  - `components` ComponentCost[], required
    - `key` string, required
    - `kind` 'skill' | 'mcp_server' | 'builtin' | 'label', required
    - `name` string, required
    - `context_per_day` integer, required
    - `definition_tokens` integer, required
    - `result_tokens_per_call` integer, required
    - `trend` ComponentTrend, required: The last 7 complete days against the 7 before.
      - `last_7d` integer, required
      - `previous_7d` integer, required
      - `change` number, nullable, required
    - `series` ComponentPoint[], required
      - `day` string, date, required
      - `tokens` integer, required
    - `reach` ComponentReach, required
      - `people` integer, required
      - `machines` integer, required
      - `sessions` integer, required
      - `used_share` number, required
    - `evidence` FleetFindingEvidence[], required
      - `kind` string, required
      - `detail` string, required
  - `truncated` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/stacktrace/apis/stacktrace-fleet-api.md) - [All operations](https://skmtc.dev/stacktrace/apis/stacktrace-fleet-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stacktrace/apis/stacktrace-fleet-api/revisions/0ee5484d1d0b?raw)
