I ran into the same issue with Gemini models—first request works fine, but the second fails. Seems like v1beta is a bit unstable.
I also got a 404 Not Found error when trying to use text-bison-001 with v1beta. Looks like some models aren’t supported for generateContent. You might want to call ListModels to check what’s actually available.
A few things to try: Check API Credentials – Make sure they’re valid in n8n. Try a Different Model – Some versions seem more reliable than others.
Switching models and switching back worked for me as a quick fix. Let me know if you figure out a better solution!