---
title: "Get Usage Summary"
method: GET
path: "/v1/analytics/usage/summary"
tags: ["Analytics", "Analytics - Usage"]
---

# Get Usage Summary

`GET /v1/analytics/usage/summary`

Get usage summary for billing.

Aggregates the organization's usage_records — the SAME billing source of
truth that feeds daily_burn_rate and monthly invoicing (TG-3003: this was
a stub returning ``usage=[]``/``total_cost=0.0``, so Studio's costs view
showed $0 while the burn meter recorded millions of credits/day).

Returns per-operation credit totals for the window with USD derived at the
canonical $0.001/credit rate (CREDIT_RATE_USD):
- ``usage``: one row per operation_type — ``{operation_type, credits,
  cost_usd}`` — biggest spend first. Refund records are negative and net
  automatically (SP-187).
- ``total_credits`` / ``total_cost``: window totals across operations.

Scoped to the ORGANIZATION (matching the billing meter). Records are only
partially namespace-attributed (async engine work carries no namespace),
so filtering by namespace would silently under-report; ``namespace_id`` is
echoed for request context only.

**Time Range:**
- If both `start_date` and `end_date` are provided, uses that range
- If neither provided, defaults to last 30 days
- If only one provided, defaults to now as the other bound

**Example:**
```bash
GET /v1/analytics/usage/summary
GET /v1/analytics/usage/summary?start_date=2025-01-01T00:00:00Z&end_date=2025-01-31T23:59:59Z
```

## Query parameters

- `start_date` string, date-time, nullable — Start date (UTC)
- `end_date` string, date-time, nullable — End date (UTC)

## Response `200`

Successful Response

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/mixpeek/apis/mixpeek-api.md) · [All operations](https://skmtc.net/mixpeek/apis/mixpeek-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mixpeek/mixpeek-api/versions/04b379bdbb7c/schema)
