It just gives me this error
{'error': {'code': 404, 'message': 'models/gemini-1.5-flash is not found for API version v1beta, or is not supported for GenerateContent. Call ListModels to see the list of available models and their supported methods.', 'status': 'NOT_FOUND'}}```
Hey there and welcome!
From what I’ve seen, Gemini 1.5 Flash is not in models/ for some reason. remove that part of your code and you should be good.
models/
Welcome to the forums!
The model name you want is “gemini-1.5-flash-latest” when working with the AI Studio Gemini API.