Why do Gemini Canvas API calls function with gemini-2.5-flash-preview-05-20 but not the documented 09-2025 model?

Summary: We are developing an application by coding and previewing a single-page web app directly within the Gemini web app’s Canvas feature. During this process, we have identified a critical discrepancy. The officially documented Gemini preview model (gemini-2.5-flash-preview-09-2025) fails with a 403 Forbidden error, while an older, undocumented version (gemini-2.5-flash-preview-05-20) works successfully. This inconsistency is causing confusion and development roadblocks.

The Core Issue: Our investigation has revealed a direct conflict between the public documentation and the behavior of the Canvas development environment:

  1. The Official Documentation: The Google AI for Developers site specifies gemini-2.5-flash-preview-09-2025 as the correct model for API calls. You can find the reference here: https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview

  2. The Canvas Environment: In practice, using the officially documented 09-2025 model results in a 403 Forbidden error. However, API calls succeed when we use the older gemini-2.5-flash-preview-05-20 model.

Our Question: Could you please clarify this discrepancy? Is the requirement to use the older 05-20 model in the Canvas environment intentional? If so, we recommend updating the developer resources to reflect this, to avoid confusion for others. Any information on when the Canvas will support the officially documented 09-2025 model would also be greatly appreciated.

Hi @paulvancotthem,

Welcome to the Forum,

Please verify if you are using the correct API key and if the Google Cloud Project associated with the API key is configured to use the “Google Generative Language API”.

Thank you!

I mentioned that this is within the Gemini web app Canvas environment. So there is no user-specific API-key required in that case, as it is inherent in that platform