Developers

Saturn Embed

Put a full AI app-builder inside your own product with one script tag — like Stripe Checkout, but for building apps. Your users describe an app and watch it come to life without leaving your site.

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 loading
saturn:buildingA build/edit started
saturn: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 / dark
  • accent — hex accent color to match your brand
  • brand / logo — your name + logo URL in the header (white-label)
  • prompt / autostart — prefill or auto-run a build
  • height / 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.