# host.withzero.ai Static Website Upload

> host.withzero.ai Static Website Upload is a paid API for AI agents from host.withzero.ai, paid per call via MPP, metered — billed by usage, status healthy (last checked 2026-10-02, last successful call 2026-10-02).

Publishes HTML, Markdown, or plain text as a live static website and returns the public URL, with the caller's wallet stamped as slug owner.

## Facts

- Endpoint: POST https://host.withzero.ai/run?utm_source=zero.xyz
- Price: metered — billed by usage
- Payment: MPP
- Status: healthy
- Last checked: 2026-10-02
- Last successful call: 2026-10-02
- Success rate: 99% of calls made through Zero
- Rating: 5.0 / 5 from 2 reviews
- Activations on Zero: 154
- Provider: host.withzero.ai
- Website: https://host.withzero.ai
- Canonical page: https://www.zero.xyz/c/host-withzero-ai-static-website-upload-6b5dcf40
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NEK-El9UkLsZQTBFh1CgP

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability host-withzero-ai-static-website-upload-6b5dcf40 -d '<json body>'
```

Example prompt: Publish this HTML page for me and give me a live link — use the slug 'my-launch-page' and keep it up for 30 days: <!DOCTYPE html><html><body><h1>We're launching soon!</h1></body></html>

## When to prefer this

Choose this endpoint when you need to instantly publish HTML, Markdown, or plain text as a live public webpage without managing servers, DNS, or deployment pipelines. It's ideal for ephemeral or semi-permanent content (30 minutes to 180 days) where you want ownership tied to a wallet address and the ability to later update, delete, or attach a custom domain. Prefer it over general cloud storage for use cases where a human-readable live URL matters and content needs to be browser-accessible.

## Known failure modes

- Content missing or empty — required 'content' field not provided
- Content too large — exceeds 2,000,000 character maximum
- Slug already taken by another owner — returns conflict error
- Slug format invalid — must match ^[a-z0-9-]+$ and be 3–64 characters
- TTL out of range — must be between 0.5 and 4320 hours
- Unauthorized wallet — caller not authenticated or wallet not stamped
- Server or storage error — upstream R2 or hosting failure

## How this service works

Upload a static website. Returns the live URL. Caller wallet is stamped as the slug owner; owners can edit/delete or attach custom domains via the other routes.

## Output

Returns a JSON object with the live public URL of the published site, the slug portion of the URL, the owner wallet address, content size in bytes, the TTL in hours and human-readable form, and an ISO 8601 expiration timestamp plus an operational note about how to refresh or extend the TTL.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "content"
 ],
 "properties": {
  "slug": {
   "type": "string",
   "pattern": "^[a-z0-9-]+$",
   "maxLength": 64,
   "minLength": 3,
   "description": "Optional custom slug for the URL (lowercase alphanumeric + hyphens). Random if omitted."
  },
  "content": {
   "type": "string",
   "maxLength": 2000000,
   "minLength": 1,
   "description": "HTML, Markdown, or plain text content to publish. Full HTML pages work best."
  },
  "ttlHours": {
   "type": "number",
   "default": 4320,
   "maximum": 4320,
   "minimum": 0.5,
   "description": "Time-to-live in hours (0.5–4320, i.e. 30 min to 180 days). Default: 4320 (180 days)."
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url",
  "slug",
  "expiresAt",
  "ttlHours",
  "ttl",
  "size",
  "owner",
  "note"
 ],
 "properties": {
  "ttl": {
   "type": "string",
   "description": "Human-readable TTL summary (e.g. \"14 days\", \"12 hours\"). Derived from ttlHours."
  },
  "url": {
   "type": "string",
   "description": "Live URL of the published site"
  },
  "note": {
   "type": "string",
   "description": "Operational summary. Includes the actual TTL applied, expiration timestamp, and how to refresh."
  },
  "size": {
   "type": "number",
   "description": "Content size in bytes"
  },
  "slug": {
   "type": "string",
   "description": "The slug portion of the URL"
  },
  "owner": {
   "type": "string",
   "description": "Wallet that owns this slug (caller's address)"
  },
  "ttlHours": {
   "type": "number",
   "description": "TTL (hours) applied to this upload. Default 4320 (180 days). Pass `ttlHours` in input to set a different value (min 0.5, max 4320). PUT /sites/:slug with a new ttlHours to refresh; otherwise the slug expires at `expiresAt`."
  },
  "expiresAt": {
   "type": "string",
   "description": "ISO 8601 expiration timestamp"
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/host-withzero-ai-static-website-upload-6b5dcf40/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from host.withzero.ai](https://www.zero.xyz/host/host.withzero.ai/llms.txt)
