AISiteHosting

Developers and AI agents

API

Create sites, upload a zip, read the analysis report, manage custom domains and see traffic, from scripts or an AI agent. A person signs up, creates a token and pays; the agent does the rest.

Get started

  1. Sign up, confirm your email, then open Dashboard → API tokens and create a token. It is shown once.
  2. Send it as Authorization: Bearer ash_....
  3. Each site has its own subscription ($10/month or $100/year). Call POST /sites/{id}/checkout, give the returned checkout_url to the account owner, and poll the site until billing.paid is true. Agents never handle card details.
export TOKEN=ash_xxxxxxxx
API=https://aisitehosting.com/api/v1

curl -s $API/me -H "Authorization: Bearer $TOKEN"
curl -s $API/subdomains/my-shop -H "Authorization: Bearer $TOKEN"
curl -s -X POST $API/sites -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
     -d '{"name":"My Shop","subdomain":"my-shop"}'
curl -s -X POST $API/sites/$SITE/checkout -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"plan":"monthly"}'
curl -s -X POST $API/sites/$SITE/deployments -H "Authorization: Bearer $TOKEN" -F archive=@site.zip
curl -s $API/deployments/$DEPLOYMENT -H "Authorization: Bearer $TOKEN"

Deployments

Uploading returns 202 with a deployment. Poll it until status is deployed, failed, rejected or needs_review. The report lists security, error, SEO and AI-search findings with scores, so an agent can fix a failed upload and try again. Static sites only: PHP and server code are rejected.

Scopes

ScopeAllows
readRead your sites, deployments, domains and traffic
writeCreate sites and manage custom domains
deployUpload new versions and restore the previous one
checkoutCreate payment links (you still pay in your browser)

Tokens cannot delete sites, change billing details or reach admin features. Limits: AISiteHosting.com API allows a fixed number of requests per minute and deploys per day per account; exceeding them returns 429 with Retry-After.

Endpoints

EndpointWhat it doesScope
GET /api/v1/meWho am Iany
GET /api/v1/plansPlan prices (per site)read
GET /api/v1/subdomains/{name}Is a subdomain available?read
GET /api/v1/sitesList your sitesread
POST /api/v1/sitesCreate a sitewrite
GET /api/v1/sites/{id}Get a site (status, billing, domains, 404 behaviour)read
PATCH /api/v1/sites/{id}Choose what visitors see for missing pageswrite
POST /api/v1/sites/{id}/checkoutGet a payment link for this sitecheckout
GET /api/v1/sites/{id}/deploymentsList recent deploymentsread
POST /api/v1/sites/{id}/deploymentsUpload a new versiondeploy
GET /api/v1/deployments/{id}Deployment status and analysis reportread
POST /api/v1/sites/{id}/restoreRestore the previous version (call again to undo)deploy
GET /api/v1/sites/{id}/domainsList custom domains and the exact DNS records to createread
POST /api/v1/sites/{id}/domainsAdd a custom domainwrite
POST /api/v1/domains/{domain_id}/checkRe-check certificate validation nowwrite
DELETE /api/v1/domains/{domain_id}Remove a custom domainwrite
GET /api/v1/sites/{id}/redirectsList redirectsread
POST /api/v1/sites/{id}/redirectsAdd a redirectwrite
DELETE /api/v1/sites/{id}/redirects/{redirect_id}Remove a redirectwrite
GET /api/v1/sites/{id}/trafficTraffic totals, daily series and top pagesread

Machine-readable: OpenAPI 3.1 spec. Errors always look like {"error": {"code": "...", "message": "..."}}.

Command-line tool

A small Python tool (3.9+, no dependencies) that zips a folder, uploads it and prints the analysis report.

pipx install https://aisitehosting.com/downloads/aisitehosting-1.0.0-py3-none-any.whl      # or: pip install https://aisitehosting.com/downloads/aisitehosting-1.0.0-py3-none-any.whl
aisitehosting login                # paste your API token
aisitehosting create my-shop
aisitehosting checkout my-shop --plan monthly --wait     # prints a link; you pay in the browser
aisitehosting deploy my-shop ./dist
aisitehosting domains my-shop --add example.com          # DNS records for hosts with and without ALIAS
aisitehosting --json status <deployment-id>               # JSON for scripts

Exit codes: 0 ok, 1 error, 2 deployment failed or rejected, 3 payment required, 4 needs manual review. Download: aisitehosting-1.0.0-py3-none-any.whl · SHA-256 69b26c9301464cc1cc1ff11c41a732c8e15ebb69574bff807744a94060c97379

AI assistants

With the MCP server (Claude Desktop, Cursor and other MCP clients). Install it with the mcp extra, then add it to your assistant's configuration:

pipx install 'aisitehosting[mcp] @ https://aisitehosting.com/downloads/aisitehosting-1.0.0-py3-none-any.whl'
{"mcpServers": {"aisitehosting": {
  "command": "aisitehosting-mcp",
  "env": {"AISITEHOSTING_TOKEN": "ash_..."}}}}

The assistant can check subdomains, create sites, deploy a folder, read the analysis report and fix problems, and manage domains. For payment it gets a checkout link that you open yourself: it never handles card details.

Without installing anything: give any assistant that can call web APIs the OpenAPI spec and your token, and ask it to follow the flow above.