This Python bot brings configurable ChatGPT, Claude, vision, voice, and image modes into Telegram using your own API keys and YAML-driven models.
Overview
The ChatGPT Telegram Bot recreates a chatbot experience inside Telegram instead of a browser tab. Replies aim for low latency with optional streaming, and usage bills directly through your OpenAI or OpenRouter keys without an intermediary quota.
Features include vision on uploaded images, Whisper transcription for voice notes, gpt-image-1 image generation in a dedicated mode, fifteen preset chat personas, group chat support, syntax-highlighted code blocks, optional user allowlists, and a /balance command for API spend.
Models and pricing live in config/models.yml; chat personas live in config/chatmodes.yml. OpenAI models use the native API while Claude and GPT-5.5 examples route through OpenRouter when configured. The stack lists python-telegram-bot 20.x, OpenAI Python 1.x, MongoDB, Docker, and Python 3.12.
A quick start collects OpenAI and optional OpenRouter keys, a BotFather token, renamed config files, and a run command to message the bot on Telegram.
Key features
- Streaming Telegram replies
- YAML-driven model catalog
- Fifteen configurable chat modes
- Vision, voice, and image generation
- Group chat support
- Access control allowlists
- API spend tracking command
- Code block formatting in messages
Use cases
- Personal ChatGPT access inside Telegram
- Team bots with restricted Telegram users
- Switching personas without code changes
- Mobile-friendly multimodal model chat