Generating levels in real time with the Jev model TypeSafe's Jev model generated platformer levels in real time at 319–375 ms latency and an estimated $0.00057 per request, according to a September 15, 2026 test by developer Hugo. The zero-shot classifier, priced at $0.042 per million input tokens with free output tokens, returned structured terrain choices — widths of 2, 3 or 5 blocks, gaps of 0, 1 or 2 blocks, and heights in rows 4–9 — across 5 requests in the demo for an estimated total cost of $0.00286. The test found latency stable over extended play, positioning cheap structured-output models as viable for runtime game generation. Generating levels in real time with the Jev model Hugo - On September 15, 2026, TypeSafe introduced Jev https://typesafe.ai/blog/introducing-system-one-models-and-jev , a model designed to return structured outputs with low latency and low cost. "Eh but that's just a classifier". Ok; but can it generate a platformer level in real time? Let's see Why Jev looks promising for games Unlike text-gen. models such as GPT or Fable, Jev is designed to return structured decisions. In short, it's a zero-shot classifier: it gives you picks with probabilities attached rather than raw text. Now, there are two major bottlenecks to using AI at runtime in games: 1. Latency. In most cases, you can't afford to wait five minutes for a model to think. 2. Cost. Some will disagree, but I think current LLM pricing makes them pointless for games. It makes no sense to me to pay for expensive API calls if I talk more to the tavern keeper. Jev promises to help with both: sub-second responses at $0.042 per million input tokens, with free output tokens. Source https://typesafe.ai/blog/introducing-system-one-models-and-jev Ok. Let's test the claims by fire. Preparing a test game For this experiment, I wanted a runner game prototype in a neon-night style. Serious things here, we'll use Sprite Fusion for pixel art generation, PhaserJS, and Codex with Astra. Ninja Runner assets You Use the Sprite Fusion API https://www.spritefusion.com/docs/pixel-art-generator/api to create a neon-night ninja sprite + animations for a runner game. Codex I created the sprites and animations, and added movement and collisions. Generating levels with Jev Feeding the game state & context First, we take a snapshot of the game state: player position and velocity, current terrain blocks, dash state, etc. We send that in the request to Jev alongside some example terrain layouts. {"x":158.86,"y":86.87,"vx":2.27,"vy":-2.34,"grounded":false,"dash ready":true} Jev request The task we give Jev is fairly simple: given the current game state, how would you fill the next slice of terrain? We ask about widths, gaps, heights and surface types through several choice questions, all sent in one API call. Here are the options we allow: Options we allow - Surface type - Solid roof or one-way ledge - Width - 2, 3 or 5 blocks - Gap before it - 0, 1 or 2 blocks - Height - Rows 4–9 Choices Jev made | The four surfaces from one recorded Jev response. Gap is measured before each surface; row numbers increase downward. | | | | | |---|---|---|---|---| | Surface | Type | Width | Gap before | Height | |---|---|---|---|---| | 1 | Ledge | 2 blocks | None | Row 5 | | 2 | Ledge | 3 blocks | 1 block | Row 6 | | 3 | Ledge | 5 blocks | 2 blocks | Row 5 | | 4 | Solid roof | 2 blocks | None | Row 4 | Terrain built from those choices My code then places the chosen blocks and gaps. So, costs and latency ? - Requests in this demo - 5 - Jev API latency - 319–375 ms - Est. average cost / request - $0.00057 - Est. cost / demo - $0.00286 Well, it's not bad at all. Jev generates the terrain fast enough to keep the runner moving, at a very low cost. It's not sub-100ms latency nor free but interersting enough to pay attention for games. I've played the demo for longer, and the latency stays stable. Level generation keeps working fine. Conclusion Promising There are plenty of ways to generate levels using handwritten rules and heuristics, I know. But still, cheaper and faster structured output models opens up a whole range of ideas and experiments for games. I'm gonna share more soon. Sources and acknowledgments - TypeSafe: Introducing System One models and Jev https://typesafe.ai/blog/introducing-system-one-models-and-jev . - Jev docs: state https://docs.typesafe.ai/concepts/state , choices https://docs.typesafe.ai/primitives/choice , parallel questions https://docs.typesafe.ai/patterns/fan-out , model limitations https://docs.typesafe.ai/model-jaggedness/jev-1.13 and pricing https://docs.typesafe.ai/models . - Sprite Fusion https://www.spritefusion.com/pixel-art-generator : pixel art assets and animations.