Agent-ready API

HTML to URL, one request away.

Publish a single HTML document or a ZIP containing a static website and its assets. Both return a real browser URL on an isolated htmltourl.online subdomain.

Single HTML quickstart

POSThttps://htmltourl.pro/push
curl -X POST https://htmltourl.pro/push \
  -H "Content-Type: application/json" \
  -d '{"html":"<!doctype html><html>...</html>"}'

Request body

Send JSON with a required html string. You may also send raw HTML with Content-Type: text/html; charset=utf-8.

  • html — complete HTML or an HTML snippet, within your plan's total site allowance.
  • title — optional private label, up to 160 characters.
  • slug — optional 3–32 character custom link.
  • retentionDays — 1, 7, or 30. Signed-in paid customers can also choose permanent publishing in the studio.

The complete UTF-8 request, including JSON escaping and metadata, must fit the 95 MB upload limit. If a document exceeds that request limit, send it inside a ZIP instead.

Publish a ZIP website

POSThttps://htmltourl.pro/api/site-packages

Send multipart/form-data with one file field named archive. Include index.html and the CSS, JavaScript, images, and other static assets it uses. Keep relative paths intact. This hosts static files, not a server-side runtime.

Place index.html at the ZIP root, or put the whole site inside one enclosing folder. A single outer folder is removed automatically.

curl -X POST https://htmltourl.pro/api/site-packages \
  -F "archive=@./site.zip" \
  -F "title=Client preview" \
  -F "retentionDays=7"

Optional fields title, slug, manageToken, and retentionDays are sent as form strings. Let your HTTP client set the multipart boundary; do not manually set a JSON content type.

The ZIP file must fit the 95 MB upload cap. The server checks the package and counts the total extracted bytes across every file against your plan. A small compressed ZIP may still exceed that total. In the editor, ZIP preview is available only after publishing the hosted site.

Response

{
  "url": "https://a8k2m4qx.htmltourl.online/",
  "expiresAt": "2026-09-05T08:00:00.000Z",
  "manageToken": "private-edit-key"
}

Show users the url. Store the manageToken privately if they need to update that exact URL; never embed it in the public site. ZIP responses also include kind: "archive", fileCount, and sizeBytes, the total extracted site size.

Update the same URL

Send the original slug and manageToken with the new HTML. The URL stays the same and the expiry is renewed.

{
  "html": "<!doctype html>...revised...",
  "slug": "a8k2m4qx",
  "manageToken": "private-edit-key",
  "retentionDays": 7
}

For a ZIP site, send the replacement archive to /api/site-packages with the same slug and manageToken as form fields. Include the whole site, not only changed files. Keep the private edit key to yourself.

Limits and safety

  • free: 20 MB total per site, up to 2,000 files.
  • starter: 50 MB total per site, up to 2,000 files.
  • pro: 100 MB total per site, up to 2,000 files.
  • business: 200 MB total per site, up to 2,000 files.
  • Count all extracted HTML, CSS, JavaScript, images, and other assets together. This is a per-site limit, not a per-file allowance.
  • 95 MB maximum upload. Large uncompressed sites must be compressed into a ZIP that fits this cap.
  • Anonymous API requests use Free limits. The studio applies the currently entitled plan of the signed-in account.
  • Free uploads also share one daily volume allowance across all free users, resetting on the Asia/Shanghai day boundary. Each successful publish counts its full extracted site size, including same-URL replacements. Failures use no allowance; deletions and expiry do not return today's usage. This daily total is separate from per-site limits. Paid-plan uploads do not use the free pool.
  • Read GET /api/hosting-usage for limitBytes, usedBytes, remainingBytes, and resetAt. Its scope: "site" means the total is shared across the service. A ZIP's compressed size is not its quota cost; the server checks its extracted total.
  • If publishing returns 429 because the free allowance is exhausted, refresh usage and wait for the reset or use a paid plan. Do not treat a rejected request as a published site.
  • After a paid-plan downgrade takes effect, permanent sites over the new total-size allowance become temporary with a 7-day grace period. Sites that fit are ranked by most recent update for the remaining permanent slots; extras receive the same grace period. Oversized sites do not consume those slots.
  • 20 publish requests per IP per hour.
  • Temporary pages expire; published sites use noindex.
  • Sites run under a Content Security Policy sandbox without same-origin access.
  • Never include secrets, private data, passwords, or API keys.

Account storage and monthly origin transfer

New subscriptions use resource policy 2026-08-30. These account-wide allowances are separate from permanent page slots, the per-site extracted-size limit, and the request upload cap. Existing paid subscriptions keep their previous resource terms; the account response, not a pricing-page assumption, tells you which policy applies.

When an old subscription ends, new uploads and temporary hosting use the free safeguards. Eligible pre-policy permanent pages keep their previous transfer terms only through their original seven-day grace period, never beyond the page's expiry. This limited read-only exception does not renew the old subscription or create a new free allowance.

  • starter: 1 GiB retained account storage and 10 GiB origin-transfer reservations per month.
  • pro: 5 GiB retained account storage and 50 GiB origin-transfer reservations per month.
  • business: 25 GiB retained account storage and 200 GiB origin-transfer reservations per month.
  • Free and anonymous sites share one 10 GiB monthly origin-transfer pool across the service. This is not 10 GiB for each visitor or free account.

Retained storage: all uploaded file bytes across retained versions count, not just the latest online version. This is a logical file-byte counter, not physical disk usage: filesystem blocks, manifests, directory metadata, and inodes are excluded. Account-attributed replaced, offline, and expired versions remain counted until they are actually removed. Unreferenced versions are eligible for cleanup after 35 days; referenced versions are not deleted merely because a link is offline or expired. Old unassigned directories can remain outside an account meter and still use server disk. Taking a page offline does not instantly release its storage allowance.

Conservative transfer reservations: before serving a hosted response, the origin reserves its full response size, or the bytes in a supported single byte-range response. Interrupted downloads do not return the reservation. HEAD responses reserve zero body bytes. This counts protected origin-response work, not measured end-user bandwidth or a provider invoice; cached delivery and compression can differ. The counter resets at the start of each calendar month in Asia/Shanghai.

When a bounded allowance cannot cover a new upload or response, that operation can be refused; existing customer files are not silently deleted. Check the returned error and your account usage before retrying. Retrying an unchanged response does not bypass the resource policy.

Read your active resource policy

Authenticated GET /api/account/billing includes resources:

{
  "resources": {
    "policy": "2026-08-30",
    "retainedBytes": 104857600,
    "retainedLimitBytes": 1073741824,
    "monthlyReservedBytes": 536870912,
    "monthlyTransferLimitBytes": 10737418240,
    "month": "2026-08",
    "resetAt": "2026-08-31T16:00:00.000Z"
  }
}

policy is legacy, 2026-08-30, or free. A null limit means this new policy does not impose that account-wide cap; it is not a promise of unlimited hosting. Free transfer values refer to the shared pool, while retained bytes refer to the signed-in account. Missing resource data is unavailable, not zero usage. All limits are exact bytes; GiB uses 1,024³ bytes.

Short agent instruction

Point compatible agents to https://htmltourl.pro/prompt, or use:

Follow https://htmltourl.pro/prompt to publish the complete HTML.
Return only the final top-level URL.