import requests # ✅ Replace this with your new OpenRouter API Key HF_AUTH_TOKEN = "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" # ✅ OpenRouter API Endpoint API_URL = "https://openrouter.ai/api/v1/chat/completions" # ✅ Headers with API Key headers = { "Authorization": f"Bearer {HF_AUTH_TOKEN}", "Content-Type": "application/json" } # ✅ Example API Request data = { "model": "cognitivecomputations/dolphin3.0-r1-mistral-24b:free", "messages": [{"role": "user", "content": "What is solar energy?"}] } # ✅ Make API Request response = requests.post(API_URL, headers=headers, json=data) # ✅ Print Response print(response.json()) # This should return the AI's response