All projects
Telegram · June 2026
Telegram bot for AI video & image generation (Veo, Gemini)

A Telegram bot that generates video (Google Veo 3.1 Fast) and images (Gemini) from a text prompt or a picture, with a token economy and payment acceptance. The key engineering challenge was bypassing Google AI quota limits: migrating from the free AI Studio tier (Tier 1, 15 RPM) to Vertex AI with a multi-fold throughput increase and a smart request manager.
What was built:
- Media generation: text-to-video and image-to-video via Veo 3.1 Fast (economy mode), image generation via Gemini
- API Manager: key rotation, rate limiting, retry with exponential backoff, intelligent routing Vertex AI (primary) <-> AI Studio (backup) <-> cache
- Limit scaling: 15 -> 300+ RPM after Vertex AI, target 1000+ RPM (Tier 3 equivalent), caching up to 40% request savings
- Redis + RQ task queue: async processing of heavy generations without blocking the bot
- Token economy: token packages, starter bonus for new users, transparent balance and spend tracking
- Payments: Stripe (LIVE, webhook with idempotent token crediting) and YooKassa (LIVE, fiscalization per Russian 54-FZ — email and automatic receipts)
- User-friendly error messages in RU/EN/UK (limits, safety filters, timeouts) with a guarantee that tokens are not charged on failure
- Observability: Prometheus + Grafana, Sentry, structured logs; deployment on Docker / Cloud Run
Stack: Python 3.11+, python-telegram-bot, Vertex AI (Veo, Gemini), google-cloud-aiplatform, Redis + RQ, PostgreSQL, SQLAlchemy, FastAPI, Stripe, YooKassa, Docker, GCP, Prometheus/Grafana/Sentry.
Role: design and development of the bot and infrastructure (backend, Python, Google AI and payment integrations).
Project screens

Screen 1 
Screen 2 
Screen 3 
Screen 4