AI Assistant Usage API endpoints
Endpoint reference for the AI Assistant Usage tag (1 endpoints): What the in-product AI assistant chat cost each user, for invoicing
What the in-product AI assistant chat cost each user, for invoicing. 1 endpoint, generated from the OpenAPI spec. Authentication, the response envelope, pagination and error codes are shared by all endpoints — see REST API overview. Parameters marked form go in an application/x-www-form-urlencoded request body.
GET /rest-api/ai-chat/usage.do
Get AI assistant usage for a month.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
month | query | string | no | Calendar month (UTC) in YYYY-MM form; the current month when omitted |
Responses: 200 — {success, month, rows:[{userId, username, keySource, calls, inputTokens, outputTokens, cacheReadTokens, cacheWriteTokens, rawCostUsd, billedCostUsd, promoWaivedUsd, limitUsd}], totalRawUsd, totalBilledUsd, totalPromoWaivedUsd, multiplier, promoUntil, promoAllowanceUsd}. Errors follow the shared conventions.
Related
- REST API overview — authentication and conventions
- API endpoint reference by tag