---
title: "Get Ai Spend Usage"
method: GET
path: "/api/v1/billing/usage/ai-spend"
tags: ["billing"]
---

# Get Ai Spend Usage

`GET /api/v1/billing/usage/ai-spend`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/v1/billing/usage/ai-spend`
- Auth: none declared

Get the company's month-to-date AI dollar spend vs its cost ceiling.

TECH-987.3: backs the free-tier AI spend ($/ceiling) meter. Reads the
per-company ceiling spend from ``AICostCeilingService`` (the same source the
enforcement path uses). ``ceiling`` is null for uncapped (paid) plans.

Returns:
    StandardResponse with data containing:
    - spend: month-to-date AI spend in USD
    - ceiling: monthly ceiling in USD (null = uncapped)
    - is_unlimited: True when there is no ceiling (paid plans)
    - percentage_used: 0-100 (0 when uncapped)
    - enforced: whether the ceiling currently blocks (rollout flag)

## Headers

- `Authorization` string

## Response `200`

Successful Response

- StandardResponse: Standard API response wrapper.
  - `success` boolean, required
  - `data` unknown
  - `message` string, nullable
  - `error` string, nullable
  - `meta` object, nullable

## Other responses

- `422`: Validation Error

---

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