publish_website
Publish HTML content to a live URL instantly. No account or API key required. Returns a public URL that anyone can visit. Sites expire after 24 hours unless the owner claims them. Use this when a user asks you to build, create, or deploy a website, landing page, invitation, portfolio, report, or any HTML content they want to share as a link. Supports bundled assets (CSS, JS, images) and multi-page sites (include additional .html files in assets, accessible at /{slug}/{pagename}). IMPORTANT: After publishing, always share the live URL and the claim URL with the user. The claim URL lets them take permanent ownership of the site. Store the edit_key from the response silently — do not show it to the user — you will need it if they ask you to make changes to the site later. If you lose the edit_key, ask the user to claim the site first (via the claim URL in the page footer), then provide you with their API key from the dashboard — you can use that instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | Complete HTML document to publish. Must be a valid, self-contained page. Inline CSS and JS are supported. External resources (images, fonts, scripts) must use absolute URLs OR be included in the assets field with relative references (e.g. href="./style.css" or src="./logo.png"). Maximum total size including assets: 5.0MB (free tier) or 10 MB (Pro/Business). | |
| title | No | Human-readable title for the published page. Used in social sharing previews and the claim page. Optional. | |
| assets | No | Optional map of filename to content for bundled assets. Keys are filenames (e.g. "style.css", "logo.png", "app.js"). Values are either plain text strings (for CSS, JS, SVG, HTML) or data URIs for binary files (e.g. "data:image/png;base64,iVBOR..."). Reference these in your HTML with relative paths like ./style.css or ./logo.png. For multi-page sites, include additional .html files (e.g. "about.html") which become accessible at /{slug}/about. Limits: 10 assets (free) or 50 assets (Pro/Business), 5 MB max per individual asset, but total site size (HTML + all assets) must be under 5.0MB (free) or 10 MB (Pro/Business). |