Sites
Alternate deploy entrypoint into the SAME org-scoped projects store: build a site from a brief, or deploy a raw file manifest.
Alternate deploy entrypoint into the SAME org-scoped projects store: build a
site from a brief, or deploy a raw file manifest. Not a second store — each
call ensures a project and records a deployment through the one publish
core, exactly as /v1/projects/{slug}/deploy does.
| Base URL | https://api.hanzo.ai |
| Operations | 7 |
| Auth | Authorization: Bearer $HANZO_API_KEY |
sites
post_v1_sites_by_slug_publish
POST /v1/sites/{slug}/publish
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | yes |
post_v1_sites_by_slug_releases_by_release_activate
POST /v1/sites/{slug}/releases/{release}/activate
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | yes | |
release | path | string | yes |
get_v1_sites_by_slug_releases
GET /v1/sites/{slug}/releases
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | yes |
post_v1_sites_by_slug_releases
POST /v1/sites/{slug}/releases
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | yes |
Deploy a raw file manifest
POST /v1/sites/deploy
Deploy a caller-supplied file manifest (the same {path, content} shape
the brief build emits) through the one publish core. Every file passes the
same guards as the brief build: index.html required at the root; absolute
and traversal paths rejected; a mobile viewport tag injected into HTML
when absent. Writes into the SAME org-scoped projects store as
/v1/projects: it ensures a project (framework static) for the
resolved slug and records a deployment. /v1/sites is the
brief-build/raw-manifest entrypoint; /v1/projects/{slug}/deploy is the
artifact/git entrypoint — one store, one publish core, not a second copy
of project state. Responds 200 with the published-site result.
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
files | projects_SiteFile[] | yes | Site files (required, non-empty); index.html must be present at the root. |
slug | string | — | Target project slug; derived from name (or minted "site-<token>") when omitted. |
name | string | — | Display name; defaults to "Site". |
List the org's live sites
GET /v1/sites
List the org's live projects as sites at their canonical live URL
https://<slug>.<apex>. Reads the SAME org-scoped projects store as
/v1/projects; a project that is not live is omitted.
Build a site from a brief and deploy it
POST /v1/sites
Generate a self-contained, mobile-responsive static site from a
natural-language brief (one inference call), then deploy it through the
one publish core. Writes into the SAME org-scoped projects store as
/v1/projects: it ensures a project (framework static) for the
resolved slug and records a deployment. /v1/sites is the
brief-build/raw-manifest entrypoint; /v1/projects/{slug}/deploy is the
artifact/git entrypoint — one store, one publish core, not a second copy
of project state. The brief is capped at 8 KiB. Responds 200 with the
published-site result.
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
brief | string | yes | Natural-language description of the site to generate (required; capped at 8 KiB). |
slug | string | — | Target project slug; derived from name (or minted "site-<token>") when omitted. |
name | string | — | Display name; defaults to the generated site name, else "Site". |
model | string | — | Inference model override; empty selects the gateway default. |
How is this guide?