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

# Get organization groups AI spend

`GET /api/v2/organizations/{organization}/groups/ai/spend`

Returns AI spend limits and aggregate spend for the requested groups.
A maximum of 100 group IDs may be requested per call, and requests with more are rejected, so callers are expected to batch across multiple requests.
Unknown or unreadable group IDs are silently omitted.

## Path parameters

- `organization` string, uuid, required

## Query parameters

- `group_ids` string, required

## Response `200`

OK

- CodersdkOrganizationGroupsAISpend
  - `groups` CodersdkOrganizationGroupAISpend[]
    - `current_spend_micros` integer — CurrentSpendMicros is the group's spend over the current budget period.
    - `group_id` string, uuid
    - `spend_limit_micros` integer — SpendLimitMicros is the group's configured AI spend budget per member. Null when the group has no configured budget.
    - `total_spend_limit_micros` integer — TotalSpendLimitMicros is the currently configured combined budget of the members attributed to this group, with each member's override replacing their share. Null when the group has no budget, and zero when no members are attributed to it.
  - `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.

---

[API](https://skmtc.dev/coder/apis/coder-api.md) · [All operations](https://skmtc.dev/coder/apis/coder-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/coder/coder-api/revisions/369ae60ab00e/schema)
