Build your personal AI system step-by-step. DO NOT skip phases.
1. Go to https://openrouter.ai
2. Create account → API Keys → Create Key
export OPENROUTER_API_KEY="your-key"
curl https://openrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"openrouter/free","messages":[{"role":"user","content":"Hello AI"}]}'
✅ You should see AI output
pip3 install requests
import requests, os
r = requests.post(
"https://openrouter.ai/api/v1/chat/completions",
headers={"Authorization": f"Bearer {os.getenv('OPENROUTER_API_KEY')}"},
json={"model":"openrouter/free","messages":[{"role":"user","content":"Explain Python"}]}
)
print(r.json()["choices"][0]["message"]["content"])
Create bot via @BotFather
pip install python-telegram-bot
# bot.py
from telegram.ext import Updater, CommandHandler
import requests, os
def ask(update, context):
q = " ".join(context.args)
r = requests.post(
"https://openrouter.ai/api/v1/chat/completions",
headers={"Authorization": f"Bearer {os.getenv('OPENROUTER_API_KEY')}"},
json={"model":"openrouter/free","messages":[{"role":"user","content":q}]
})
update.message.reply_text(r.json()["choices"][0]["message"]["content"])
updater = Updater("YOUR_TOKEN")
updater.dispatcher.add_handler(CommandHandler("ask", ask))
updater.start_polling()
updater.idle()
Test: /ask what is AI
git clone https://github.com/openclaw/openclaw
cd openclaw
⚠️ This is your agent runtime (always-on brain)
Goal:
OpenClaw supports skill systems and task reuse [oai_citation:1‡openclawai.net](https://openclawai.net/openclaw-skills/summarize?utm_source=chatgpt.com)
OpenClaw can attach to browser sessions and automate tasks [oai_citation:2‡Youtube Summary](https://youtubesummary.com/summary/4jI4eXn0wIQ?utm_source=chatgpt.com)