explaingit

tbxark/chatgpt-telegram-workers

3,799TypeScriptAudience · vibe coderComplexity · 3/5LicenseSetup · moderate

TLDR

Deploy your own AI chatbot inside Telegram in minutes using Cloudflare Workers, no server needed, supports OpenAI, Claude, Gemini, Groq, and more, switchable via in-chat buttons.

Mindmap

mindmap
  root((chatgpt-telegram-workers))
    What it does
      AI bot in Telegram
      No server needed
      Multi-model switching
    Tech Stack
      TypeScript
      Cloudflare Workers
      Telegram Bot API
    AI Providers
      OpenAI
      Anthropic
      Google Gemini
      Groq and Mistral
    Features
      Streaming replies
      Image generation
      Plugin system
    Deployment
      Cloudflare Workers
      Vercel
      Docker
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Deploy a private AI assistant inside your Telegram account that you can chat with using OpenAI, Claude, or Gemini.

USE CASE 2

Switch between different AI models mid-conversation using Telegram inline buttons without any code changes.

USE CASE 3

Run multiple separate Telegram bots from one Cloudflare Workers deployment for different teams or projects.

USE CASE 4

Add text-to-image generation to a Telegram bot and let users create images with a simple chat command.

Tech stack

TypeScriptCloudflare WorkersTelegram Bot APINode.js

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a Telegram bot token and at least one AI provider API key, Cloudflare Workers free tier is sufficient.

MIT, use freely for any purpose, including commercially, as long as you keep the copyright notice.

In plain English

This project lets you run your own AI chatbot inside Telegram by deploying a small script to Cloudflare Workers, which is a serverless hosting platform that runs code without you needing a traditional server or domain name. The setup is described as a copy-and-paste operation, and you do not need to install anything on your local computer to get it running. The bot connects to a wide range of AI providers, including OpenAI, Anthropic, Google Gemini, Groq, Mistral, and several others, so you can switch between different AI models directly inside Telegram using on-screen buttons. You can also define a custom starting personality for the bot, which it will remember across conversations. Beyond Cloudflare Workers, the same codebase can be deployed on Vercel, Docker, or other platforms if you prefer a different hosting setup. The project supports running multiple separate Telegram bots from one deployment and includes a plugin system for adding custom behavior. Other features include streaming responses so replies appear as they are being generated, text-to-image generation, and support for multiple languages. The README links out to separate documentation files for deployment steps, configuration options, and the plugin system. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
I want to set up a personal AI chatbot in Telegram using Cloudflare Workers and this project. Walk me through the copy-paste deployment steps from scratch, including setting the bot token and API key.
Prompt 2
How do I configure chatgpt-telegram-workers to use Anthropic Claude as the AI backend instead of OpenAI, and switch between models using Telegram buttons?
Prompt 3
I want to deploy this project on Docker instead of Cloudflare Workers. What environment variables do I need to set and what does the Docker run command look like?
Prompt 4
How do I write a custom plugin for chatgpt-telegram-workers that responds to a specific Telegram command with a fixed message?
Open on GitHub → Explain another repo

← tbxark on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.