Stability AI API 402 Insufficient Credits Error
Quick answer
A 402 means the account has run out of credits. Add credits in the platform account; retrying does not help.
Most likely fix: Add credits
How to fix it
Try these in order — the most common fix is first.
1. Add credits
- Sign in to the Stability AI platform
- Open your account billing page and buy credits (1 credit = $0.01)
- Retry the request
Did this fix it?2. Cut spending
- Use cheaper models (SD 3.5 Flash 2.5 credits, SDXL from 0.9) or Fast Upscaler (2 credits)
- Stop automatic retries on 402
Did this fix it?
Symptoms
API calls return HTTP 402 even though the key and request are valid.
Why it happens
- The 25 starter credits are used up (they are not a recurring free tier)
- Higher-cost operations such as Creative Upscale (60 credits) drain credits quickly
- Retry loops burning credits on failed jobs
This guide also covers
- stability ai api 402
- stability ai insufficient credits
- stability ai api credits
Still not working?
If Stable Diffusion keeps failing, you're not alone. See every Stable Diffusion problem users report or the alternatives people switch to.
We build software. Any software.
Paying for apps that don't quite fit? We build exactly what you need.
We're a small team of developers who build custom software fast. Not just tools like Stable Diffusion: web and mobile apps, games, desktop software, AI tools, internal tools: whatever you have in mind. We build and run our own products too: booking platforms, games, learning apps. See our work
- Web apps & SaaS
- Mobile apps (iOS & Android)
- Games
- Desktop software
- AI tools & automations
- Internal tools & dashboards
- Client portals & booking
- Your own version of any tool
- ✓ Free 15-min call to scope it
- ✓ Price agreed up front
- ✓ Your data, your code
The same problem in other apps
Other Stable Diffusion errors
- Stable Diffusion CUDA Out of Memory Error
- Stable Diffusion "Torch is not able to use GPU" Error
- Stable Diffusion Black Images and NaN Error
- Stable Diffusion Model Failed to Load, Exiting
- Stable Diffusion Very Slow on Mac (M1, M2, M3)
- Stable Diffusion Not Using AMD GPU (Slow, CPU Only)
- Stable Diffusion xformers Error After Update
- Stable Diffusion "Couldn't install torch" Error