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.
More from coding & agent
- React Grab boosts agent coding 2x by mapping UI to source — aidenybai · 2026-08-19
- Agent skill anti-slop flags 202 errors in a single repo test — soumitrashukla9 · 2026-08-19
- React Grab adds support for Three.js and React Three Fiber — aidenybai · 2026-08-19
- High-quality foundational libraries are the overlooked key to long-term engineering success — wavefnx · 2026-08-19
- Proposal: SKILL.md format needs #ifdefs for harness — mertdumenci · 2026-08-19
- OpenAI Codex CLI v0.148.0: Export Chats, Bedrock Integration, and Async Hooks — github-actions[bot] · 2026-08-19