Getting Started
Get up and running with html.ai in minutes.
Installation
Add the SDK with a single script tag:
<script type="module" src="./sdk/src/AiOptimizeElement_v2.js"></script>Quick Start
1
Get your API key
Sign up at the dashboard to get your public key (pk_*).
2
Add the SDK script
Include before </body>. The SDK auto-initializes.
3
Wrap your components
<ai-opt experiment="hero">
<h1>Welcome</h1>
<button>Shop Now</button>
</ai-opt>Configuration
| Attribute | Description |
|---|---|
| experiment | Unique experiment/component identifier (required) |
| type="module" | Required for ES module import |