---
title: "Get Costs Top Tasks"
method: GET
path: "/costs/top-tasks"
---

# Get Costs Top Tasks

`GET /costs/top-tasks`

## Request

- Base URL: `http://127.0.0.1:8052`
- URL: `http://127.0.0.1:8052/costs/top-tasks`
- Auth: none declared

Top *limit* most-expensive tasks within the trailing *hours* window.

Web GUI Costs.tsx renders this as the "Top 10 tasks" card. Each item:
``{id, title, agent, cost_usd}``. Empty list when no usage data is
present so the card can show its empty-state cleanly.

## Query parameters

- `limit` integer
- `hours` integer

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/bernstein/apis/bernstein-task-server.md) · [All operations](https://skmtc.dev/bernstein/apis/bernstein-task-server/llms.txt) · [OpenAPI document](https://skmtc.dev/bernstein/apis/bernstein-task-server/revisions/2a20a34ad2eb?raw)
