# Prompt to Pipeline: Building with Google's Gen Media Stack — Paige & Guillaume, Google DeepMind
<!--
ref: @content/youtube/aie/2026-05-23-prompt-to-pipeline-building-with-google-s-gen-medi
tags: [generative-media, multimodal-models, ai-studio, nano-banana, veo, lyria, text-to-speech, world-models, gemma-4, local-models, vibe-coding, prompt-chaining]
version: 2
updated_at: 2026-11-21T20:58:08.008Z
-->
**[Watch on YouTube](https://www.youtube.com/watch?v=ns9f1fjLD7Y)**
*Synthesized from Paige, Guillaume and Ian Valentine's talk on AI Engineer, 2026-05-23.*
Paige (a Google DeepMind ML engineer who worked on PaLM 2, Gemini and Gemma), Guillaume (a DeepMind developer advocate focused on generative media models) and Ian Valentine (a developer relations engineer on Gemma) give a recap workshop of DeepMind's model stack; there is no host.
*Notes: the transcript spells Guillaume's name several ways ("Guom", "Gom", "Guiam"); the title's spelling is used. Some product names are caption spellings (e.g. "LIA"/"Laya" for Lyria, "VO" for Veo).*
## Core Thesis
Paige argues that most workarounds teams sprint to build (vector databases for tiny context windows, language fine-tunes, agent frameworks, MCP servers) get absorbed into the models, and that Gemini's native multimodal input and output now makes AI Studio a fast path from prototype to app code. Guillaume shows how to chain Gemini with the generative media models (Nano Banana, Veo, Lyria, TTS) into one pipeline that illustrates, animates, scores and narrates a book, and Ian Valentine shows Gemma 4 running agentic and coding work locally.
## Key Insights
- **Things the model absorbs:** Paige notes that 8K and 16K token context windows drove a rush to vector databases, and that the MedLM and MedPaLM fine-tunes were overtaken once that data was folded into Gemini itself; medical users now use base Gemini with retrieval or a custom prompt. She sees skills ("just fancy markdown files") replacing MCP servers.
- **Recent releases:** Gemini 3.1 Flash Live (real-time conversation), Gemini 3.1 Pro and Flash Lite, Nano Banana 2, an embedding 2.0 model that puts video, audio, images, code and text in one space, Lyria 3 for music, Genie 3 for world models, a full-stack runtime in AI Studio with database and OAuth, Gemma 4 under Apache 2, and Veo 3.1 Lite. Augment Code moved its agent infrastructure to default to Gemini 3.1 Pro on cost and performance.
- **Flash Lite economics:** Gemini 3.1 Flash Lite costs about 25 cents per million input tokens, nearly an order of magnitude below 3.1 Pro, and still handles video and audio. A 300-second YouTube clip sampled at about one frame per second came to about 30,900 tokens.
- **AI Studio workflow:** paste a YouTube link with start/end offsets, turn on Google Search grounding, and prompt (e.g. a table of dinosaurs with timestamps and fun facts). "Get code" exports the exact model, config and prompt in TypeScript, Python and other languages. Built-in tools (structured outputs, code execution, function calling, URL context) are one-liners in the API.
- **Code execution:** turning it on gives Gemini a sandboxed Python environment with preinstalled data science libraries. In compare mode, Flash Lite drew bounding boxes around green Lego bricks quickly for pennies; Gemini 3 Flash also verified its work with segmentation masks, at higher cost and more tool calls.
- **Build mode:** similar to v0.dev or Lovable. Paige built "ShelfScan", an app where a Google-signed-in user uploads a bookshelf photo and Gemini with search grounding fills in title, author, description and genre, saved to Firestore. Build supports file uploads, Drive, custom secrets (e.g. Supabase or n8n keys), version history, OAuth and GitHub sync. A WebP upload and then a Firestore permissions error had to be fixed by the agent before it worked.
- **Gemini Live:** one pipeline of speech-to-text, LLM understanding and text-to-speech, with screen share and camera input; language or dialect (e.g. Castilian Spanish) can be set in system instructions or mid-conversation.
- **Genie 3:** a composition of Nano Banana, Veo and Gemini prompting that generates a playable world frame by frame for 60 seconds, with no physics engine and no Unity or Unreal assets, in contrast to World Labs' approach. Access is through an Ultra subscription in some regions.
- **Why separate models:** Guillaume says DeepMind ships separate image, video and music models because one model doing everything would force a full re-release for every feature update. The team ships a new gen media model or capability about every five days on average, and two to three new things a week counting AI Studio changes.
- **Gen media pricing and models:** Nano Banana 2 adds aspect ratios, sizes and image-search grounding (Nano Banana Pro added web search grounding). Veo 3.1 Lite is the cheapest video model at about 5 cents, meant for prompt prototyping. Lyria 3 makes 30-second clips or full three-minute songs with lyrics via API; a separate Lyria real-time model generates music continuously and can be re-prompted like a DJ (demoed as "Space DJ").
- **Book pipeline:** using The Wind in the Willows from Project Gutenberg, Guillaume uploads the book with the file upload API (no bucket setup), uses chat mode so the book stays in history, and structured outputs so prompts come back clean. A system instruction for Nano Banana forbids borders, titles, descriptions and panels and asks for family-friendly output. The style was dark fantasy with black-and-white backgrounds and coloured characters.
- **Character consistency:** keeping all prior images in chat history failed once (the toad came out wrong). The cleaner method is a structured output per chapter listing which characters appear, then passing only those reference images. At scale (e.g. 40 characters) he would make several reference shots per character (front, back, sides).
- **Video prompts:** reusing the still-image prompt for Veo gives weak motion; better to ask the chat for what happens after the image, passing the image back in. He used the largest Veo model, portrait, 720p, with the last image as the starting frame. The full Veo notebook costs about $20; the rest of the notebook is cheap.
- **Gemini writes good media prompts** because much of the gen media models' training data was produced with Gemini.
- **Multi-voice TTS trick:** the TTS model allows two voices, but by having Gemini rewrite a dialogue as a play script with a "Narrator" plus "Character" lines each tagged with a speaking style (pace, accent), all characters can share one voice (captioned "Fener") while the narrator uses Sulafat, and still sound distinct. TTS prompts must start with an instruction like "read this", which is also where tone directions go.
- **Service tiers:** a new setting lets requests run as "flex" (cheaper, may take minutes, similar to the batch API) or "priority" (more reliable, about twice the price). The client can also be initialised with built-in retries, useful when Nano Banana 2 is capacity-limited.
- **Product map:** consumer Gemini apps hide parameters; Vertex AI gives data-residency control but is hard to set up (start there only if already on GCP or with a DevOps team); AI Studio and the developer API sit between, needing only an API key.
- **Open weights:** Guillaume does not expect open image or video gen media models because of safety filtering, though on-device music for real-time use might come. Veo cannot currently take Lyria audio as input; the goal is every model ingesting every modality.
- **Gemma 4 family:** E2B and E4B "effective" models for phones, Raspberry Pis and Jetson Nanos use per-layer embeddings that can sit on flash and be paged in, so the core is about 2B/4B while full RAM footprint is closer to 5B/8B. A 26B mixture-of-experts with 4B active and a 31B dense flagship target laptops, desktops or a single GPU. Thinking is built in; all are multimodal (audio only on E2B/E4B); Ian Valentine says they compete with models about 10x larger and were rebalanced toward coding, function calling and action taking.
- **Local agent demos:** the 26B model in LM Studio needs about 18 GB, roughly 22 GB with context, on an M4 Mac, served on port 1234 as an OpenAI-compatible endpoint. One orchestrator plus 10 sub-agents generated SVGs offline. OpenCode pointed at the local endpoint via a provider block in its config JSON built a game ("Nebula Drift") from a spec written by the 31B, needing a few error-feedback rounds. Other demos: the Google AI Edge Gallery app with on-device agent skills (Android intents, JavaScript skills), an Open Duck robot simulator driven by E2B in WebGPU, Android Studio integration with the 26B, ADK support, and a one-command deploy to an RTX Pro 6000 on Cloud Run.
## Actionable Takeaways
1. Prototype in AI Studio, then click "Get code" to lift the exact model, config and prompt into your app.
2. Try Gemini 3.1 Flash Lite (about $0.25 per million tokens) with code execution on for vision tasks before reaching for Pro, especially if you used Gemini 2.0 or 2.5 Flash.
3. For multi-step media pipelines, upload source files once with the file upload API, keep them in a chat session, and force structured outputs so each generated prompt is parseable.
4. For consistent characters, have the model list which characters appear in each scene and pass only those reference images; create several angles per character at scale.
5. For video, ask Gemini to describe what happens after the still frame, and pass the frame back in, rather than reusing the image prompt; prototype with Veo 3.1 Lite.
6. For multi-character audio, rewrite dialogue as a script with per-character style tags so one TTS voice can play many roles; always open TTS prompts with "read this" plus tone instructions.
7. Use the flex service tier for latency-tolerant jobs and priority only when reliability matters; add client retries.
8. When vibe coding, tell the model to put each feature in its own file and to add logging, so reviews can spot edits that touch unrelated code.
9. To run Gemma 4 locally, load it in LM Studio (or Ollama, vLLM, SGLang), serve an OpenAI-compatible endpoint, and point existing tools such as OpenCode at it; turn thinking on for better planning output.
## Notable Quotes
> "Usually if you see everybody sprinting to do the same thing, that's a great indication that it's the wrong thing." — Paige
> "If you can get it working in AI Studio, you can get it working as part of your app." — Paige
> "On average we are releasing a new model or new capabilities every five days." — Guillaume
> "You kind of got the whole feedback loop just on in the palm of your hand basically." — Ian Valentine
---
*Related: `@content/youtube/sirio-berati/build-ai-apps-with-gpt-5-with-one-prompt` · `@content/youtube/sirio-berati/unlimited-ai-influencer-videos-full-comfyui-infinitetalk-tutorial-setup` · `@content/youtube/cole-medin/make-the-perfect-videos-with-claude-code-full-workflow` · `@content/youtube/starter-story/no-code-10k-mo-apps` · `@content/youtube/sean-kochel/3-step-claude-code-system-pro-level-designs`*
---
*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*
*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*