Skip to main content

Why

You wrote a notebook. Now you want it on your blog, in your docs, or inside a course. Alph embeds are a single <iframe> — paste it anywhere HTML works.

Quick Start

<iframe
  src="https://runalph.ai/embed/{org}/{notebook-slug}"
  width="100%" height="400" frameborder="0"
  style="border-radius: 8px; border: 1px solid #e5e7eb;">
</iframe>
Replace {org} with your organization slug and {notebook-slug} with the notebook slug. Both are visible in the notebook URL.
Only public notebooks can be embedded.

Embed Builder

The fastest way to configure an embed is the visual builder at runalph.ai/embed.
1

Enter your notebook

Set the organization slug and notebook slug. The preview updates live.
2

Configure display

Choose which cells to show, pick a theme, and toggle source code or output visibility.
3

Copy the embed code

Click Copy to grab the iframe snippet and paste it into your site.
The builder also has a Manage tab where you can view, pause, or delete your managed embed configurations.

URL Parameters

Control what the embed shows by adding query parameters to the iframe src.
ParameterExampleDescription
cellcell=2Show a single cell by index (0-based)
cellscells=0,2-5,8Show specific cells — indices, ranges, or both
cellIdcellId=abc123Show a cell by its metadata ID
themetheme=darkForce light or dark. Omit to inherit from the parent page.
showSourceshowSource=0Hide source code (show outputs only)
showOutputshowOutput=0Hide outputs (show source only)
embedConfigembedConfig={id}Enable managed execution (see below)

Examples

Show only cells 0 through 3 in dark mode, outputs only:
https://runalph.ai/embed/my-org/my-notebook?cells=0-3&theme=dark&showSource=0
Show a single cell by metadata ID:
https://runalph.ai/embed/my-org/my-notebook?cellId=train-model

Execution Modes

Embeds support two ways for viewers to run code.

Standard

Viewers see the notebook’s saved source and outputs. Signed-in Alph users can connect their own project to execute cells directly. No extra configuration needed — this is the default.

Managed

Your project powers the embed. Execution is proxied through Alph so your Jupyter credentials are never exposed to viewers. Only the notebook’s existing cell sources can be run.
1

Open the Embed Builder

Go to runalph.ai/embed and switch the Execution section to Managed.
2

Select an org and project

Pick the organization and project that will back execution. The project must be active.
3

Create the configuration

Click Create embed configuration. The builder adds the embedConfig parameter to your snippet automatically.
You can manage configurations from the Manage tab — pause, resume, or delete them at any time.

Security

  • Only public notebooks can be embedded
  • Managed mode never exposes your Jupyter token to viewers
  • Only the notebook’s existing cell code can be executed — arbitrary code is rejected
  • Execution is rate-limited per embed configuration
  • Concurrent sessions are capped per configuration

Sizing Tips

The embed renders at whatever size the iframe allows. A few recommendations:
  • Full notebook: width="100%" height="600" or larger
  • Single cell: width="100%" height="300" is usually enough
  • Responsive: use CSS to make the iframe fill its container
<div style="position: relative; width: 100%; padding-bottom: 56.25%; height: 0;">
  <iframe
    src="https://runalph.ai/embed/my-org/my-notebook?cell=0"
    style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;
           border-radius: 8px; border: 1px solid #e5e7eb;"
    frameborder="0">
  </iframe>
</div>