Test the API.
Generate three images, inspect the responses, and watch caching work.
How it behaves
- Cache hits are instant and free — generate the same prompt twice to see
X-Cache: HIT. - Cache misses call Gemini and take ~2–10s.
- GEN_TOKEN— if the server requires it and you don't supply it above, new generations return
401. - Moderation — blocked prompts return
400before any Gemini call.