Get general information about the usage of AI credits in the organization.
Use Case Template
Title: AI Credits Usage Stats
Before You Begin
- GraphQL Playground:
🔗 All examples should be run in the GraphQL Playground.
➡️ New to GraphQL? Review the Playground Basics Guide. - Authentication:
🛠️ Use Service Account tokens (Personal Access Tokens are deprecated).
Prerequisites
Super Admin
role on theOrganization
.Organization UUID
.
Step 1. Find the Organization UUID
Find the organization UUID.
You can retrieve it using this query:
{
organization(id: "<ORGANIZATION_ID>") {
uuid
}
}
The organization ID can be found on the home page url: https://app.pipefy.com/organizations/<ORGANIZATION_ID>
Step 2. Execute the query
query aiCreditUsageStats($organizationUuid: ID!, $period: PeriodFilter!) {
aiCreditUsageStats(organizationUuid: $organizationUuid, period: $period) {
active
usage
limit
filterDate {
from
to
__typename
}
updatedAt
aiAutomation {
usage
__typename
}
assistants {
usage
}
__typename
}
}
Input Explanation:
- period: The period you want to query for, options are
current_month
,last_month
andlast_3_months
.
Sample Response:
{
"data": {
"aiCreditUsageStats": {
"active": true,
"usage": 12,
"limit": 0,
"filterDate": {
"from": "2025-09-01T00:00:00Z",
"to": "2025-09-12T13:50:43Z",
"__typename": "FilterDate"
},
"updatedAt": "2025-09-12T13:50:43Z",
"aiAutomation": {
"usage": 2,
"__typename": "AiResource"
},
"assistants": {
"usage": 10
},
"__typename": "UsageStatsAiCreditDetails"
}
}
}
The response includes if AI is active for the organization, the total usage and limits for the organization, the dates this data applies to and the breakdown by agents (aiAutomations) and assistants.