[Bug] HTTP 401 Unauthorized with gemini-2.5-flash-image-preview inside Canvas (Antigravity) Sandbox

Hi everyone,

I’m currently developing a React-based workflow directly inside the Gemini Canvas sandbox (Antigravity platform).

Previously, I was able to successfully call the models/gemini-2.5-flash-image-preview:generateContent endpoint using the environment’s natively injected credentials to generate and edit images. It was working flawlessly.

However, the endpoint has recently completely stopped working in the Canvas environment. Whenever I trigger image generation now, I consistently hit the following error:

  • HTTP 401 (Unauthorized)

My Questions for the Team:

  1. Has the gemini-2.5-flash-image-preview model been disabled, restricted, or fully revoked for the Canvas (Antigravity) environment?
  2. Is there an issue with the sandbox’s shared token pool losing authorization for this specific image model?
  3. If it is restricted, is there a recommended alternative model currently available inside Canvas for image generation?

This authorization issue is currently a hard blocker for our UI workflow.

Any insights, confirmations, or fixes from the Google team would be hugely appreciated! Thank you!