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:
- n8n for workflow automation
- Telegram Bot API
- EURI API (or Hugging Face as fallback)
- FLUX.1-schnell β an advanced AI model for text-to-image generation
- πΈ Generate AI images from text or voice prompts
- ποΈ Voice-to-image using automatic speech-to-text
- π§ Powered by
black-forest-labs/FLUX.1-schnelland EURI API - π Fully automated via n8n workflows
- πΎ Images saved to your Google Drive
- π Logs prompt + image link to Google Sheets
- π€ Telegram bot interface
Try the bot here: @tanishrajput_bot
You can use either:
create an image of BMW car
- 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 β 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
git clone https://github.com/tanishra/Telegram-Image-Bot-Flux.git
cd Telegram-Image-Bot-Flux- 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
- Telegram Trigger Node Setup Configure the Telegram Trigger node:
- Add your Telegram credentials (use the bot token)
- HTTP Request Node (EURI) Configure your API request as follows:
Endpoint:
https://api.euron.one/api/v1/euri/images/generationsHeaders:
{
"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"
}- β 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"
}'Contributions are welcome!
If you have ideas, bug fixes, or improvements:
- Fork the repo
- Create a branch (
feature/your-feature) - Make your changes
- Submit a Pull Request
Keep changes focused and documented.
Letβs build something awesome together!
