AI Authoring

POST/api/author

Generate script

Converts a natural-language prompt into a compiler-validated .ws script.

Request body:

json
{
  "prompt": "Create a 20-second launch teaser with three scenes and a strong CTA.",
  "mood": "confident",
  "aspect": "16:9",
  "validate": true,
  "includeRenderGraph": false
}
Field Type Default Description
prompt string required Natural-language description
mood string confident Mood to apply. Supports confident + elegant
aspect string 16:9 Aspect ratio
validate boolean true Validate through compiler
includeRenderGraph boolean false Return compiled RenderGraph too

Response (200):

json
{
  "source": "Film \"Launch Teaser\"\n  mood: confident\n...",
  "diagnostics": [],
  "metadata": { "sceneCount": 3, "estimatedDuration": 18.5, "mood": "confident" }
}

Brand-Aware Authoring

Mention a URL in your prompt and Workshop's brand resolver extracts colors automatically. Extraction is best-effort — authoring continues if the URL is unreachable.

Self-Healing Validation

When validate: true, the generated script passes through the full compiler. If the LLM produces invalid syntax, the error feeds back for automatic correction. Every returned script compiles successfully.

Next Steps