Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 381 Bytes

Gemini.md

File metadata and controls

25 lines (16 loc) · 381 Bytes

Gemini API

install the SDK

pip install -q -U google-generativeai

initialize the generative model

import google.generativeai as genai


genai.configure(api_key = "your gemini api key")
model = genai.GenerativeModel('gemini-pro')

generate text

response = model.generate_content("write a story about ai")
print(response.text)