Google Gemini APIRunbook 0/2 done
SAFETY
Google Gemini API Error SAFETY: Response blocked: finishReason SAFETY
Info✕ Not retryable · fix the payloadAI Provider
TL;DR · 10-second read
HTTP 200, but the candidate has no text because a safety filter stopped it. Check finishReason before reading the text, and adjust the prompt or safety settings for legitimate use cases.
Identify: does your log match?
What you see · exact log / response
"candidates": [{ "finishReason": "SAFETY", "safetyRatings": [{ "category": "HARM_CATEGORY_DANGEROUS_CONTENT", "probability": "MEDIUM", "blocked": true }] }]Fix
Being written
Copy-paste fixes for SAFETY 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 ↗ · ~4,400 searches/mo