AI generates HTML or Canvas designs, and immediately provides a shareable responsive preview link: preview.fakhrads.dev/<id>.
Any AI agent, script, or CI/CD pipeline can push designs and get an instant live preview link.
curl -X POST https://preview.fakhrads.dev/api/previews \
-H "Content-Type: application/json" \
-d '{
"title": "Matrix Rain Canvas",
"html": "<canvas id=\"matrix\"></canvas>...",
"type": "canvas"
}'
# Send any local HTML file
preview ./dashboard.html --title "Dark UI"
# Pipe from stdout
cat design.html | preview --id "login-dark"
import urllib.request, json
data = json.dumps({"title": "Design", "html": html_code}).encode()
req = urllib.request.Request("https://preview.fakhrads.dev/api/previews", data, {"Content-Type": "application/json"})
res = json.loads(urllib.request.urlopen(req).read())
print("Preview:", res["url"])
const res = await fetch("https://preview.fakhrads.dev/api/previews", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ title, html, id }),
});
const { url } = await res.json();
console.log("Live:", url);