aiCreditBalance
Requires at least one of the permissions billing:ai_credit:read, catalog:copilot:chat or products:product:update.
The org's remaining AI credit balance (USD), for the enrichment UI. Needs the AI credit read, products update or copilot chat permission.
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 AiCreditBalance {
aiCreditBalance {
balanceDollars
display
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query AiCreditBalance {\n aiCreditBalance {\n balanceDollars\n display\n }\n}"
}
EOF
Response:
{
"data": {
"aiCreditBalance": {
"balanceDollars": "string",
"display": "string"
}
}
}
aiCreditBalance: AiCreditBalanceInfo!
Type
AiCreditBalanceInfo object
The AI credit balance.