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
- Sign up, confirm your email, then open Dashboard → API tokens and create a token. It is shown once.
- Send it as
Authorization: Bearer ash_.... - Each site has its own subscription ($10/month or $100/year). Call
POST /sites/{id}/checkout, give the returnedcheckout_urlto the account owner, and poll the site untilbilling.paidistrue. 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
| Scope | Allows |
|---|---|
read | Read your sites, deployments, domains and traffic |
write | Create sites and manage custom domains |
deploy | Upload new versions and restore the previous one |
checkout | Create 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
| Endpoint | What it does | Scope |
|---|---|---|
GET /api/v1/me | Who am I | any |
GET /api/v1/plans | Plan prices (per site) | read |
GET /api/v1/subdomains/{name} | Is a subdomain available? | read |
GET /api/v1/sites | List your sites | read |
POST /api/v1/sites | Create a site | write |
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 pages | write |
POST /api/v1/sites/{id}/checkout | Get a payment link for this site | checkout |
GET /api/v1/sites/{id}/deployments | List recent deployments | read |
POST /api/v1/sites/{id}/deployments | Upload a new version | deploy |
GET /api/v1/deployments/{id} | Deployment status and analysis report | read |
POST /api/v1/sites/{id}/restore | Restore the previous version (call again to undo) | deploy |
GET /api/v1/sites/{id}/domains | List custom domains and the exact DNS records to create | read |
POST /api/v1/sites/{id}/domains | Add a custom domain | write |
POST /api/v1/domains/{domain_id}/check | Re-check certificate validation now | write |
DELETE /api/v1/domains/{domain_id} | Remove a custom domain | write |
GET /api/v1/sites/{id}/redirects | List redirects | read |
POST /api/v1/sites/{id}/redirects | Add a redirect | write |
DELETE /api/v1/sites/{id}/redirects/{redirect_id} | Remove a redirect | write |
GET /api/v1/sites/{id}/traffic | Traffic totals, daily series and top pages | read |
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.