Hello!
Since yesterday I’ve been facing the 504 - Deadline error when trying to call the Gemini API (model 3-preview).
At the moment I’m on the 3-month trial.
Sometimes the API response is fast and normal, but other times it takes several minutes. The delay varies: sometimes 2 minutes, sometimes 10 minutes, then the response speed goes back to normal, and later it slows down again.
Yesterday I created a new API key and it improved, but today the problem returned even with this new key.
Is anyone else experiencing the same issue?
This is a known behavior with the Gemini 3-preview models during high-load periods. The 504 error means the backend didn’t finish within the client’s allocated time.
You can explicitly set the timeout parameter in your API call to 600 seconds.. It is because you are likely hitting peak usage windows where the model’s ‘reasoning’ phase exceeds the default 60s SDK timeout. A new API key doesn’t reset server capacity, so the problem will eventually return until the timeout is increased on your end