Translate · Analyze · Write · Scan — in हिन्दी & English
This app is a single index.html file — just push to GitHub and connect to Cloudflare Pages. Done in under 5 minutes, free forever.
sahayak-ai → Create repository. Upload index.html.None · Build command: leave empty · Build output: / · Click Deploy. Your app is live at https://sahayak-ai.pages.dev 🎉export default {
async fetch(request, env) {
if (request.method === 'OPTIONS') return new Response(null, { status: 204, headers: cors() });
const body = await request.json();
const res = await fetch(
`https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=${env.GEMINI_API_KEY}`,
{ method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body) }
);
const data = await res.json();
return new Response(JSON.stringify(data), { headers: { 'Content-Type': 'application/json', ...cors() } });
}
};
const cors = () => ({ 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'POST,OPTIONS', 'Access-Control-Allow-Headers': 'Content-Type' });
Deploy this as a Worker, add secret GEMINI_API_KEY, then replace the API call URL in index.html with your Worker URL.
sahayak-ai/ └── index.html ← this entire app (self-contained, no build needed)
Every git push auto-deploys to Cloudflare Pages within seconds.