ใช้งานอย่างไรช่วยแนะนำหน่อย
Hii @Aef_S_Tabtimtong ,
Welcome to the Forum!
To use Gemini API, follow these steps:
- Sign up at Google AI Studio
- Get your API key from Google Cloud Console
- Choose a model like gemini-pro (text) or gemini-pro-vision (for image input)
- Use the API with Python or JavaScript
Example in Python:
from google.generativeai import configure, GenerativeModel
configure(api_key=“YOUR_API_KEY”)
model = GenerativeModel(“gemini-pro”)
response = model.generate_content(“Suggest places to visit in Japan”)
print(response.text)
More docs: Gemini API | Google AI for Developers
Thanks!