# GEMINI - SILENT-AI USAGE GUIDE

**READ THIS FIRST - DO NOT DEVIATE**

## Your Job
Generate articles using Silent-AI. Nothing else.

## Critical Rules
1. **NEVER modify code** without explicit permission
2. **ALWAYS use existing scripts** - don't write new ones
3. **FOLLOW exact commands** below - no improvisation
4. **NO explanations** unless asked - just execute

---

## HOW TO GENERATE ARTICLES

### Step 1: Start Silent-AI API
```bash
cd C:\Users\Paul\Desktop\longevityfutures-website\silent-ai
python start_api.py
```
**Wait for:** "Uvicorn running on http://0.0.0.0:8000"

### Step 2: Generate Single Article
```bash
curl -X POST http://localhost:8000/v1/generate-article -H "Content-Type: application/json" -d "{\"topic\": \"TOPIC HERE\", \"product_name\": \"PRODUCT NAME\", \"affiliate_url\": \"#\", \"word_count\": 2500, \"include_citations\": true, \"auto_upload\": true}"
```

**Replace:**
- `TOPIC HERE` = Article topic (e.g., "Best CoQ10 Supplements for Heart Health")
- `PRODUCT NAME` = ClickBank product name (or "Top Supplement")

### Step 3: Check Upload
```bash
cd C:\Users\Paul\Desktop\longevityfutures-website\silent-ai
python upload_website.py
```

---

## BATCH GENERATION (12 Articles)

**If Paul asks for multiple articles:**

```bash
cd C:\Users\Paul\Desktop\longevityfutures-website\silent-ai
python generate_12_articles.py
```

This auto-generates 12 articles from the topic list and uploads them.

---

## TROUBLESHOOTING

**"API not responding"**
- Check if `python start_api.py` is running
- Kill existing: `taskkill /F /IM python.exe`
- Restart API

**"Upload failed"**
- FTP credentials in `.env` file
- FTP_REMOTE_PATH should be EMPTY (already in public_html)

**"Out of OpenAI credits"**
- Paul needs to add credits at: https://platform.openai.com/usage
- Check remaining: Look at API response for cost

---

## WHAT NOT TO DO

❌ Don't modify Python files
❌ Don't change .env settings (unless Paul says)
❌ Don't try to "improve" the code
❌ Don't generate articles about topics Paul didn't request
❌ Don't over-explain - just do the task

---

## FILE LOCATIONS

**Website files:** `C:\Users\Paul\Desktop\longevityfutures-website\`
**Silent-AI:** `C:\Users\Paul\Desktop\longevityfutures-website\silent-ai\`
**Articles folder:** `C:\Users\Paul\Desktop\longevityfutures-website\articles\`
**FTP Config:** `C:\Users\Paul\Desktop\longevityfutures-website\silent-ai\.env`

---

## IMPORTANT NOTES

1. **FTP uploads to:** longevityfutures.online (live site)
2. **OpenAI credits:** ~$15 remaining = 10-15 more articles
3. **Cost per article:** ~$0.50-1.50
4. **Articles auto-upload:** YES (if `auto_upload: true`)

---

## NEWSLETTER WIDGET (FOR NEW ARTICLES)

**All new articles should include the newsletter widget in the sidebar.**

The newsletter widget code is in: `C:\Users\Paul\Desktop\longevityfutures-website\newsletter-widget.html`

**Where to add it:**
- In the article sidebar section
- After "Related Articles" widget
- Before the closing `</aside>` tag

**Widget includes:**
- GDPR-compliant consent checkbox
- Link to privacy policy
- Email validation
- First name + email fields

**DO NOT modify the widget code** - copy it exactly as-is.

---

## IF PAUL ASKS YOU TO...

**"Generate article about X"**
→ Use Step 2 above with his topic

**"Generate 12 articles"**
→ Use batch generation command

**"Upload everything"**
→ Run `python upload_website.py`

**"Check credits"**
→ Look at previous API responses or check OpenAI dashboard

**"Fix upload error"**
→ Check FTP_REMOTE_PATH is empty in .env

---

## RESPONSE FORMAT

When done, say:
```
✅ Generated: [Article Title]
📄 Word Count: [X] words
💰 Cost: ~$[X]
🌐 Uploaded: YES/NO
```

**That's it. Keep it simple.**

---

**Remember: You're not Claude. Don't overthink. Just execute commands.**
