File size: 438 Bytes
0e99494
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os
from dotenv import load_dotenv
from google import genai

load_dotenv()

client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))

print("Fetching available models...")
try:
    # List all models and just print their names
    # (The SDK returns an iterator, so we loop through it)
    for m in client.models.list():
        print(f"found: {m.name}")
        
except Exception as e:
    print(f"❌ Error: {e}")