--- title: MOFH API Proxy emoji: ๐ŸŒ colorFrom: blue colorTo: green sdk: docker sdk_version: "4.36.0" python_version: "3.11" app_file: app.py pinned: false --- # ๐Ÿš€ IONA AI + MOFH API Proxy **Intelligent Website Generator & MyOwnFreeHost API Proxy** --- ## โœจ Features - ๐Ÿค– **AI Website Generation** - Generate complete websites with HTML, CSS, JS, and MySQL - ๐Ÿ  **MOFH Integration** - Create free hosting accounts via API - ๐Ÿ“Š **Beautiful Dashboard** - Real-time system monitoring with uptime display - ๐ŸŒ **External IP Display** - Easy MOFH whitelist configuration - ๐Ÿฅ **Health Checks** - Monitor system health and performance - ๐Ÿงช **Test Endpoints** - Verify AI functionality before use --- ## ๐ŸŽฏ Quick Start ### 1. Visit Dashboard ``` https://your-space.hf.space/ ``` ### 2. Copy External IP - Displayed prominently on dashboard - Add to MOFH API whitelist ### 3. Test AI ``` https://your-space.hf.space/test ``` ### 4. Generate Website ```bash curl -X POST https://your-space.hf.space/generate-website \ -H "Content-Type: application/json" \ -d '{ "prompt": "Create a modern portfolio website", "business_type": "portfolio", "color_scheme": "modern" }' ``` --- ## ๐Ÿ“ก API Endpoints | Method | Endpoint | Description | |--------|----------|-------------| | GET | `/` | System dashboard (HTML) | | GET | `/health` | Health check (JSON) | | GET | `/test` | Test AI generation | | POST | `/generate-website` | Generate website with AI | | POST | `/create` | Create MOFH hosting account | --- ## ๐Ÿ”ง Configuration ### Environment Variables - `GROQ_API_KEYS` - Groq AI API keys (4 keys for load balancing) - `MOFH_API_USERNAME` - MOFH API username - `MOFH_API_PASSWORD` - MOFH API password ### AI Models (2026) - `llama-3.1-8b-instant` - Fastest (131K context) - `llama-3.3-70b-versatile` - Best quality - `qwen/qwen3-32b` - Large output (40K tokens) - `meta-llama/llama-4-scout-17b-16e-instruct` - New Llama 4 --- ## ๐Ÿ“Š Dashboard Features - โฑ๏ธ **Uptime Tracking** - Running since, uptime duration - ๐ŸŒ **Network Info** - Hostname, local IP, external IP - ๐Ÿ’ป **System Resources** - CPU usage, memory usage with progress bars - ๐Ÿค– **AI Configuration** - Active models, API keys, request counts - ๐Ÿ“ˆ **Request Statistics** - Total, generate, create, errors - ๐Ÿ”„ **Auto-Refresh** - Updates every 30 seconds --- ## ๐Ÿงช Testing ### Health Check ```bash curl https://your-space.hf.space/health ``` ### AI Test ```bash curl https://your-space.hf.space/test ``` ### Generate Website ```bash curl -X POST https://your-space.hf.space/generate-website \ -H "Content-Type: application/json" \ -d '{ "prompt": "Create a simple landing page for a tech startup", "business_type": "landing", "color_scheme": "modern", "include_database": false, "features": ["contact_form", "testimonials"] }' ``` --- ## ๐Ÿ“ Response Format ### Success Response ```json { "success": true, "model_used": "llama-3.3-70b-versatile", "files": { "html": "...", "css": "body { ... }", "js": "console.log('...');", "sql": "CREATE TABLE...", "config": "