Gemini Image Generation Silently Fails From Hetzner IPs — Network Origin Was the Culprit

dota2dinall · reddit · 2026-08-19

While building ThumbAPI, a REST API for auto-generating thumbnails via Gemini's image API, a developer hit a production-only bug: identical code and API key worked locally but returned finishReason: IMAGEOTHER from the server.

He systematically ruled out prompt/celebrity safety filters, faces in reference images, and even removed references entirely — no change. The remaining variable was network origin: residential IP worked, Hetzner IPv4/IPv6 both failed, and proxying through a Google Cloud Function fixed it instantly.

Likely an undocumented datacenter-IP reputation or abuse-prevention policy. Lesson: when debugging AI APIs, treat the outbound IP as a variable, not just prompt, model, and inputs.

Original post →

More from coding & agent

coding & agent channel →