---
title: "Get hourly cost rows for a single agent"
method: GET
path: "/billing/agents/{agent_id}/cost"
tags: ["Billing"]
---

# Get hourly cost rows for a single agent

`GET /billing/agents/{agent_id}/cost`

## Request

- Base URL: `https://api-docs.jackhamr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.jackhamr.ai/billing/agents/{agent_id}/cost`
- Auth: none declared

Return hourly cost rows for a single agent in the caller's org.

The agent must belong to the caller's org; otherwise a 404 is
returned (existence is not leaked across org boundaries). Delegates
to :func:`~app.services.billing._queries.get_costs_by_agent_detail`.

## Path parameters

- `agent_id` string, required

## Query parameters

- `period_start` string, date-time, nullable: Start of period (ISO 8601)
- `period_end` string, date-time, nullable: End of period (ISO 8601)

## Response `200`

Successful Response

- BillingHistoryItem[]
  - `date` string, date-time, required
  - `compute_cost` number
  - `ram_cost` number
  - `storage_cost` number
  - `llm_cost` number
  - `data_transfer_cost` number
  - `total_cost` number

## Other responses

- `422`: Validation Error

---

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