---
title: "Get pooled AI usage"
method: GET
path: "/api/public/billing-accounts/{billingAccountId}/ai-usage"
tags: ["Billing accounts"]
---

# Get pooled AI usage

`GET /api/public/billing-accounts/{billingAccountId}/ai-usage`

## Request

- Base URL: `https://charts.basedash.com`
- URL: `https://charts.basedash.com/api/public/billing-accounts/{billingAccountId}/ai-usage`
- Auth: HTTP bearer

Gets pooled billable AI usage for the billing account's current billing period, broken down by attached organization. Requires admin access to the account's owner organization.

## Path parameters

- `billingAccountId` string, required: Billing account ID

## Response `200`

AI usage retrieved successfully

- PublicBillingAccountAiUsageResponse
  - `totalUsage` number, required: Total billable AI usage pooled across all attached organizations for the billing period, in USD dollars
  - `includedCredits` number, required: Included AI usage credits for the account in USD dollars
  - `billingPeriodStart` string, date-time, required: Billing period start timestamp
  - `billingPeriodEnd` string, date-time, required: Billing period end timestamp
  - `organizationUsage` PublicBillingAccountOrganizationUsage[], required: Billable AI usage grouped by attached organization
    - `organizationId` string, required: Organization ID
    - `name` string, required: Name of the organization
    - `slug` string, required: URL-friendly slug
    - `usage` number, required: Billable AI usage for this organization in USD dollars

## Other responses

- `401`: Unauthorized - Missing or invalid API key
- `404`: Not found - Billing account not found, no admin access, or billing period unavailable
- `429`: Rate limit exceeded - Too many requests
- `500`: Internal server error

---

[API](https://skmtc.dev/basedash/apis/basedash-public-api.md) - [All operations](https://skmtc.dev/basedash/apis/basedash-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/basedash/apis/basedash-public-api/revisions/efb9d40bc6f7?raw)
