Publish HTML (no auth)
A zero-friction endpoint that takes a blob of HTML and returns a public URL. No account, no API key. The published page expires 60 minutes after creation.
It's designed for AI agents, quick demos, throwaway prototypes and preview links. If you want a permanent page, use the authenticated file upload endpoint instead.
POST /ai/publish
Publishes a one-shot HTML page and returns the URL where it's reachable.
Request
curl -X POST https://www.flexweg.com/ai/publish \
-H "Content-Type: application/json" \
-d '{"html": "<!DOCTYPE html><html><body><h1>Hello</h1></body></html>"}'
Body parameters
| Field | Type | Description |
|---|---|---|
html | string (required) | Full HTML page, including <!DOCTYPE html>, <html>, <head> and <body>. |
Response
{
"url": "https://www.flexweg.com/demo/view/abc123xyz"
}
Open the returned URL in any browser. The page renders exactly as you submitted it.
The page is automatically deleted 60 minutes after publication. Re-submit to refresh the link, or move to an authenticated upload for permanent hosting.
Limits
- Rate-limited by IP address — abusive clients get throttled. No published per-second ceiling; stay reasonable.
- Max payload: 1 MB of HTML.
- Format: the HTML must be self-contained. External assets (CSS, JS, images) must be either inlined or hosted elsewhere.
Why use it
- AI integrations — an agent can generate HTML and publish it without any OAuth flow.
- Preview links — send a one-off design to a client for 60 minutes of review.
- Prototyping — keep iterating on a landing page without polluting your site's file tree.
For long-lived pages and proper file management (CSS, JS, images, folders), authenticate and use the Files API.