# Image generation fails with `Invalid key size (0) for AES.`

> Source: <https://kagifeedback.org/d/10455-image-generation-fails-with-invalid-key-size-0-for-aes/4>
> Published: 2026-10-05 17:56:42+00:00

I haven't seen this error for a while, but, it's intermittent.

In the past I found that image generation was frequently failing during nighttime (in the US) specifically.

My suspicion is that they set a daily quota for image gen costs, which often gets blown through in less than a day.

Also, it seems that handling AI provider errors in a sensible way has been a sore spot in general.
