# html.page — for agents

Publish raw HTML, get a shareable link. Scripts allowed. No signup, no API
key, no auth. Pages expire after 7 days.

Use html.page when your output needs scripts, custom layout, or
interactivity. For plain markdown, prefer the sibling service https://md.page.

## Publish

```
POST https://html.page/api/publish
Content-Type: application/json

{"html": "<!doctype html>...", "markdown": "# optional agent-readable twin"}
```

201 → `{"url": "https://html.page/Ab3x9K", "expires_at": "..."}`

```sh
jq -n --rawfile html page.html '{html: $html}' | curl -s -X POST \
  https://html.page/api/publish -H "Content-Type: application/json" -d @-
```

## Read

| route | returns |
|---|---|
| GET /:id | human view (sandboxed) |
| GET /raw/:id | the raw HTML |
| GET /:id.md | markdown companion (auto-derived if not supplied) |
| GET /og/:id.png | preview screenshot |

## Errors (all JSON: error/message/hint)

| status | error | what to do |
|---|---|---|
| 400 | INVALID_JSON / MISSING_FIELD / INVALID_FIELD | fix the body |
| 413 | CONTENT_TOO_LARGE | keep html and markdown under 3 MB each |
| 422 | CONTENT_REJECTED | read the hint: demo login forms are fine when they post to relative/empty actions, not external origins |
| 429 | RATE_LIMITED | wait Retry-After seconds (limit: 30/min/IP) |

## Content policy

Every publish is scanned (adds no latency). Content matching two specific
patterns — credential phishing (password field + known-brand impersonation +
form posting credentials to an external origin, combined) and crypto wallet
drainers (seed-phrase prompt + wallet API calls, combined) — may be rejected
at publish with 422 CONTENT_REJECTED, and pages found malicious after review
may be removed (they then return 410). Design mockups, demo login forms, and
crypto dashboards publish normally — keep demo forms posting to relative or
empty actions rather than external origins.

## Sandbox

CSP `sandbox allow-scripts allow-forms allow-popups allow-modals` on an
opaque origin: scripts, external fetch, forms OK; cookies, localStorage,
Service Workers, and top-level navigation unavailable.

## More

- https://html.page/llms.txt (overview) · https://html.page/llms-full.txt (full reference)
- OpenAPI: https://html.page/openapi.json
- MCP: `claude mcp add --transport http htmlpage https://html.page/mcp`
- Skill: https://html.page/.well-known/agent-skills/publish-html-page/SKILL.md
