---
title: "Credits, spend, what in-flight runs hold, and the last 30 days"
method: GET
path: "/v1/usage"
tags: ["accounts"]
---

# Credits, spend, what in-flight runs hold, and the last 30 days

`GET /v1/usage`

## Request

- Base URL: `https://api.hookdetector.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.hookdetector.com/v1/usage`
- Auth: none declared

credits (the balance now), spent_total (charged by finished runs), reserved_now
(held by runs still in flight), runs_total, last_30_days (one entry per UTC day,
oldest first) and recent (the 20 newest runs). credits + spent_total + reserved_now is
everything the account was given. Needs read. Free. MCP: usage.

## Headers

- `authorization` string, nullable: Bearer hd_... from POST /v1/accounts or POST /v1/keys

## Response `200`

Successful Response

- UsageOut
  - `credits` integer, required
  - `spent_total` integer, required
  - `reserved_now` integer, required
  - `runs_total` integer, required
  - `last_30_days` UsageDay[], required
    - `date` string, required
    - `runs` integer, required
    - `charged` integer, required
  - `recent` UsageRun[], required
    - `run_id` string, required
    - `kind` string: short, long or packaging: which kind of research the run was
    - `topic` string, required
    - `status` string, required
    - `reserved` integer, required
    - `charged` integer, required
    - `created_at` string, required
    - `finished_at` string, nullable, required

## Other responses

- `401`: missing, invalid, revoked or expired API key (code key_expired)
- `403`: the key lacks the scope this call needs (insufficient_scope), or its credit_limit is spent (key_credit_limit_reached)
- `413`: request body over the size cap
- `422`: invalid input
- `500`: our fault; names the request id

---

[API](https://skmtc.dev/hookdetector/apis/hook-detector.md) · [All operations](https://skmtc.dev/hookdetector/apis/hook-detector/llms.txt) · [OpenAPI document](https://skmtc.dev/hookdetector/apis/hook-detector/revisions/b136a2804d2b?raw)
