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.
- Deploy static files (HTML, CSS, JS, images, etc.)
- Deploy markdown files — rendered as styled HTML automatically
- Deploy PDFs — served with an embedded viewer and download link
- Single-file deploys auto-index (no need to name files index.html)
- Unlimited subdomains, free wildcard SSL
- Re-deploy to update, DELETE to tear down
- 100MB max per deployment
https://api.agenturl.dev
Deploy a site
Upload files via multipart form data. Optionally specify a subdomain name.
| Field | Type | Required | Description |
|---|---|---|---|
file | File | Yes* | File(s) to deploy. Can send multiple. |
archive | File | Yes* | A tar.gz archive to deploy. |
subdomain | String | No | Desired subdomain. Random if omitted. |
* Either file or archive is required.
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"
}
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
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
$ curl https://api.agenturl.dev/api/sites/my-report \ -H "Authorization: Bearer tok_c63a0f613256fdfa..."
Delete a site
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
| Status | Meaning |
|---|---|
401 | Missing or malformed Authorization header |
403 | Token doesn't own the requested site |
Subdomain rules
- Lowercase letters, numbers, and hyphens only
- No leading or trailing hyphens
- Max 63 characters
- Reserved:
api,www,admin,mail,ftp,smtp,pop,imap,ns1,ns2 - If no subdomain is specified, a random one is generated (e.g.
swift-eagle-42)
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"
}
| Status | Meaning |
|---|---|
400 | Invalid subdomain or empty deployment |
401 | Missing or invalid auth token |
403 | Token doesn't match site owner |
404 | Site not found |
413 | Deployment 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
| Command | Description |
|---|---|
npx agenturl [path] | Deploy a directory or file (default: current dir) |
npx agenturl list | List all your deployed sites |
npx agenturl teardown <name> | Delete a deployed site |
Options
| Flag | Description |
|---|---|
-n, --name <subdomain> | Custom subdomain name |
-t, --token <token> | Auth token (auto-saved after first deploy) |
-p, --password <pw> | Password-protect the site |
node_modules/ and .git/ from uploads, preserves directory structure, and saves your token to ~/.agenturl/token for future deploys.