Modulify

Read the AI credit balance

get_workspace_credits

Reads the reconciled AI credit balance of a workspace, the figure to trust right after a renewal or a top up.

AI credits are what site generation spends. get_workspace also carries a balance, but that one is the stored figure and can be stale right after a renewal or a top up, so use this tool when the number has to be right.

Before answering, it applies any monthly reset or allowance change that is due. The answer is the buckets in AiCredits, so the balance is SubscriptionLimit minus SubscriptionUsage plus TopUpCredits, and SubscriptionResetAt is the date of the next monthly reset, null on the Free plan. See Credits.

Inputs

Input Type Required Description
workspaceId string Yes The workspace id.