STUDIO CONSOLE — COMPOSE

ANTHROPIC_API_KEY · NOT SET Canvas mode (v0.2) Back to dashboard

SET ANTHROPIC_API_KEY FIRST

Compose calls Claude Haiku to formalize your script into a project YAML. The console reads ANTHROPIC_API_KEY from your environment at server start. Set it and restart STUDIO.bat (or python -m studio.console):

set ANTHROPIC_API_KEY=sk-ant-...

The key is server-side only; never returned to the browser.

COMPOSE A NEW PROJECT

Pick a video type, pick characters, pick a scene, set style and intensity, type or paste a script. One Haiku call (~$0.0015 cached) formalizes it into a project YAML and writes it to tv/studio/projects/. From there, render via the dashboard.

0.0
Use your own Anthropic API key — skip the demo quota; key stays in your browser, sent only in transit for one Haiku call, never stored or logged
Saved to your browser's localStorage. Never sent to anyone except api.anthropic.com (in this version, transit-only via the studio server; full browser-direct mode coming). Your one-Haiku-per-IP demo quota is bypassed when you supply a key.
clear saved key · get a key
composing… (~5s)

HOW IT WORKS

  1. Validate inputs — preset / scene / style / cast / intensity / length all checked against allowlists server-side.
  2. Build prompt — stable cast roster + scene catalog + preset structure cached via prompt caching (cache_control: ephemeral). Volatile script appended after. Repeat calls re-price only the script delta.
  3. Single Haiku callclaude-haiku-4-5, structured output via output_config.format with a JSON schema. Haiku returns a segment list with speakers, emotions, camera moves, scene names.
  4. Validate response — every segment's enum values (speaker, emotion, scene, camera_move) checked against the same allowlists.
  5. Write YAML — to tv/studio/projects/_compose_<slug>.project.yaml. Path-traversal-safe.
  6. Render — go back to the dashboard and click Render on the new project.

Total cost per video: ~$0.0015 with cache hit, ~$0.015 cold start. See studio/console/compose.py for the full implementation.