import google.generativeai as genai genai.configure(api_key='AIzaSyAW_h8itGLwNhYTfx1EDLthhcHHlcIfs7w') model = genai.GenerativeModel('gemini-pro') response = model.generate_content("Write a story about a magic backpack.") print(response.text)