Skip to main content
The API at https://api.getsite.ai/v1 is the same one the app uses. API access is part of the Agency plan.

Get a key

Go to app.getsite.ai/account/api-keys, name the key and click Generate key. Copy it right away; it is shown once. Keys look like gsk_ followed by 64 hex characters. Up to 10 active keys. Revoke is immediate and permanent. Keys stop working while your plan has no API access and start working again when it does.

Authenticate

A missing or bad key returns 401 with a plain-text Unauthorized body, not JSON. Call the API from a server, a CLI or an agent. Browsers on other origins are blocked.

Reference

The interactive reference is a Swagger UI at api.getsite.ai/docs. It is behind a login; the credentials are on the API Keys page under Show Credentials. The same page has Generate Skill, a prompt that teaches an AI coding agent to use the API with your key.

Build and publish a site

Generation is asynchronous: start a run, poll it, then publish.
1

Create the website

Returns the website with its _id. No AI runs yet.
2

Create the home page

If prompt is omitted the page inherits the website prompt.
3

Generate it

Returns {"page_id": "...", "run_id": "..."}. Credits are checked first: 20 for the page (40 with claude-fable-5-1), plus 10 with generate_images. The API never pauses a run to ask questions.
4

Poll the run

Poll every few seconds until status is completed, failed or stopped. GET /v1/runs/RUN_ID/events streams the same progress as Server-Sent Events. The result is the page’s draft version. POST /v1/runs/RUN_ID/stop cancels for free until code generation starts; after that it returns 409 too_late.
5

Publish

domain is getsite.co (default) or getsite.online. subdomain and domain only count on the first publish: once the site has an address, every later deploy of any of its pages goes there and both fields are ignored. For a custom domain, add it with POST /v1/domains, link it with PUT /v1/websites/WEBSITE_ID {"domain": "DOMAIN_ID"} (this re-points every page of the site), then deploy without subdomain. Publishing requires an active paid plan.
Add more pages by repeating steps 2 to 4 with another path. The home page must be generated first; other pages return 409 homepage_not_generated until then. POST /v1/tools/suggest_pages {"prompt": "..."} proposes a sitemap for free. To write a page without AI: POST /v1/websites/WEBSITE_ID/pages/import {"path", "name", "html", "css", "javascript"} creates a page from your code (not for /). To replace the code of an existing page, including the home page, save a version: POST /v1/versions {"page_id", "thread_id", "html", "css", "javascript"?}, where thread_id is a thread on that page from POST /v1/threads. Then deploy.

Models

model is accepted by POST /v1/pages/:id/generate and POST /v1/edit/turn. Unknown ids return 400. A model your plan does not allow silently falls back to the default and is billed at the default rate.

Edit a page with AI

POST /v1/edit/turn {"page_id", "message", "thread_id"?, "model"?, "attachments"?} runs one turn of the editor chat and streams the result as Server-Sent Events. The first event, turn_start, carries the thread_id; pass it on the next call to continue the conversation, otherwise every call starts a new thread with no history. One turn per thread at a time (409 turn_in_progress). Messages up to 10,000 characters, up to 4 image URLs. Costs 10 credits plus 10 per 50 KB of page code, times the model multiplier. A reply that changes nothing is free.

Endpoints

Campaigns and experiments endpoints are in the Swagger reference; CMS endpoints are not yet. Plan gates and credit costs are the same as in the app. Registering a domain starts with POST /v1/domains {"domain", "mode": "register", "purchase_years"} and POST /v1/lemonsqueezy/checkout {"domain_id"}, which returns a checkout URL to open in a browser. Deleting a website deletes its pages and unlinks its domains. Deleting a site’s last page deletes the website.

Pagination

List endpoints take limit and page. page starts at 0, except the Leads endpoints, where it starts at 1.

Errors

Errors are JSON: {"error": true, "message": "..."}. POST /v1/tools/deploy and POST /v1/versions answer bad input with a 500 and a message.

Rate limits

Per route, per account (all your keys share one bucket), in 15-minute windows. Default 100 requests. Create and publish writes are lower: POST /v1/websites, POST /v1/websites/:id/pages, POST /v1/websites/:id/pages/import and POST /v1/pages/:id/generate 30, POST /v1/tools/deploy 50, POST /v1/edit/turn 200. Most list and detail reads are higher (1,000 to 5,000); analytics reads and GET /v1/leads/export stay at 50 to 500. Request bodies are limited to 5 MB.