I’m helping a friend refresh a compact proofreading website that currently focuses on spelling corrections. We’d like the core engine to be powered by Gemini AI so visitors can drop text into a box and instantly receive accurate spelling fixes, light grammar suggestions, and brief explanations of each change. Here’s what I need from you: • Connect Gemini AI to the existing front-end (plain HTML/CSS with a small PHP back-end). • Build a clean input/output interface that returns corrected text plus a change log. • Ensure responses stream quickly and handle up to 2,000 words per request. • Add basic usage logging so we can track daily request counts. Please keep the implementation lightweight—no heavy frameworks unless absolutely necessary—and document any API keys, rate-limit settings, or deployment steps so we can maintain everything in-house afterward. If you’ve integrated Gemini or similar large-language-model APIs before, I’d love to see an example.