sites-ai

Create a site from an AI prompt

Runs structured LLM calls (Vercel AI Gateway): a site plan then one blocks call per planned static page (up to six: home plus optional about/pricing/contact/blog, etc.), then persists like POST /api/v1/sites. Generation uses baked.supply-inspired layout variants (floating-card heroes, collage heroes, dark-band features, tier-highlight pricing, etc.) and expressive block types when the brief fits. For a two-step flow with plan review, use POST /api/v1/sites/generate/plan then POST /api/v1/sites/generate/from-plan. Image URLs: Unsplash + Blob when configured; otherwise Picsum placeholders.

post/api/v1/sites/generate

Request

  • Base URL: https://slatehut.com
  • URL: https://slatehut.com/api/v1/sites/generate
  • Auth: HTTP bearer

Request body

promptstring required

Natural-language description of the site to build (business, audience, tone).

subdomainstring

Optional; same rules as CreateSiteRequest.subdomain. Random site-xxxxxxxx if omitted.

includeCmsboolean

Deprecated; ignored. Generation produces one home page only.

templateIdstring

Optional; same ids as GET /api/v1/templates / CreateSiteRequest.templateId. Biases plan and theme toward that starter.

Response

Created

subdomainstring required
urlstring required
generationWarningsstring[]

Optional post-generation quality hints (e.g. low block-type diversity). Site is still persisted.

Changes

No recorded changes to this operation across all 1 revision of this API.