How to add live AI video to your app and pay per second
Add live AI video to your product: choose a model, connect a session, stream frames, send controls and estimate ready-second costs with Windflow.
To add live AI video to an app, hold a session with a realtime model, stream its frames to your client, send controls while it runs, and release the session when the user leaves. On Windflow you pay per ready session-second, from $0.0017, so cost follows how long people actually use the experience.
This guide covers the decision you make first, the shape of the integration, the product states you have to design, and how to keep cost predictable.
Step 0: decide what the video does
Pick the interaction before the model. Realtime models fall into three jobs:
| Your product needs to | The job | Models to look at |
|---|---|---|
| Generate video that keeps going and can be steered by text | Continuous generation | Helios, LongLive-2.0, LTX-2.5 |
| Let a user move through a generated place | Navigable world | LingBot-World 2.0, Matrix-Game 2.0, DreamX-World-5B, ABot-World-0-5B |
| Change a live camera feed or a clip with a text instruction | Live editing | SANA-Streaming, JoyAI-Video-Edit |
Each model page lists its inputs and controls, so you can check that the model accepts what your product has: a prompt, a reference image, a seed image, a webcam track or movement keys.
The integration in five steps
Every Windflow integration is an elaboration of the same five steps:
| Step | What happens | Where it runs |
|---|---|---|
| 1. Mint a token | Your server exchanges its API key for a short-lived session token | Your server |
| 2. Create or join a session | The client asks for a model and is placed on GPU capacity | Client |
| 3. Wait for ready | The session moves from queued to ready; frames start only now | Client |
| 4. Steer the model | The client sends prompts, images, movement or other controls | Client |
| 5. Release | The owner ends the session and hands the GPU back | Client or server |
Two details matter for safety and cost:
- The API key stays on your server. Browsers, mobile apps and notebooks only ever see a short-lived token, which can be bound to one model and one session.
- Release is part of the integration, not cleanup. A ready session bills until it is released or reaches the model's session ceiling.
Control goes over a REST control plane. Media goes over WebRTC or a WebSocket; see streaming video diffusion over WebRTC or WebSocket for how to choose.
Design the states, not just the happy path
Capacity is brought up on demand, so a normal connect includes waiting. Treat these as real product states:
- Queued or waiting. The session payload carries a queue position, so show progress instead of a frozen spinner.
- Ready, first frame pending. For windowed models the first frame can arrive a full window after ready. Show a loading frame that says what is happening.
- Streaming. Render controls that reflect what the model supports. A world model with no text input should not show a prompt box.
- Reconnecting. The documented reconnect grace is not billed; resume the session rather than starting a new one.
- Offline. If a model has no capacity at that moment, say so and offer a live demo request, the way the model pages do.
- Ended. Always release on exit, including tab close and error paths.
Acknowledge a control immediately, then update the interface when the change is visible on screen. A prompt or key press is received before it is applied, and applied before the viewer sees it.
Get the cost shape right
A session costs its rate times its ready seconds. Four habits keep it predictable:
- Release the session as soon as the user is done.
- Cap session length per user with a token budget.
- Share one session among viewers when many people watch the same stream; extra viewers are not billed.
- Prototype on the lower-priced models, then move up only if you need generated audio or a larger model.
How per-second pricing works has the full price table and worked examples. As a reference point, a 10-minute Helios session costs $1.02 and a 10-minute LingBot-World 2.0 session costs $1.44.
What to test before you launch
- A full session from token to release, including the failure paths (denied token, no capacity, dropped connection).
- Behaviour on a slow or lossy network, on the transport your users will actually have.
- The control-to-visible delay, measured from the client.
- The bill for a realistic day of usage, using peak concurrency, not the average.
FAQ
How do I add a live AI video model to my app and pay per second?
Hold a session with a hosted realtime model, stream its frames to your client, steer it with controls, and release it when done. On Windflow the meter runs only while the session is ready, at $0.0017 to $0.0069 per second depending on the model, with no subscription.
Do I need to run GPUs myself?
No. Windflow places each session on NVIDIA or AMD GPU capacity and brings that capacity up on demand. You handle the product; the platform handles streaming, session state, placement and metering.
Can the user's browser talk to Windflow directly?
Yes, with a short-lived token minted by your server. Never ship an account API key in browser or mobile code.
Which model should I start with?
Start with the one that accepts the inputs your product already has. For a text-only prototype, Helios is the lowest-priced and needs only a prompt. For an explorable scene, start with a world model such as LingBot-World 2.0. For a webcam effect, start with SANA-Streaming.
Is there a free way to try it?
Approved accounts start with $5 of usable balance and four concurrent sessions. Request access.
