AI as a feature inside a prototype
Every vibe coding topic so far has been about AI in the hands of the person building the product. The agent writes the code, and the finished product can be anything at all, even with zero AI features inside. This topic is about something else: building AI into the product itself as a feature for the end user. An in-app chat helper, auto-generated product descriptions, voice input, photo recognition. Technically, this means the finished app calls an AI model’s API on its own while it runs. The designer doesn’t use AI once during the build; the product uses AI on the fly, for every one of its users. The agent will still write the code for this. What you bring is well-thought-out screen states and some simple arithmetic.
How this differs from just calling ChatGPT
A user of the product clicks “Generate product description”. That’s nothing like opening a separate ChatGPT tab. The app itself, from its own code, sends a request to the model’s API (the “AI models” topic, the “Tools: chat, plugin, API, agent” topic) with a ready-made prompt written in advance. Then it gets the answer and shows it right inside the product’s interface, without a single extra click. The user may have no idea which model sits behind the button. To them it’s just another feature of the app.
Three typical scenarios for a designer
- Text AI inside the interface — auto-generated descriptions, hints while filling in a form, summaries of long text, a built-in chat helper. Technically, you need to give the agent four things: which model to call, which system prompt to bake into the code, what to show while the answer hasn’t arrived yet, and most importantly, where the API key lives (more on that below). The system prompt here is the same one from the “Foundations” topic. The difference is that now the product writes it, not a chatbot user. Sometimes a scenario doesn’t fit into one model call and needs several steps in a row. For example: “first parse the user’s request, then decide which of three tools to call, then format the answer.” That’s what graph frameworks (LangGraph, for example) are for. They describe a multi-step scenario as a diagram of steps and transitions instead of one big prompt, and each step is a separate node you can check. You don’t have to build this yourself. What helps is knowing this: when a developer says “we have a complex multi-step AI flow”, there’s usually a graph like that on the diagram. It’s a controlled sequence rather than one big prompt. The levels “one agent — pipeline — graph” and typical setups are covered in detail in the “Your own harness” topic.
- Images on the fly — generating an avatar, design variations or a cover right in the user’s flow, without a trip to an external image generator.
- Voice and recognition — voice input instead of typing, dictating a note, recognizing an object in an uploaded photo. The same TTS/STT and multimodality principles apply here as in the “Voice and audio generation” and “Foundations” topics. The difference is that they’re built into the product instead of living as a separate chatbot feature.
Original photo

Flat illustration

Clay

Watercolor

Soft 3D

Turn this portrait into a profile avatar in [flat illustration / clay / watercolor / soft 3D] style, keep facial features and pose, plain background, squareWhat a designer needs to think through, without touching code
- The waiting state. The model’s answer doesn’t arrive instantly. You need a clear “generating” indicator, or a frozen interface looks broken.
- What to show if the model got it wrong or didn’t answer. This follows straight from the graceful failure principle in the “Design principles for AI products” topic. You need a clear fallback, not an empty screen.
- Where the key lives. In a frontend prototype (Lovable, a single HTML file, an artifact), the agent will by default put the API key right into the browser code. Anyone who opens the page can grab it and spend your money. On top of that, the Anthropic API blocks requests from the browser by default (CORS), so the button may not work at all. There’s one rule: the key lives only on the server — in a serverless function, a Supabase Edge Function or an API route. The key itself sits in an environment variable, the
.envfile is listed in.gitignore, and the provider’s console has a monthly spending limit. More on this in the “Securing a vibe-coded project” topic. - The cost of every call. A personal chat has a message limit (the “Plans and limits” topic). Here, every button click by a user costs the product owner real money through the API. A detailed breakdown is just below.
- Trust and labeling the result. If a result is AI-generated and shown as is, say so clearly in the interface. You can’t pass it off as regular product content (see the “Ethics, privacy and limits” topic, the principle of labeling AI content).
What it costs: tokens and unit economics
When the product calls a model’s API on its own, the product owner pays for it, not the user: by input and output tokens (the “Plans and limits” topic, the glossary). The difference from a personal chat is fundamental. There, the cost is spread across a monthly subscription and you don’t notice it. Here, every click on a button is a specific amount you can count, and it directly affects whether the product makes money.
A simple back-of-the-napkin example. A short call to a text model (a prompt plus a couple of paragraphs of answer) costs a fraction of a cent: with Claude Haiku 4.5 and Sonnet 5.5 at October 2026 prices, it’s tenths of a cent per generation. The amount seems invisible until you multiply it by scale. 1,000 users, each clicking “Generate” 5 times a day on average. That’s already 5,000 calls a day. At a rough price of half a cent per call, a real amount adds up over a month. Better to build it into the product’s price up front than to discover it later in the provider’s bill. Image generation, and video even more so, costs orders of magnitude more than one text call (the “Image generation” and “Video generation and editing with AI” topics). If the product’s AI feature generates images or video, redo the unit economics separately. Your intuition from text models will let you down here.
The mechanics are simple. Run them once on paper before the agent starts writing code:
(cost of one call) × (how many times one user calls the feature on average per period) × (number of users) = cost of the AI feature to the business for that period
Then compare that with how much the product earns from one user over the same period. It’s the same principle as choosing a plan in the “Plans and limits” topic, except now you’re on the side of whoever pays the provider, not the chatbot user. Practical design decisions come straight out of this comparison: a generation limit on the free plan, a paid allowance beyond it, caching identical requests instead of generating again, a cheaper model where the quality difference doesn’t matter for the task.
How to brief the agent
Add a “Generate description” button to the product creation form: on click, send the product name and category to the model [model]. Call the model only through the server function /api/generate; the key comes from an environment variable and never ends up in client code. States: loading with a spinner, network error and a 20-second timeout with clear text, empty response. Insert the result into the description field, editable by hand. Before writing code, tell me where the server function will live in this project.
Command examples for practice
Come up with 3 places in the app [describe the product] where an AI feature actually solves a user problem, rather than being added just to have AI
Design the loading state and the error state for a ‘Generate with AI’ button — what the user sees in each case
We’re planning to allow unlimited image generation in the app. Model: [name], price per image: [price from the provider’s site]. Active users: 1,000 a month, [N] generations per person on average. Calculate the monthly API cost and suggest a reasonable limit. Use only my numbers, don’t add your ownWithout the model, price and volume, the model will pull a number out of thin air.
Our product’s plan is $10/month, the AI feature is text generation, called 8 times per user per month on average. Model [name], price $[X] per million input tokens and $[Y] per million output tokens, an average call is [N] input tokens and [M] output tokens. Estimate the API cost per user and tell me what share of the plan goes to this feature
Check this screen with an AI feature for labeling: is it clear to the user that the result was generated rather than written by a personAdd one small AI feature to any of your vibe-coded prototypes (a “generate” button for something). But before you ask the agent to build it, design the waiting state and the error state on paper first. Only then hand the task to the agent.
Sources
- TypeScript SDKplatform.claude.com
browser use is off by default so the key doesn’t leak
- LangGraph overviewdocs.langchain.com
a framework for multi-step agents built as a graph
- AI SDK Introductionai-sdk.dev
a library for calling models from a product, with streaming
Found a mistake or an outdated fact? Write to hey@iskra.guide