---
title: "Top-N agents by model-router spend"
method: GET
path: "/v1/analytics/model-router/cost/by-agent"
tags: ["analytics"]
---

# Top-N agents by model-router spend

`GET /v1/analytics/model-router/cost/by-agent`

## Query parameters

- `provider` string, nullable
- `served_model` string, nullable
- `operation` string, nullable
- `limit` integer
- `start_date` string, date, required
- `end_date` string, date, required

## Response `200`

Successful Response

- CostByAgentRow[]
  - `agent_id` string, required
  - `total_cost_usd` number, required
  - `input_cost_usd` number, required
  - `output_cost_usd` number, required
  - `cache_cost_usd` number, required
  - `invocations` integer, required
  - `successful` integer, required
  - `failed` integer, required
  - `success_rate` number, required
  - `avg_latency_ms` number, required

## Other responses

- `400` — Bad request
- `401` — Authentication required
- `422` — Validation Error

---

[API](https://skmtc.net/oneloop-hq/apis/feather-api.md) · [All operations](https://skmtc.net/oneloop-hq/apis/feather-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneloop-hq/feather-api/revisions/5a5597ebb2d6/schema)
