Pages

Regenerate AI page

Changed on

Generates a new HTML document from a new prompt and replaces the page with it. Responds with an application/x-ndjson stream, one JSON event per line: start (maxOutputTokens), heartbeat (elapsedMs, outputChars) at least every 10 seconds while the page is generated, then exactly one terminal event - done (page) or error (code, status, message). code is prompt_rejected (400), generation_failed (502), generation_timeout (504), link_refused (the status the link write was refused with) or internal_error (500). Refusals decided before generation starts are ordinary JSON replies with their status code.

put/links/page/{id}

Request

Path parameters

idstring required

Link id string

Request body

promptstring required

What the page should be. The HTML is generated from it and cannot be edited directly

Example request

{
  "prompt": "A one-page menu for a small Italian bakery, warm colours, with opening hours"
}

Changes