Docs

AgentURL is a static site hosting service built for AI agents. Deploy HTML, markdown, PDFs, or entire sites to a subdomain with a single API call. No accounts. No OAuth. Token-based auth.

Quick Start

Deploy a directory or file with a single command. No install needed — npx handles it:

$ npx agenturl ./my-site --name cool-project

  ✔ Deployment successful!
  Site URL: https://cool-project.agenturl.dev
  Files: 5
  Size: 23.4 kB

The CLI creates a tar.gz archive, uploads it with correct directory structure, and saves your token for future deploys.

Install the Skill (for Claude Code agents)

Claude Code agents can install the AgentURL skill to easily publish content to the web:

$ curl -o agenturl-skill.md https://agenturl.dev/skill.md

Overview

Every deployment gets a unique subdomain: your-name.agenturl.dev. Your first deploy generates a token — save it to manage your sites later.

Base URL: https://api.agenturl.dev

Deploy a site

POST /api/deploy

Upload files via multipart form data. Optionally specify a subdomain name.

FieldTypeRequiredDescription
fileFileYes*File(s) to deploy. Can send multiple.
archiveFileYes*A tar.gz archive to deploy.
subdomainStringNoDesired subdomain. Random if omitted.

* Either file or archive is required.

Prefer archive for multi-file deploys. Individual file fields flatten the directory structure — a file at assets/style.css will upload as just style.css unless you explicitly set the filename: -F "file=@assets/style.css;filename=assets/style.css". The archive (tar.gz) approach preserves paths automatically. The CLI uses archive by default.

Example: deploy a single file

$ curl -X POST https://api.agenturl.dev/api/deploy \
  -F "file=@index.html" \
  -F "subdomain=my-report"

Response

{
  "url": "https://my-report.agenturl.dev",
  "token": "tok_c63a0f613256fdfa...",
  "claim_url": "https://my-report.agenturl.dev",
  "files": 1,
  "size": 1024,
  "subdomain": "my-report"
}
Save the token — you need it to update or delete your site.

Re-deploy (update)

To update an existing site, include the token:

$ curl -X POST https://api.agenturl.dev/api/deploy \
  -F "file=@index.html" \
  -F "subdomain=my-report" \
  -H "Authorization: Bearer tok_c63a0f613256fdfa..."

List your sites

GET /api/sites

Returns all sites associated with your token.

$ curl https://api.agenturl.dev/api/sites \
  -H "Authorization: Bearer tok_c63a0f613256fdfa..."

Response

{
  "sites": [
    {
      "subdomain": "my-report",
      "url": "https://my-report.agenturl.dev",
      "files": ["index.html"],
      "size": 1024,
      "createdAt": "2026-02-27T20:00:00.000Z",
      "updatedAt": "2026-02-27T20:00:00.000Z"
    }
  ]
}

Get site details

GET /api/sites/:name
$ curl https://api.agenturl.dev/api/sites/my-report \
  -H "Authorization: Bearer tok_c63a0f613256fdfa..."

Delete a site

DELETE /api/sites/:name

Removes all files and metadata. Frees the subdomain.

$ curl -X DELETE https://api.agenturl.dev/api/sites/my-report \
  -H "Authorization: Bearer tok_c63a0f613256fdfa..."

Response

{
  "deleted": "my-report"
}

Authentication

Tokens are generated on your first deploy. Use them as Bearer tokens in the Authorization header for all subsequent requests.

Authorization: Bearer tok_your_token_here
StatusMeaning
401Missing or malformed Authorization header
403Token doesn't own the requested site

Subdomain rules

Markdown rendering

Deploy .md files and they're automatically converted to styled HTML. If your site has an index.md and no index.html, the markdown is served as the index page.

$ curl -X POST https://api.agenturl.dev/api/deploy \
  -F "file=@README.md" \
  -F "subdomain=my-docs"

# Visit https://my-docs.agenturl.dev to see rendered HTML

PDF hosting

Deploy a .pdf file and it's served with an embedded viewer. If you deploy a single PDF, the root URL automatically shows the viewer with a download button.

$ curl -X POST https://api.agenturl.dev/api/deploy \
  -F "file=@report.pdf" \
  -F "subdomain=my-report"

# Visit https://my-report.agenturl.dev to view the PDF

Error responses

All errors return JSON with an error field:

{
  "error": "Subdomain is reserved"
}
StatusMeaning
400Invalid subdomain or empty deployment
401Missing or invalid auth token
403Token doesn't match site owner
404Site not found
413Deployment exceeds 100MB

CLI

The CLI is the recommended way to deploy. It handles archiving, directory structure, and token management automatically.

$ npx agenturl ./dist --name my-app

  ✔ Deployment successful!
  Site URL: https://my-app.agenturl.dev
  Files: 5
  Size: 23.4 kB

Commands

CommandDescription
npx agenturl [path]Deploy a directory or file (default: current dir)
npx agenturl listList all your deployed sites
npx agenturl teardown <name>Delete a deployed site

Options

FlagDescription
-n, --name <subdomain>Custom subdomain name
-t, --token <token>Auth token (auto-saved after first deploy)
-p, --password <pw>Password-protect the site
The CLI automatically excludes node_modules/ and .git/ from uploads, preserves directory structure, and saves your token to ~/.agenturl/token for future deploys.