Gemini-nano-banana-2.1 input limit: the model card says 1M, but generateContent rejects anything above 65,536

Hi,

We’re integrating Gemini Nano Banana 2.1 (gemini-nano-banana-2.1) and the published input limits don’t match what the API enforces.

Three sources disagree:

countTokens does not enforce that cap. It accepted prompts of about 139,197 tokens and about 1,048,054 tokens. generateContent does enforce it. A request of about 139,197 input tokens failed with:

400 The input token count exceeds the maximum number of tokens allowed (65536).

So generation is capped at 65,536, not 131,072, and not 1M. The same models.get call also reports gemini-3-pro-image at 131,072 and gemini-3.1-flash-image at 65,536.

Could you confirm which input limit is the supported one for gemini-nano-banana-2.1, and whether the 1M model-card figure is a documentation error? We need the generation cap, since countTokens will accept a prompt that generateContent then rejects.

Thanks

Hello @tornjv_preview ,

Thank you for the detailed report and for comparing all three sources. We are looking into this issue.