CQTAI

Balance Query

Query your total account credit balance and the remaining quota of an individual APIKey, so your client can implement low-balance alerts and auto top-up. We recommend checking your balance before batch calls.

Account balance

curl https://api.cqtai.com/api/user/userInfo \
  -H "Authorization: Bearer sk-cqt-xxxx"

Response fields (inside data):

  • amount: the account's current remaining credits.
  • warnAmount: the low-balance alert threshold; prompt the user to top up when amount drops below it.
  • emailNoticeStatus: email balance-alert switch, 0 disabled, 1 enabled.
  • The remaining fields are account profile data: email, name, avatarUrl, type (user type).

Per-APIKey balance

If an individual APIKey has its own quota, you can query that key's remaining quota:

  • quota: the key's quota cap.
  • used: quota already consumed.
  • remaining: remaining available quota.

💡 Alert tip: trigger a notification when remaining drops below a threshold (e.g. 10% of the total quota) to avoid tasks failing due to insufficient balance.