A lean Telegram bot showcasing Decart AI models for image and video generation.
Decart.Telegram.Bot.Demo.mp4
| Send | Get | Model |
|---|---|---|
| Text message | Generated image | lucy-pro-t2i |
image: prompt |
Generated image | lucy-pro-t2i |
video: prompt |
Generated video | lucy-pro-t2v |
| Image + caption | Animated video | lucy-pro-i2v |
| Video + caption | Edited video | lucy-pro-v2v |
| Reply to image with text | Edited image | lucy-pro-i2i |
| Reply to video with text | Edited video | lucy-pro-v2v |
No commands needed - the bot auto-detects what you want.
- Node.js 18+
- Telegram Bot Token
- Decart API Key
git clone https://github.com/DecartAI/decart-example-telegram-bot.git
cd decart-example-telegram-bot
npm install- Open Telegram and search for @BotFather
- Send
/newbot - Follow prompts to name your bot
- Copy the token provided
- Go to platform.decart.ai
- Sign up or log in
- Navigate to API Keys
- Create a new key and copy it
cp .env.example .envEdit .env with your tokens:
TELEGRAM_BOT_TOKEN=your_telegram_token
DECART_API_KEY=your_decart_key
Development:
npm run devProduction:
This example uses Vercel as the deployment target, follow grammY's hosting documentation to learn more.
Open your bot in Telegram and:
-
Generate an image: Just type a description
A cat astronaut floating in space
-
Generate an image (explicit): Use the
image:prefiximage: A futuristic cityscape at sunset
-
Generate a video: Use the
video:prefixvideo: A cat walking through a garden
-
Animate an image: Send a photo with a caption
[photo] + "Make it come alive with gentle movement"
-
Edit a video: Send a video with a caption
[video] + "Transform into anime style"
-
Edit generated content: Reply to any bot-generated image or video with new instructions
Reply to image: "Add a sunset background"
- Decart Platform - Get your API key
- Decart Documentation - Full API reference
- Decart Website - Learn more about Decart
- Decart Twitter - Follow for updates