We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/robgrappler/twitter-voice-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
list_gemini_models.py•465 B
import os
import google.generativeai as genai
from dotenv import load_dotenv
load_dotenv()
api_key = os.getenv("GEMINI_API_KEY")
if not api_key:
print("No GEMINI_API_KEY found.")
else:
genai.configure(api_key=api_key)
try:
print("Listing models...")
for m in genai.list_models():
if 'generateContent' in m.supported_generation_methods:
print(m.name)
except Exception as e:
print(f"Error: {e}")