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
- Everything crashes, but Omarchy sends crash reports to Claude in 1 click — indragie · 2026-10-16
- Six-month prediction: hiring for generic agent harnesses built from scratch will cool — yi111 · 2026-10-16
- Omarchy ISO wouldn't boot on NVIDIA, so he had Claude patch it — indragie · 2026-10-16
- Dev uses Grok to clean up 3D printer firmware, catches it sneaking in nonsense code — yacineMTB · 2026-10-16
- A rude AI agent took 89% of a shared resource in 102-run multi-agent personality experiment — Brave-History-6502 · 2026-10-16
- Guardrails can make risky delegation work — but it takes a full-time team, says iandanforth — iandanforth · 2026-10-16