Get AI Summary (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/ai/summary
Description
Get AI usage summary including total usages, costs, and payment information.
Authentication
Required: Workspace authentication. User must be authenticated as Workspace Owner or Staff with workspace permissions.
Headers
Authorization: Bearer <workspace_token>
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
Response 200 OK
{
"totalUsages": 250,
"totalCost": 45.50,
"totalPaid": 40.00,
"outstandingBalance": 5.50,
"byToolType": {
"product-marketing-post": 150,
"image-generation": 80,
"session-summary": 15,
"other": 5
},
"byStatus": {
"completed": 240,
"pending": 5,
"failed": 5
}
}
Response Fields
totalUsages(number): Total number of AI tool usagestotalCost(number): Total cost of all AI operationstotalPaid(number): Total amount paid for AIoutstandingBalance(number): Outstanding balance (totalCost - totalPaid)byToolType(object): Usage count grouped by tool typebyStatus(object): Usage count grouped by status (completed,pending,failed)
Common Errors
401 Unauthorized: Missing or invalid authentication token
404 Not Found: Workspace not found
500 Internal Server Error: Server error occurred while processing the request