Google Gemini APIRunbook 0/2 done
DEADLINE_EXCEEDED
Google Gemini API Error DEADLINE_EXCEEDED: Deadline exceeded (504)
Warning↻ Retryable · exponential backoffHTTP 504 Gateway TimeoutAI Provider
TL;DR · 10-second read
The model did not finish within the deadline, usually on very large prompts or long outputs. Stream the response, raise the client timeout, or split the work.
Identify: does your log match?
What you see · exact log / response
{"error":{"code":504,"message":"Deadline expired before operation could complete.","status":"DEADLINE_EXCEEDED"}}Fix
Being written
Copy-paste fixes for DEADLINE_EXCEEDED are in the enrichment queue
The summary above is verified. Paste your full trace into the decoder for a diagnosis now.
Open the decoder →Related errors
Last verified 2026-10-22 · Source: Gemini API troubleshooting guide + google.rpc status codes · Official docs ↗ · ~2,400 searches/mo