Builder

Start a new AI-built project from a prompt: creates a project, seeds the starter template and returns the session

post/builder/sessions

Request

  • Base URL: https://hostingsurge.com/api/v1
  • URL: https://hostingsurge.com/api/v1/builder/sessions
  • Auth: one of:
    • HTTP bearer
    • API key in cookie __Host-hs_session

Query parameters

orgIdstring

Request body

promptstring required

First message; used to name the project and sent as the first chat turn

namestring

Project name; derived from the prompt when omitted

templatestring

Starter template id (an unknown id is refused with the list of ids), or "auto" for the one whose kind of site the prompt describes (a restaurant, a blog, documentation…; the default template when none fits). Default: "default"

Response

Created

idstring uuid required
organizationIdstring uuid required
projectIdstring uuid required
titlestring required
status'active' | 'archived' required
templatestring required
modelstring required
escalationModelstring nullable required
turnCountinteger required
lastCommitShastring nullable required
editVersioninteger

Live editing: the files' version for preview editors (+1 per edit batch)

pendingEditsinteger

Live editing: preview edits not yet saved as a version (saved within 20 seconds)

firstDraftReadyboolean

Builder v2: a turn has finished successfully, so the site has a first draft (the dashboard shows the live preview only from then on)

publishedUrlstring nullable

Builder v2: the live address after the last successful publish

createdAtstring required

ISO-8601 timestamp

updatedAtstring required

ISO-8601 timestamp

Changes

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