CSS
* { margin: 0; padding: 0; }
HTML
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> </head> <body> </body> </html>
JS Ctrl+Enter preview Ctrl+S publish
Preview

Your Sites

Slug Hits Size Created Expires Actions
Loading…

API Reference

POST/api/publish {html, css, js, slug?, password?, ttl?}
PUT/api/sites/:slug Update — include slug field to rename
GET/api/sites List all sites  ?page=1
GET/api/sites/:slug Get source + metadata
DELETE/api/sites/:slug Delete permanently
POST/api/clone/:slug Clone → new random slug
POST/api/ai {prompt, html?, css?, js?}{html, css, js, explanation}
GET/site/:slug Render the published page

Render order: CSS → <head> · JS → end of <body>
Slug rename: pass a new slug in PUT body — worker clones + deletes old
AI: set AI_KEY secret (wrangler secret put AI_KEY) to your Anthropic key
TTL: 0 = never expires; expired sites are purged lazily on next render
Watermark: every published page includes a small "made with generate" badge