feat: Enhanced CE schema and Notion sync (Pains/Gains)
This commit is contained in:
25
scripts/test_prod_key.py
Normal file
25
scripts/test_prod_key.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import os
|
||||
import requests
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv(dotenv_path="/home/node/clawd/.env")
|
||||
|
||||
def test_prod_key():
|
||||
key = os.getenv("GEMINI_API_KEY_PROD")
|
||||
if not key:
|
||||
print("❌ GEMINI_API_KEY_PROD not found in .env")
|
||||
return
|
||||
|
||||
print(f"🔑 Testing Key: {key[:5]}...{key[-3:]}")
|
||||
|
||||
url = f"https://generativelanguage.googleapis.com/v1beta/models?key={key}"
|
||||
resp = requests.get(url)
|
||||
|
||||
if resp.status_code == 200:
|
||||
print("✅ API Call Successful! Key is active.")
|
||||
# print(f"Available Models: {[m['name'] for m in resp.json().get('models', [])][:3]}")
|
||||
else:
|
||||
print(f"❌ API Error: {resp.status_code} - {resp.text}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_prod_key()
|
||||
Reference in New Issue
Block a user