---
title: "Get Tenant Hourly Costs Route"
method: GET
path: "/api/v1/billing/tenants/{tenant_id}/costs/hourly"
tags: ["billing"]
---

# Get Tenant Hourly Costs Route

`GET /api/v1/billing/tenants/{tenant_id}/costs/hourly`

## Request

- Base URL: `https://api.aws.cognee.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.aws.cognee.ai/api/v1/billing/tenants/{tenant_id}/costs/hourly`
- Auth: API key in header `X-Api-Key`

Hourly LLM cost (USD) for a tenant over a window (default: last 7 days).

Sourced live from Prometheus (LiteLLM's `litellm_spend_metric_total`).
Note: Prometheus retention currently bounds how far back data actually
exists (~3h today) — older hours come back absent until retention is
raised or an hourly persistence job backfills them.

## Path parameters

- `tenant_id` string, uuid, required

## Query parameters

- `start` string, date-time, nullable: UTC window start; defaults to 7 days before end.
- `end` string, date-time, nullable: UTC window end; defaults to now.

## Response `200`

Successful Response

- TenantHourlyCostsResponse
  - `tenantId` string, uuid, required
  - `start` string, date-time, required
  - `end` string, date-time, required
  - `currency` string
  - `points` HourlyCostPoint[], required
    - `hour` string, date-time, required
    - `spendUsd` number, required

## Other responses

- `422`: Validation Error

---

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