Publish AI-generated HTML in one step
Chat assistants and coding agents now write complete web pages: dashboards, reports, landing-page drafts, small games, slide decks. BrewPage is the step after generation: it puts that HTML or Markdown at a public HTTPS link. From a chat app you paste it; an agent publishes it by itself after one instruction.
From a chat app: ChatGPT, Gemini or Claude
- 1Ask the assistant for “one self-contained HTML file with inline CSS and JavaScript”. A single file publishes without broken references.
- 2Copy the code it writes and paste it into the BrewPage editor. If the answer is a document rather than a page, paste it as Markdown.
- 3Press Publish and share the link. Keep the owner token if you will publish a new version later.
Chat apps write the HTML but usually cannot send it anywhere from the chat window, so the copy-and-paste step is the reliable path. Desktop clients that support MCP servers can publish directly once the BrewPage server is connected.
From a coding agent: Claude Code, Codex, Cursor and others
Coding agents run commands, so they can publish their own output. Add one instruction to the agent's project notes, such as AGENTS.md or CLAUDE.md, and it will publish finished reports and reply with a link:
Instruction for the agent
When you finish an HTML page or a Markdown report the user should see, publish it to BrewPage and return the link. POST the HTML to https://brewpage.app/api/html with Content-Type: text/html (Markdown: Content-Type: text/markdown). Requests without ns publish to the public namespace; set a non-public ns for an unlisted address. Return the link from the response and keep the ownerToken for updates. Full API: https://brewpage.app/llms.txt
For tool-based publishing, connect the MCP server, which works with MCP clients such as Claude, Codex, Cursor and Gemini:
MCP server config
{ "mcpServers": { "brewpage": { "command": "npx", "args": ["-y", "brewpage-mcp@1.9.3"] } } }
Claude Code users can also install the brewdoc plugin and run /publish; the steps are on the Claude artifacts page. Agents that load llms.txt find the whole API described there.
The request behind it
Every path above ends in the same call. JSON works well when the HTML is already in a variable:
Publish HTML from JSON
curl -X POST "https://brewpage.app/api/html" \
-H "Content-Type: application/json" \
-H "User-Agent: MyAgent/1.0" \
-d '{"content": "<h1>Build report</h1><p>All checks passed.</p>"}'
The response carries the link, the ownerToken and the expiry date. In GitHub Actions the same step is one action:
GitHub Actions step
- name: Publish report
id: brewpage
uses: kochetkov-ma/brewpage-action@v1.1.2
with:
path: ./report.html
- run: echo "Report: ${{ steps.brewpage.outputs.url }}"
Check AI output before you publish
- One file. Generated pages sometimes point at
style.cssorapp.jsthat were never written. After publishing, BrewPage warns when a page references local files that were not uploaded; inline them, or publish the folder as a site. - No secrets. Generated code can contain API keys, tokens or internal URLs copied from the conversation. Remove them before publishing.
- The right audience. Public pages can be listed and found, unlisted links can be forwarded, and only a password restricts reading.
- Browser features. If the page stores data in the browser or changes the address bar, it works best on its own subdomain; BrewPage may choose that address automatically and tells you why.
Limits
- Size
- One HTML or Markdown page up to 5 MB. A multi-file site up to 20 MB in total, 100 files, 5 MB per file.
- Lifetime
- 1 to 30 days, 15 by default. When the time is up the content is deleted for good, with no recovery. Updating a page keeps its original expiry date; it does not extend it.
- Visibility
- Public publications without a password can appear in the gallery and in search results, but neither is guaranteed. An unlisted address is not private: anyone who has the link can open it. Set a password (at least 4 characters) when readers should have to enter one.
- Ownership
- There are no accounts. The owner token returned with each publish is the only way to update or delete; a lost token cannot be recovered, and the content then simply expires.
- Usage
- Publishing and reading are rate-limited per IP address. A
429response carries aRetry-Afterheader that says when to try again. - Attribution
- Published pages show a small BrewPage badge. Publishing follows the terms, and anyone can report a page.
Compared with typical hosting for generated pages
| Question | BrewPage | Typical static-site host | Code playground |
|---|---|---|---|
| Account needed | No | Usually yes | Depends on the service |
| Can an agent publish without a human | Yes: API, MCP server, plugin or GitHub Action | Through a deploy tool and credentials | Depends on the service |
| What the reader sees | The page itself, with a small badge | The page itself | The page next to the code editor |
| How long it stays online | 1–30 days, then deleted | Until you take it down | Varies |
| Good fit | Reports, prototypes and one-off pages from AI tools | Sites you maintain | Experimenting with code |
Publishing AI-generated HTML — FAQ
Can ChatGPT publish a page by itself?
Not from the chat window. Copy the HTML it writes into the editor. A client that supports MCP servers can publish directly once the BrewPage server is connected.
Which AI tools work with BrewPage?
Any tool whose output you can copy, and any agent that can make an HTTP request or use an MCP server: Claude Code, Codex, Cursor, Gemini CLI and others.
Do I need an API key?
No. Publishing needs no key and no account. Each publish returns an owner token for later updates.
Can an agent update the same page on every run?
Yes. Keep the owner token and send each new version with PUT /api/html/{ns}/{id}, or use the GitHub Action with its update inputs. The link stays the same and the expiry date does not move.
What if the generated page loads external files?
Files referenced by a full URL load as usual. Files referenced by a relative path must be published together as a site: drop the folder or a .zip.
How long do published pages stay online?
15 days by default, up to 30 days. Then they are deleted for good.
Is AI-generated content allowed?
Yes, within the terms that apply to every publication. Anyone can report a page that breaks them.