---
title: "Get user AI spend"
method: GET
path: "/api/v2/users/{user}/ai/spend"
tags: ["Enterprise"]
---

# Get user AI spend

`GET /api/v2/users/{user}/ai/spend`

## Path parameters

- `user` string, required

## Response `200`

OK

- CodersdkUserAISpendStatus
  - `current_spend_micros` integer — CurrentSpendMicros is the user's spend on their effective group over the current budget period.
  - `effective_budget` CodersdkAIBudgetLimit
    - `limit_source` 'user_override' | 'group'
    - `spend_limit_micros` integer
  - `effective_group_id` string, uuid — EffectiveGroupID is the group the spend is attributed to, falling back to the Everyone group when no budget applies. Null only when the user has no organization membership.
  - `period_end` string, date-time — PeriodEnd is the exclusive upper bound of the current budget period.
  - `period_start` string, date-time — PeriodStart is the inclusive lower bound of the current budget period.
  - `user_id` string, uuid

---

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