The Earning Robot is an autonomous AI-powered system that can:
- Execute AI tasks using OpenAI and Mistral APIs
- Accept payments via Stripe
- Generate automated financial reports
- Be controlled remotely via Telegram or REST API
- Run on a laptop, VPS, or cloud platform
Infrastructure costs:
- Free if running on your laptop
- $5-20/month for a basic VPS
- Variable for cloud platforms
Operating costs:
- OpenAI API: ~$0.002 per 1K tokens (GPT-3.5-turbo)
- Mistral API: ~$0.0002 per 1K tokens (Mistral-tiny)
- Stripe fees: 2.9% + $0.30 per transaction
Yes! The robot is designed for:
- Offering AI services to customers
- Subscription-based access
- Per-query micro-payments
- Automated business processes
Your revenue depends on your pricing and customer base.
Required:
- Telegram Bot Token (for control)
- Telegram Owner ID (for authentication)
Optional but recommended:
- At least one AI API key (OpenAI or Mistral)
- Stripe keys (if you want to accept payments)
- Open Telegram
- Search for
@BotFather - Send
/newbot - Follow the instructions
- Copy the token you receive
- Search for
@userinfobotin Telegram - Send
/start - Copy the number shown as your user ID
No, you need at least one AI provider (OpenAI or Mistral) for the robot to function. However, you can run it without Stripe if you don't need payment processing.
Edit .env file:
SUBSCRIPTION_MONTHLY_PRICE=29.99
MICRO_PAYMENT_PRICE=0.50Yes! The robot supports multiple users. Each user can:
- Send queries via Telegram (if they know your bot)
- Use the REST API
- Have their own subscription
Only the owner (configured in TELEGRAM_OWNER_ID) can access admin commands like /report.
Users are automatically created when they:
- Send a message to your Telegram bot
- Make an API request with their email/ID
No manual user creation needed!
Yes! The robot supports both OpenAI and Mistral. You can:
- Configure both API keys
- Choose per request:
/ask [question]uses OpenAI by default - Specify in API calls:
{"provider": "mistral"}
Cost calculations are approximate and based on:
- Token usage reported by APIs
- Current API pricing
- Standard pricing tiers
Actual costs may vary. Monitor your API dashboards for exact billing.
SQLite by default. It's:
- Zero configuration
- File-based
- Perfect for small to medium deployments
For high-traffic production, consider PostgreSQL or MySQL (requires code modifications).
Yes! Recommended approaches:
- Laptop: Use
nohup python main.py &to run in background - VPS: Use systemd service (see INSTALLATION.md)
- Docker: Run with
--restart unless-stopped - Cloud: Use managed services (Cloud Run, ECS, etc.)
- Data: All data is saved to SQLite database - nothing is lost
- Recovery: Simply restart the robot
- Prevention: Use process managers (systemd, Docker, supervisor)
Yes! Just use different:
- Ports (change
PORTin.env) - Database files (change
DATABASE_PATH) - Telegram bots (different
TELEGRAM_BOT_TOKEN)
# Backup database
cp data/robot.db backups/robot-$(date +%Y%m%d).db
# Or backup entire data directory
tar -czf backup.tar.gz data/Restore by copying back.
The robot includes:
- Owner authentication for admin commands
- Stripe webhook signature verification
- SQLAlchemy ORM (prevents SQL injection)
- Environment-based configuration (keeps secrets safe)
For production, also consider:
- HTTPS/SSL for API
- API authentication
- Rate limiting
- Firewall rules
- Regular security updates
- Never commit
.envto git (it's in.gitignore) - Use environment variables in production
- Use secret management (AWS Secrets, etc.)
- Rotate keys periodically
- Use read-only keys when possible
If you use Stripe:
- Payments go directly to your Stripe account
- The robot only records transactions
- No money is stored in the robot
Keep your Stripe credentials secure!
- Robot creates a Stripe Checkout session
- Customer is redirected to Stripe's secure checkout
- Customer pays with credit card
- Stripe processes payment
- Robot receives webhook notification
- Income is recorded automatically
Stripe supports:
- Credit/debit cards
- Apple Pay / Google Pay
- Bank transfers (in some countries)
- Various local payment methods
Earnings go directly to your Stripe account. Withdraw from Stripe to your bank account (setup in Stripe Dashboard).
Stripe charges:
- 2.9% + $0.30 per successful transaction (US)
- Rates vary by country
- No monthly fees
Check Stripe Pricing for details.
Check:
- Bot is running (
python main.py) TELEGRAM_BOT_TOKENis correct- You're messaging the right bot
- Check logs for errors
Common causes:
- Invalid API keys
- API rate limits exceeded
- Insufficient API credits
- Network connectivity issues
Check error messages in logs.
Install dependencies:
pip install -r requirements.txtTry:
rm -rf data/
# Database will be recreated on next runVerify:
- Webhook URL is publicly accessible
STRIPE_WEBHOOK_SECRETis correct- Webhook events are configured in Stripe
- Check Stripe Dashboard for webhook delivery logs
Depends on:
- Your infrastructure (laptop/VPS/cloud)
- AI API rate limits
- Database performance
Typical performance:
- Laptop: 10-50 concurrent requests
- VPS: 50-200 concurrent requests
- Cloud (scaled): 1000+ concurrent requests
- Use caching for repeated queries
- Add load balancing for multiple instances
- Upgrade infrastructure (more CPU/RAM)
- Use CDN for static content
- Optimize database queries
- Add Redis for session storage
Yes, but requires code changes:
- Update
backend/database.py - Change SQLAlchemy connection string
- Migrate schema
- Update configuration
Free/cheap options:
- Your laptop (free)
- Raspberry Pi (one-time cost)
- Oracle Cloud (free tier)
- Google Cloud Run (free tier)
Paid options:
- DigitalOcean ($5/month)
- AWS EC2 (from $5/month)
- Heroku (from $7/month)
- Azure (from $5/month)
Not required, but recommended for:
- Professional appearance
- HTTPS/SSL certificates
- Stable webhook URLs
- Email notifications
Cost: $10-15/year
Options:
- Let's Encrypt (free) with nginx/Apache
- Cloud platforms provide SSL automatically
- Cloudflare (free tier)
- ngrok for development/testing
Yes, but:
- Follow AI provider terms of service
- Comply with payment processing rules
- Follow local business regulations
- Consider terms for commercial use
- Consult a lawyer for specific advice
Depends on:
- Your country/state
- Revenue level
- Business structure
- Local regulations
Consult local authorities or a lawyer.
Marketing ideas:
- Social media promotion
- Content marketing (blog, YouTube)
- SEO optimization
- Paid advertising
- Partnerships
- Referral programs
- Community engagement
Consider:
- Your costs (API + infrastructure)
- Competitor pricing
- Target market
- Value provided
- Profit margin
Common models:
- Free tier + paid upgrades
- Subscription ($10-50/month)
- Per-query ($0.10-1.00)
- Credits/tokens
- Documentation: Read README, INSTALLATION, EXAMPLES
- GitHub Issues: Report bugs or ask questions
- Community: Join discussions (if available)
- Professional: Hire a developer for customization
- Check if it's already reported
- Create a GitHub issue
- Include:
- Description
- Steps to reproduce
- Expected vs actual behavior
- System info
- Error messages/logs
Yes! Look for:
- Python developers
- DevOps engineers
- Freelancers on Upwork/Fiverr
- Local tech consultants
See CONTRIBUTING.md for guidelines.
See CHANGELOG.md for roadmap including:
- Web dashboard
- More AI providers
- Multi-language support
- Advanced analytics
- Kubernetes support
Yes! Open a GitHub issue with:
- Feature description
- Use case
- Benefits
- Implementation ideas
Depends on:
- Community contributions
- Bug reports
- New AI provider APIs
- Security updates
Watch the repository for updates!
Still have questions? Open a GitHub issue!