Create a 100% Free AI Chatbot for Telegram using Python.

Опубликовано: 24 Май 2026
на канале: Leandro Hirt | Academify
895
41

OpenRouter website: https://openrouter.ai/
OpenRouter documentation: https://openrouter.ai/docs/quickstart

Commands used: pip install python-dotenv and also pip install pyTelegramBotAPI

Chapters:
00:00 Introduction: Chatbot with Python and LLM
00:20 Creating the Bot on Telegram (BotFather)
01:02 Obtaining the API Token
01:31 Installing Python libraries
01:44 Setting environment variables (.env)
02:43 Initializing the Bot and execution loop (Polling)
03:02 Creating the welcome command (/start)
03:57 Editing commands in BotFather
04:36 Creating a function to respond to all messages
05:38 Integration with OpenRouter (Free AI)
06:05 Generating the API key OpenRouter
07:01 Implementing the AI ​​API call in the code
07:45 Selecting free models (e.g., Llama, DeepSeek)
08:21 Processing the AI ​​response and sending it to Telegram
09:19 Final Chatbot test
09:53 How to change the Artificial Intelligence model

🚀 Complete Python Course
👉 https://academify.com.br/python-completo

(link also pinned to the channel 👆)

📌 Did you like the video?

Leave a like 👍, subscribe to the channel 🔔 and share with those who are learning Python!

📲 Follow me on social media:
TikTok:   / leandrohirt.oficial  
Instagram:   / leandrohirt.oficial  

#python #programming #learnpython #pythonbrasil #dev