---
title: "GET /reports/costs"
method: GET
path: "/reports/costs"
---

# GET /reports/costs

`GET /reports/costs`

## Request

- Base URL: `https://api.caveman.so/api/v1`
- URL: `https://api.caveman.so/api/v1/reports/costs`
- Auth: one of:
  - OAuth 2
    - Authorization code: `/api/v1/oauth/authorize`
    - Token URL: `/api/v1/oauth/token` scopes: `billing:read`
  - HTTP bearer
  - API key in cookie `cave_access`
  - API key in cookie `__Secure-cave_identity.session_token`

GET /api/v1/reports/costs on the Caveman Cloud control plane. Requires the billing:read scope. Exposed to autonomous agents as the costs action of the caveman_reports tool (read access). Spend, usage, compression, routing, cache, models, traffic shape and verified-savings rollups for the bound project over a time window.

## Query parameters

- `from` string, date-time
- `sample_data` boolean
- `to` string, date-time
- `window` string

## Response `200`

Window-scoped report with separate observed cache and inferred baseline-routing comparisons.

- object
  - `automatic_savings` AutomaticSavings, required: Separate live-traffic comparisons. Cache benefit includes native provider caching; routing reprices completed usage at the configured baseline. Never sum these comparisons together or add verified savings. Neither enters receipts or billing. Missing historical evidence is not backfilled or extrapolated.
    - `cache_observed_usd` number, required: Signed USD at catalog list prices. Negative values are costs, not zero savings.
    - `cache_requests` integer, required
    - `cache_basis` 'observed_provider_cache', required
    - `router_inferred_usd` number, required: Signed USD at catalog list prices. Negative values are costs, not zero savings.
    - `router_baseline_usd` number, required: Signed USD at catalog list prices. Negative values are costs, not zero savings.
    - `router_actual_usd` number, required: Signed USD at catalog list prices. Negative values are costs, not zero savings.
    - `router_requests` integer, required
    - `router_basis` 'inferred_same_usage_baseline', required
    - `baseline_models` string[], required
  - `verified_savings` number, required: Existing signed provider-backed ledger total. Never includes inferred router or unattributed cache benefit.

## Other responses

- `2XX`: Successful response. Exact status depends on synchronous or durable delivery outcome.
- `4XX`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.
- `5XX`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.

---

[API](https://skmtc.dev/caveman/apis/caveman-cloud-api.md) - [All operations](https://skmtc.dev/caveman/apis/caveman-cloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/caveman/apis/caveman-cloud-api/revisions/508312d01cfc?raw)
