All projects

Telegram Local Image Bot

I send a rough idea on Telegram, a local AI model writes the prompt, and my own graphics card renders the image. No paid services anywhere.

  • AI
  • Automation
  • Homelab
Telegram Local Image Bot cover

Problem

Generating an image at home meant sitting at the computer with the web interface open, so I couldn't do it from anywhere else, and paid image services put every picture on a bill. The bigger cost was time. Each model wants its prompt written a different way and has its own settings for how closely it follows that prompt, so getting a decent result out of a new one meant hours of reading before the first good image.

What I built

A Telegram bot that turns a rough idea into a finished image, running entirely on my own two machines. How it works: 1. I message the bot on Telegram from my phone, for example "a rainy street in Sofia at night, film look". 2. The bot is an OpenClaw agent on my home server. Its brain is Qwen 3, a local AI model running through Ollama on the server's RTX 3060, so no cloud AI is involved. 3. The agent turns my rough idea into a proper prompt and picks the right settings for the image model, which is the research I used to do by hand. 4. It sends the job to Forge on my main PC, where Juggernaut XL renders the image on an RTX 5060 Ti 16GB. 5. The finished image comes back to me in the same Telegram chat. The agent reaches Forge through an MCP connector I built with Claude Code. It's a small program that gives OpenClaw agents a set of image actions: generate an image, switch between image models and check what's available. Any of my OpenClaw agents can be given access to it, so image generation isn't locked into one bot. Splitting the work across two cards keeps them from fighting over memory: the 3060 does the thinking and the 5060 Ti does the drawing. I've tested the whole chain end to end, from a Telegram message to a finished image.

Tech used

  • OpenClaw
  • Ollama
  • Qwen 3
  • Stable Diffusion Forge
  • Juggernaut XL
  • MCP
  • Telegram Bot API
  • Claude Code

Result

I can make an image from wherever my phone is, and nothing goes through a paid service or a cloud AI. The saving that mattered was the research: I used to spend hours learning how a model wanted to be prompted before getting anything usable, and the agent carries that now. It's as easy as a paid image app, with both the thinking and the rendering on my own hardware.