aiCreditWalletBalance
Requires permission billing:ai_credit:read.
The org's AI-credit wallet balance for the settings page.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query AiCreditWalletBalance {
aiCreditWalletBalance {
balanceCents
balanceDollars
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query AiCreditWalletBalance {\n aiCreditWalletBalance {\n balanceCents\n balanceDollars\n }\n}"
}
EOF
Response:
{
"data": {
"aiCreditWalletBalance": {
"balanceCents": 0,
"balanceDollars": "string"
}
}
}
aiCreditWalletBalance: AiCreditWalletBalance!
Type
AiCreditWalletBalance object
The organization's AI credit balance.