๐Ÿค– ChatGPT Telegram Bot

June 14, 2026 ยท View on GitHub

๐Ÿค– ChatGPT Telegram Bot

ChatGPT, re-created as a Telegram bot โ€” and it works great.

GPT-5.5 ยท Anthropic Claude (Opus / Sonnet / Haiku) ยท Vision ยท Voice ยท Image generation
Fast replies, no daily limits, message streaming and 15 special chat modes.


Web chatbots are great โ€” but they're often laggy, rate-limited, and locked behind a browser tab. This project puts the best models from OpenAI and Anthropic right inside Telegram, with your own API keys and no daily limits.

๐Ÿš€ Try the live bot: @jadvebot ยท ๐ŸŒ Web: jadve.com โ€” or deploy your own in two commands (Quick start โ†“).

โœจ Features

  • โšก Low latency โ€” replies usually take 3โ€“5 seconds.
  • ๐Ÿ” No request limits โ€” you pay your API provider directly, nothing in between.
  • ๐Ÿ“ Message streaming โ€” answers stream into Telegram word-by-word.
  • ๐Ÿง  Frontier models โ€” GPT-5.5 and Anthropic Claude (Opus 4.8 / Sonnet / Haiku) via OpenRouter, plus fast & cheap defaults out of the box.
  • ๐Ÿ‘๏ธ Vision โ€” send an image and any vision-capable model (GPT-5.5, Claude, โ€ฆ) will read it.
  • ๐ŸŽจ Image generation โ€” create images with OpenAI gpt-image-1 (switch to ๐Ÿ‘ฉโ€๐ŸŽจ Artist mode).
  • ๐ŸŽค Voice messages โ€” record a voice note and Whisper transcribes it for you.
  • ๐ŸŽญ 15 chat modes โ€” Assistant, Code Assistant, Psychologist, Elon Musk and more. Add your own in config/chat_modes.yml.
  • ๐Ÿ‘ฅ Group chat support โ€” run /help_group_chat for setup instructions.
  • ๐Ÿ’ป Code highlighting โ€” formatted, readable code blocks.
  • ๐Ÿ”’ Access control โ€” restrict the bot to a list of allowed Telegram users.
  • ๐Ÿ’ฐ Balance tracking โ€” see exactly how much you've spent on the API with /balance.

๐Ÿง  Supported models

Models are config-driven โ€” add or remove any in config/models.yml with no code changes.

ModelProviderVisionSmartFastCheapIn / Out per 1K tokens
GPT-4o mini (default)OpenAIโœ…๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข$0.00015 / $0.0006
GPT-4oOpenAIโœ…๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข$0.0025 / $0.01
GPT-5.5OpenRouterโœ…๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข$0.005 / $0.03
Claude Opus 4.8OpenRouterโœ…๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข$0.005 / $0.025
Claude SonnetOpenRouterโœ…๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข$0.003 / $0.015
Claude HaikuOpenRouterโœ…๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข๐ŸŸข$0.001 / $0.005

Plus gpt-image-1 for image generation and Whisper for voice transcription.

๐Ÿ’ก OpenAI models use the native API. Claude and GPT-5.5 are routed through OpenRouter โ€” just set openrouter_api_key and pick the model in /settings. Any other OpenRouter-routed model works too: declare provider: openrouter in config/models.yml.

๐ŸŽญ Chat modes

๐Ÿ‘ฉ๐Ÿผโ€๐ŸŽ“ General Assistant๐Ÿ‘ฉ๐Ÿผโ€๐Ÿ’ป Code Assistant๐Ÿ‘ฉโ€๐ŸŽจ Artist
๐Ÿ‡ฌ๐Ÿ‡ง English Tutor๐Ÿ’ก Startup Idea Generator๐Ÿ“ Text Improver
๐Ÿง  Psychologist๐Ÿš€ Elon Musk๐ŸŒŸ Motivator
๐Ÿ’ฐ Money Maker๐Ÿ“Š SQL Assistant๐Ÿงณ Travel Guide
๐Ÿฅ’ Rick Sanchez๐Ÿงฎ Accountant๐ŸŽฌ Movie Expert

Create your own by editing config/chat_modes.yml.

๐Ÿš€ Quick start

1. Get an OpenAI API key.

2. (optional) Get an OpenRouter API key to use Claude and GPT-5.5.

3. Get a Telegram bot token from @BotFather.

4. Fill in your tokens and rename the config files:

mv config/config.example.yml config/config.yml
mv config/config.example.env config/config.env
# then edit config/config.yml โ€” set telegram_token, openai_api_key (and openrouter_api_key for Claude/GPT-5.5)

5. ๐Ÿ”ฅ Run it:

docker-compose --env-file config/config.env up --build

That's it โ€” message your bot on Telegram.

โš™๏ธ Configuration

Main options in config/config.yml:

OptionDescription
telegram_tokenBot token from @BotFather
openai_api_keyYour OpenAI API key
openai_api_baseCustom base URL (e.g. LocalAI); leave null for default
openrouter_api_keyNeeded only for provider: openrouter models (Claude, GPT-5.5)
allowed_telegram_usernamesWhitelist of users/IDs; empty = open to everyone
new_dialog_timeoutSeconds before a new dialog starts automatically
image_sizegpt-image-1 output size (1024x1024, 1536x1024, 1024x1536, auto)
enable_message_streamingStream answers word-by-word

Per-model pricing and capabilities live in config/models.yml.

๐Ÿ’ฌ Bot commands

CommandDescription
/newStart a new dialog
/modeSelect a chat mode
/retryRegenerate the last answer
/settingsChoose model and settings
/balanceShow $ spent on the API
/helpShow help

๐Ÿ—‚๏ธ Project structure

bot/
  bot.py           # Telegram handlers, streaming, commands
  openai_utils.py  # model dispatch (OpenAI + OpenRouter), token counting, vision
  config.py        # loads config.yml / models.yml / chat_modes.yml
  database.py      # MongoDB storage for users & dialogs
config/
  config.yml       # your tokens & settings
  models.yml       # model catalog, pricing, capabilities
  chat_modes.yml   # chat-mode prompts

๐Ÿ› ๏ธ Tech stack

python-telegram-bot 20.x ยท OpenAI Python SDK 1.x ยท MongoDB ยท Docker ยท Python 3.12

๐Ÿ“ฐ Changelog highlights

  • Jun 2026 โ€” Switched image generation to gpt-image-1, refreshed the model menu and pricing.
  • Mar 2026 โ€” Added OpenRouter support โ†’ Claude (Opus / Sonnet / Haiku) and GPT-5.5.
  • Feb 2026 โ€” Migrated to the OpenAI Python 1.x SDK; Docker now runs on Python 3.12.
  • 2025 โ€” Config-driven model catalog: add or swap models without touching code.

See the full history in CHANGELOG.md.

โค๏ธ Top donations

You can be on this list:

  1. LilRocco โ€” $11000 (!!!)
  2. Mr V โ€” $250
  3. unexpectedsunday โ€” $150

๐Ÿ“„ License

MIT โ€” do whatever you want, just keep the notice.


โญ If this project saved you time, give it a star! โญ