Skip to content

A Telegram bot that generates AI images from text and voice prompts using the FLUX.1-schnell model. Built with n8n, Telegram Bot API, and the EURI API for fast image generation. Simple to use, open-source, and customizable. πŸ‘‰ Try it: @tanishrajput_bot

Notifications You must be signed in to change notification settings

tanishra/Telegram-Image-Bot-Flux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ–ΌοΈ Telegram AI Image Generator Bot

A simple yet powerful Telegram bot that generates images from text or voice prompts using the black-forest-labs/FLUX.1-schnell model powered by EURI AI.

Built using:


✨ Features

  • πŸ“Έ Generate AI images from text or voice prompts
  • πŸŽ™οΈ Voice-to-image using automatic speech-to-text
  • 🧠 Powered by black-forest-labs/FLUX.1-schnell and EURI API
  • πŸ”„ Fully automated via n8n workflows
  • πŸ’Ύ Images saved to your Google Drive
  • πŸ“Š Logs prompt + image link to Google Sheets
  • πŸ€– Telegram bot interface

πŸ“· Live Demo

Try the bot here: @tanishrajput_bot

You can use either:

πŸ“„ Text prompt:

create an image of BMW car

πŸŽ™οΈ Voice prompt:

  • Send a voice note (e.g., "create an image of a robot painting in a forest")
  • Bot will transcribe it and generate an image

n8n workflow

n8n workflow

🧰 Tech Stack

  • n8n – No-code/low-code automation platform
  • Telegram Bot API – For handling user messages
  • EURI API – For fast, production-ready AI image generation
  • Hugging Face API – As an alternative inference source
  • black-forest-labs/FLUX.1-schnell – Text-to-image generation model

πŸ› οΈ Project Setup

Clone the Repo

git clone https://github.com/tanishra/Telegram-Image-Bot-Flux.git
cd Telegram-Image-Bot-Flux
  1. Import Workflow Go to your n8n dashboard and import the file: /workflows/Telegram_Bot.json

This file contains the complete logic to:

  • Telegram text messages
  • Telegram voice messages
  • Prompt extraction (from text or voice)
  • Image generation via EURI API
  • Sending image back to user
  • Saves the image to Google Drive
  • Logs prompt and image URL to a Google Sheet
  1. Telegram Trigger Node Setup Configure the Telegram Trigger node:
  • Add your Telegram credentials (use the bot token)
  1. HTTP Request Node (EURI) Configure your API request as follows:

Endpoint:

https://api.euron.one/api/v1/euri/images/generations

Headers:

{
  "Content-Type": "application/json",
  "Authorization": "Bearer YOUR_API_TOKEN"
}

Body:

{
  "prompt": "fetch from your telegram node something like {{ $json['message']['text']}}",
  "model": "black-forest-labs/FLUX.1-schnell",
  "n": 1,
  "size": "1024x1024",
  "quality": "standard",
  "response_format": "url",
  "style": "vivid"
}

🌐 API Support

  • βœ… EURI API (Recommended)
  • Fast, production-ready image generation
  • No need to host your own models
  • Get your API key at euron.one
  • Example cURL Request:
curl -X POST https://api.euron.one/api/v1/euri/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "prompt": "A beautiful sunset over mountains",
    "model": "black-forest-labs/FLUX.1-schnell",
    "n": 2,
    "size": "1024x1024",
    "quality": "standard",
    "response_format": "url",
    "style": "vivid"
  }'

πŸ”§ Contributing

Contributions are welcome!
If you have ideas, bug fixes, or improvements:

  1. Fork the repo
  2. Create a branch (feature/your-feature)
  3. Make your changes
  4. Submit a Pull Request

Keep changes focused and documented.
Let’s build something awesome together!

About

A Telegram bot that generates AI images from text and voice prompts using the FLUX.1-schnell model. Built with n8n, Telegram Bot API, and the EURI API for fast image generation. Simple to use, open-source, and customizable. πŸ‘‰ Try it: @tanishrajput_bot

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published