LifeAstroAPILifeAstroAPI

← Troubleshooting

How to fix insufficient_credits (HTTP 402)

A pay-as-you-go or paid account has no credits left.

What the API returns

{
  "error": {
    "code": "insufficient_credits",
    "message": "your credit balance is zero — top up to continue",
    "request_id": "770372810e5f2a70"
  }
}

Why it happens

  • The plan quota and any wallet balance are spent; auto-recharge is off.

How to fix it

  1. Dashboard → Billing → top up the wallet, or turn on auto-recharge so this never blocks production.
  2. Alert on X-Credits-Remaining in your logs well before it reaches zero.

Should your code retry?

Not automatically. Retrying will return the same error until credits are available; surface it to whoever manages the account.

See all codes on the troubleshooting index and the error envelope on Errors. Still stuck? Email [email protected] with the request_id.