Inspiration

This app was a natural progression to my project Samsar, the 1-shot T2V agent. The technical implementation was the main impetus, after the implementation was done the only challenge remaining was: What is the use of this technology, This could be either continue accelerate the way things are going and fill the internet with more effective visual brain-rot or be something different - A tool to discover and to learn and to satisfy curiosities.

What it does

It creates interactive grounded videos upto 3 minutes duration, upto 3 levels of branching depth from a single text prompt. Creators and educators can choose the model settings (including inference, video and image models for their content)

How we built it

I built it using intuition developed over three years and experience building text to video agents. I was building the intial framework for a while, approaching the very same outcome. Codex with GPT 5.6 Sol, allowed me to speed up the process and timeline and reach the intended goal faster and more efficiently. The app is built with NextJS and uses SamsarJS stack for render and auxiliary functions.

Challenges we ran into

Building was easy, running into production I ran into several operational issues-

  1. Slow inference for branching narrative.

When doing linear render slower inference with high thinking doesn't seem to be much of an issue, but when branching the narrative over deeper levels, slow inference increases the render time and high thinking budget can eat up token spend. After observing over several experiements, I concluded that GPT 5.6 with xHigh settings was too slow for branched render, so I reduced the thinking level to high. Also when attempting branch render with other inference models, I found that only Gemini-3.1 was able to successfully complete branched narratives without going into retry loops, while Qwen 3.7 could complete this when called via native adapters and went into long retry loops when called via external adapters.

  1. Deleting nodes upon repeat failure or low judge score.

When running single stage I2V pipeline deleting nodes on repeat failure is straight-forward, Hust remove the node, link the next node to the previous one and reflow the timeline, however in branched render it gets a bit more complicated , deleting a node means deleting all the child nodes too. We had to handle the image scoring threshold failure for branched renders since on delete layer the timelines need to be reflowed differently.

  1. No existing web standards for rendering or handling interactive video media.

After building the framework and POC, I set out to find existing standards around web players to handle interactive movies only to find out there are none. (I supposed the creators of the HTML spec had not imagined that 1-shot interactive video pipelines would be a thing anytime soon) So me and GPT 5.6 set out to create our own standards for handling interactive video resources as well as a standard for interactive video player.

  1. Ok we have the tech, now what?

Building the tech has now become the easier part, the harder part is handling edge-cases in production and calibrating the agent around productive use-cases. After building the initial version, I set out to refine the grounded T2V branched render pipeline around educational and technical content and use-cases as well as testing the interactive video pipeline to verify which models could handle grounded technical content effectively.

Accomplishments that we're proud of

  1. Built the world's first interactive film creator and viewer.

  2. Built upon the Samsar JS stack, Full Featured Text to Video (and now to Interactive-Video) engine. Also built entirely using Codex (and previously ChatGPT web)

  3. Both client and render engine are fully open-source tech under MIT license.

What we learned

Beyond implementing the tech, refining it to handle the various constituent models so that it behaves consistently across settings becomes paramount as the complexity of the pipeline increases, for instance some image model adapters during certain periods of time will consistently return unrelated or incorrect images, which can be handled in the linear pipeline but repeat low-quality image results breaks the branched pipeline, so we had to enforce a more constrained set of rules and model settings for the branched pipeline.

What's next for TMochiLearn

The project and the underlying engine is completely open-source for academic and industry collaboration. My plan is to work with enterprises and educators, to implement interactive technical content, training material etc. customized to their internal knowledge-base and to their specific needs. Consumers can further use the open-source project to run their own inference and create personal technical content libraries using models and adapters of their choice.

Built With

Share this project:

Updates

posted an update

TMochiLearn Post-Submission Update

OpenAI Build Week

Hi everyone, just wanted to share a few updates that were made to backend and frontend of the TMochiLearn application- Create interactive ed-tech videos from simple text prompts. TMochiLearn now uses a focused model set, smoother path playback, and scene-based render pricing.

While all supported inference models work great for the singular text-to-video pipeline, interactive, branched videos is the next frontier. To ensure that Samsar pipeline works predictably and reliably in interactive media generation pipelines we constrained the inference, image and video models for this pipeline. See the updated model matrix and changes below-

Constrained Model Pipeline

Inference Models

Model Effort Request value
GPT-5.6 Sol High — default gpt-5.6-sol + high
GPT-5.6 Sol Extra High gpt-5.6-sol + xhigh

Both options use the same GPT-5.6 Sol model with different reasoning effort.

Image Models

Model Request value
GPT Image 2 GPTIMAGE2
Nano Banana Pro NANOBANANAPRO

Video Models

Model Request value Production rate
Nvidia Cosmos 3 COSMOS3SUPERI2V 20 credits/second
Veo 3.1 VEO3.1I2V 60 credits/second
Veo 3.1 Fast VEO3.1I2VFAST 36 credits/second
Seedance 2.0 SEEDANCE2.0I2V 40 credits/second

Available options depend on the connected deployment.

Runtime Model Validation

  • Creator Studio loads model availability from the server.
  • Only models marked compatible with branching are displayed.
  • Every selection is validated again before generation.
  • Generation is disabled when a required model stage is unavailable.
  • Saved selections are restored only while they remain supported.
  • Models are submitted explicitly without silent substitution.

Improved Path Playback

  • The selected path is mounted and preloaded immediately, including on mobile.
  • Only the chosen next-path video is buffered after a route is selected.
  • Playback continues from the correct decision point.
  • Volume, mute, and playback-speed settings remain unchanged across transitions.
  • Path-map changes resume from the latest point where the routes diverge.

Scene-Based Render Pricing

Final billing is based on the distinct scenes generated, not the number of final branches.

render credits = total unique rendered scene-seconds × video-model rate
  • Shared scenes, transitions, and outros are counted once.
  • Each unique branch-specific scene is counted once.
  • Narrative generation is included in the interactive-video rate.
  • Only completed stages are charged.
  • Duplicate stage charges are prevented.

If two 20-second paths share their first 10 seconds, TMochiLearn bills 30 unique scene-seconds instead of 40 path-seconds.

Creator Studio shows a conservative Estimated up to value before generation, followed by Charged so far and the final Credits charged.

Workflow Improvements

  • Model and reasoning settings persist across resumable sessions.
  • Stable request identifiers reduce duplicate submissions.
  • Newly catalogued models remain compatible with older SDK versions.
  • Real API errors are returned without automatic retries.
  • Standalone deployments use provider billing without production credit redirects.

Result

TMochiLearn now delivers more consistent model selection, smoother interactive playback, and pricing based on the media actually generated.

Log in or sign up for Devpost to join the conversation.