For grown-ups. This switches on AI building, so kids can type any idea and Claude builds it. You pay for each game built with your own Claude API key, and daily limits keep that small. About 20 minutes, once. Tick each step as you finish it.
Do steps 1 to 5 on a laptop or desktop. Cloudflare's code editor is very hard to use on a phone (pasting often doesn't work). Step 6 is quick and is done on each iPad or phone the kids use. Something look different from these steps? Cloudflare changes its menus now and then; the names in bold are what to look for.
Your ticks are saved, so you can leave and come back. The Claude Console and Cloudflare buttons open in a new tab. To come back here, tap Safari's tabs button and pick this page, or use this address:
Opened this from inside another app, like Claude or Messages? Tap Open in Safari (or the compass icon) first, so your ticks stay put. Lost it anyway? Open Game Forge and tap Continue AI setup.
0 of 6 steps done
Missed copying it? You can't see it again, and that's fine: make a new key, and delete the unused one on the API keys page. Keep the key private. Never put it on GitHub, in the game, or in a text or photo.
Stuck on a phone? The editor often won't let you paste ("Unable to read from the browser's clipboard"). Switch to a computer for steps 3 to 5; your ticks stay on this device, so just tick them again there.
On your worker's page, open the Settings tab. Next to Variables and Secrets, click + Add. Add all four in the same window: fill in the first, then click + Add under it for the next. The names must match exactly, in capitals.
ANTHROPIC_API_KEYValueSecretYour API key from step 1ALLOWED_ORIGINValueDAILY_LIMIT_PER_DEVICEValue (games per device each day)5DAILY_LIMIT_TOTALValue (games for everyone each day)50For the API key, tick the Secret box at the right of its value, so nobody can read it back. Leave the other three as plain text, and leave Production ticked. Then click Add 4 variables and deploy. Afterwards the list shows the key as Value encrypted. A yellow box about Wrangler configuration may appear; ignore it and close it.
Two parts: first make a small storage box, then connect it to your worker.
The list says "No KV namespace found"? You haven't made the box yet; do part 1 first. Typed the name wrong? A binding can't be renamed: click the trash can at the right end of its row (zoom out if it's hidden), then add it again. When Bindings shows LIMITS → gameforge-limits, Cloudflare is finished.
Kids on another iPad or phone? This step switches AI on only for the device you're using. On each device the kids use, repeat just this step (about 1 minute). Steps 1 to 5 never need doing again.
Want a Home Screen icon? In Safari, tap Share, then Add to Home Screen. Then open Game Forge from that icon and do this step again inside it: the icon keeps its own settings and its own saved games, separate from Safari. Have the kids always use the icon. If the browser's history and website data are cleared, AI switches off; just repeat this step.
Two kids at home? The per-device limit counts by internet connection, so iPads on the same Wi-Fi share it. To raise it, in Cloudflare go to your worker's Settings, click the pencil next to DAILY_LIMIT_PER_DEVICE, change 5 to 10, and deploy.
In your site's GitHub repo, tap Add file, then Create new file. Name it ai.json, paste the text below, and commit.
Check how much you've spent any time in the Claude Console.