SDK & Integrations

Embeddable Web Widget (@baziapi/widget)

Zero Code

Plug-and-play BaZi Four Pillars calculator for Webflow, WordPress, Shopify, and HTML websites.

Embeddable UI Widgets
Embed an interactive calculator form anywhere on your site with 2 lines of HTML.

Installation

Bash
No npm install needed — load directly from CDN.

Quick Start

HTML CDN Embed Snippet
HTML
<!-- 1. Container Element -->
<div id="bazi-widget" data-api-key="bazi_live_your_api_key_here"></div>

<!-- 2. CDN Script -->
<script src="https://cdn.baziapi.pro/v1/widget.js" async></script>

API Parameters

ParameterTypeRequiredDefaultDescription
data-api-keystringRequiredYour publishable BaZi API Key.
data-base-urlstringOptionalhttps://api.baziapi.pro/api/v1API Base URL override.
data-theme'light' | 'dark'OptionallightTheme mode preference.
data-lang'en' | 'zh'OptionalenLanguage preference for results.

Something unclear? Contact developer support.