OpenAI: Pages Unwritten — Build a Choose-Your-Own-Adventure
Build a playable choose-your-own-adventure visual novel with the OpenAI API. Add a storyteller, branching choices, scene backgrounds with gpt-image-1, story-arc tracking, and streaming — one exercise at a time.
View badge details
About This Course
Course Curriculum
3 Lessons
Pages Unwritten Lab 1 — Storyteller and Branching Choices
Wire up the OpenAI client to a working Flask visual-novel shell. In this first lab you'll build a storyteller system prompt that returns live narration, then upgrade to JSON-mode structured output so each scene returns both prose and a fresh list of branching choices.
Pages Unwritten Lab 2 — Images and Story Arc
Pick up where Lab 1 left off — the storyteller and branching choices are already wired in. In this lab you'll generate per-scene background art with gpt-image-1 and extend the JSON schema so the model tracks plot flags, three-act structure, and detects natural endings.
Pages Unwritten Lab 3 — Streaming, Memory, and Voice
Pick up the visual novel from Lab 2 with the storyteller, choices, scene art, and ending detection already in place. In this final lab you'll stream narration token-by-token with bounded memory compression, then add voiced narration with the OpenAI Speech (TTS) API mapped per genre.