On a Perplexity unauthorized error, check your remaining credits before rotating the key. Put a credit-balance check in your onboarding runbook so new integrations validate both key and balance. Set up low-credit alerts so a drained account does not page you as a mysterious auth failure at 2am.

Context: A Perplexity CLI documents a billing gotcha that masquerades as an auth bug. The unauthorized error can occur not only with an invalid API key but also when the Perplexity account has zero credits remaining. Debugging the key in that case never fixes it; the fix is checking the account balance.