I keep getting an error `You exceeded your current quota, please check your plan and billing details.` even though my account has sufficient credits

Maybe you just hit the rate limit for your account?
Take a look at this page which may answer your question:

https://platform.openai.com/docs/guides/rate-limits?context=tier-free

Edit: this thread also deals with the same issue:

1 Like