Publish website
publish_sitePublish a website or any file (PDF, image, HTML, CSS/JS) to a live public HTTPS URL at .beacon.host in one call. Files keep their content type, so PDFs and images open in the browser. No account or API key needed. Use it when the user asks to publish, host, deploy or share a page, website, landing page, report, dashboard, mini app, portfolio, game or demo, wants to share an HTML file or report as a link, wants a temporary preview link that expires on its own, or wants a link to something you made. Send every file with its path (index.html is served at the root) and its content: plain text for HTML, CSS, JS, SVG, JSON and Markdown, or base64 with encoding='base64' for images, PDFs, fonts and other binary files. For a single file, the direct link is https://.beacon.host/. Each call makes a new version live containing exactly the files you send; the previous version is kept and can be rolled back, so nothing is lost. Pass password to put the site behind a username/password prompt (works on anonymous sites too), and expires_at to make the link expire on schedule. Limits: 4 MB of file content per call without an API key, 10 MB with one, and 1,000 files. Anonymous sites stay live for 24 hours. Returns url, page_url, file_url, claim_url, claim_token and expires_at: give the user the claim_url so they can keep the site for free, and save the claim_token. To update a site, call again with the same slug and its claim_token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | Optional. Subdomain to publish to (3-63 lowercase letters, digits and hyphens). Leave empty for a random one. To update an existing site, pass its slug together with its claim_token. | |
| files | Yes | Every file of the site. Each call makes a new version with exactly these files; earlier versions are kept. | |
| title | No | Optional human-readable title saved with the site. | |
| password | No | Optional. Put the site behind a browser login prompt (HTTP Basic Auth). Works without an account. Give the user the URL, username and password; send the password separately from the link. | |
| expires_at | No | Optional. When the site should be deleted: RFC 3339 (2026-10-08T00:00:00Z) or a duration from now (90m, 2h, 7d). Without an API key it can only be earlier than the default 24 hours; with one, any future time. | |
| claim_token | No | The claim_token (ctk_...) returned when the site was first published. Required to update an anonymous site. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Live URL of the site root. | |
| slug | Yes | ||
| updated | Yes | True when an existing site got a new version. | |
| file_url | No | Direct link to the file when exactly one file was published, e.g. https://<slug>.beacon.host/report.pdf. Paste this one into chat apps so images and PDFs preview. | |
| page_url | Yes | URL to open: the site root, or the only HTML page when there is no index.html. | |
| warnings | No | ||
| anonymous | Yes | True when the site is not owned by an account and will expire unless claimed. | |
| claim_url | No | Link for the user to keep the site: they open it and sign in with their email. | |
| expires_at | No | When the site will be deleted (RFC 3339), unless claimed. | |
| file_count | Yes | ||
| next_steps | Yes | Notes for you, the agent. | |
| version_id | Yes | ||
| claim_token | No | Secret needed to update this anonymous site later. Save it; never put it on the page. | |
| total_bytes | Yes | ||
| tell_the_user | Yes | Plain-English message to relay to the user. | |
| password_protected | No | True when visitors must enter the username and password you set. |