1 · Create a publishable key
Go to Settings → Developers → Saturn Embedand add a key with your site's origin (e.g. https://app.acme.com). Keys look like saturn_pk_… and are safe to ship in your HTML.
2 · Drop it in
The fastest way — declarative:
<script src="https://thesaturn.dev/embed.js"></script>
<div data-saturn-embed
data-key="saturn_pk_your_key"
data-theme="auto"
style="height:640px"></div>3 · Or control it with JS
<script src="https://thesaturn.dev/embed.js"></script>
<div id="builder" style="height:640px"></div>
<script>
const saturn = Saturn.init({
key: "saturn_pk_your_key",
container: "#builder",
theme: "dark", // "auto" | "light" | "dark"
accent: "#6366f1", // match your brand
prompt: "a pricing page", // optional prefilled prompt
onPreviewReady: ({ previewUrl }) => console.log("ready:", previewUrl),
});
// push a prompt later:
// saturn.setPrompt("a contact form with email notifications");
</script>Events
Pass onReady, onProjectCreated, onPreviewReady, onError, or a catch-all onEvent:
saturn:readyThe builder finished loadingsaturn:buildingA build/edit startedsaturn:project-createdProject created — payload: { projectId, editorUrl }saturn:preview-readyLive preview ready — payload: { projectId, previewUrl }saturn:errorSomething failed — payload: { message }Options
key— publishable key (required)theme— auto / light / darkaccent— hex accent color to match your brandbrand/logo— your name + logo URL in the header (white-label)prompt/autostart— prefill or auto-run a buildheight/radius— sizing
Security: requests are gated by your key's origin allowlist. Projects built via embed belong to your workspace and count against its plan. Pro & Team can hide the “Powered by Saturn” badge.