# v0 API in 2026: How It Works, Token Costs and the Best Alternative

> v0 API explained for November 2026: what Vercel's app-building API does, token rates per model, how to pay, what you still build, and the best alternative.

Published: 2026-10-18 (updated 2026-11-30)

The v0 API is Vercel's programmatic access to the v0 agent: your server sends a prompt, v0 writes a full-stack Next.js app inside a Vercel Sandbox, returns a live preview you can show in your own product, and can deploy the result to Vercel. Usage is metered in model tokens and paid from v0 credits. This guide covers what the v0 API does as of November 30, 2026, the token rates we read that day, the parts you still have to build, and how it compares with the Lovable API and the Totalum API if you want to launch a white-label AI app builder or add app generation to your SaaS.

**Updated November 30, 2026.** Sources: v0.app/pricing, v0.app/docs/api/v2, docs.lovable.dev, lovable.dev/pricing and totalum.app, all read on November 30, 2026, plus our own Totalum API usage data for November.

![v0 API 2026: a prompt flowing through a sandbox into a branded app builder](https://files.totalum-project.com/p/agentum-database/01M573Y0NJS77ZSJC8VP9JECZ8.png)

## Quick Answer

The v0 API (v2, generally available since August 5, 2026) lets your product create and edit apps with v0's agent, embed sandboxed previews and deploy to Vercel. It bills model tokens from v0 credits: v0 Mini costs $0.10 input and $0.50 output per million tokens, v0 Pro $2 and $10, v0 Max $4 and $20.

- **What you get:** the generation agent, streaming and webhooks, previews in a Vercel Sandbox, one-call deploys, an MCP server and a TypeScript SDK (`npm install v0`).
- **What you still build:** a preview proxy on a separate domain, a trusted-hosts list, integration installs through the Vercel API, your users' accounts, and how you bill them for token usage.
- **Lovable API:** manages and deploys existing projects (Business plan, $50 a month, or Enterprise); it does not create apps, that happens through Lovable's MCP server.
- **Totalum API:** one key creates apps that already have a SQL database, sign-in, Stripe payments and Cloudflare hosting, on every plan including Free, with credits from $0.07 and per-project caps. Our 32 test builds in November used a median of 46.1 credits each.

**Launching your own AI app builder?** See how the [Totalum white-label AI app builder](https://www.totalum.app/en/whitelabel) works, or go straight to the [API docs](https://www.totalum.app/docs/api/overview).

## What the v0 API does in November 2026

Vercel calls the current version simply "the v0 API" (older guides and the Vercel blog still say "v0 Platform API", which was the v1 name). The [v2 docs](https://v0.app/docs/api/v2) describe four core workflows: generate and iterate on apps through the Chats and Messages endpoints, build a custom chat interface with `@v0-sdk/react` and the AI SDK, embed live previews through authenticated iframe URLs, and plug app generation into other agents through the v0 MCP server or AI SDK tools.

The fastest start is the official template, `npx create-v0-sdk-app`, which ships a React chat UI, server proxy routes, a file viewer and an isolated preview app. You create a key in v0 settings and keep it server-side as `V0_API_KEY`; the docs are explicit that it must never reach browser code.

### What changed since our October review

The v2 guides grew noticeably in November. The additions that matter if you are building a product on top of v0:

- **Pool credit limits (beta).** On Plus, Business and Enterprise teams, endpoints under `/v2/pool-credit-limits` cap how much of the team's shared credit pool each member can spend per billing cycle (unlimited, none, or a USD amount). Useful for internal teams; it caps team members, not your end customers.
- **Design Mode over the API.** A browser bridge (`createDesignModeBridge`) lets users click and edit elements in the preview, and your backend saves the edits as a normal message. There is also a headless variant with structured input.
- **Security reviews.** Ask "Run a security check" in a message and v0 runs a DeepSec review (missing auth checks, injection, SSRF) on up to 50 of the riskiest files, then lists confirmed findings with severity and a suggested fix. A review can take up to 15 minutes and is paid in v0 credits like any other message.
- **Trusted preview hosts.** Before a preview works inside your product, you register the hostname of your preview proxy with `setPreviewHosts` (up to 100 patterns per team).
- **Template sync.** `chats.syncTemplate` republishes a Git-connected template at the commit of its latest production deployment, so a GitHub Action can keep starter templates current.

## v0 API token rates on November 30, 2026

All API work is charged in model tokens and drawn from the same v0 credits as the v0 app. These are the rates published on [v0.app/pricing](https://v0.app/pricing), read on November 30, 2026:

| Model | Input (per 1M tokens) | Cache write | Cache read | Output (per 1M tokens) |
|---|---|---|---|---|
| v0 Mini | $0.10 | $0.125 | $0.01 | $0.50 |
| v0 Pro | $2 | $2.50 | $0.10 | $10 |
| v0 Max | $4 | $5 | $0.20 | $20 |
| v0 Max Fast | $8 | $10 | $0.40 | $40 |

Above 272K input tokens, v0 Mini moves to $0.20 input, $0.25 cache write, $0.02 cache read and $0.75 output per million tokens.

Compared with the rates we published on October 18, every model got cheaper: v0 Mini input halved (from $0.20) and its output fell from $1.20 to $0.50, v0 Max dropped from $5 and $25 to $4 and $20, and v0 Max Fast from $10 and $50 to $8 and $40. v0 Pro input and output stayed at $2 and $10, with cache reads halved.

Two things to keep in mind when you model costs for customers. First, the agent reads your project files on every turn, so input tokens dominate; Vercel's own pricing FAQ includes the question "Why do messages use so many input tokens? My prompts are short." Second, each chat and message response returns its usage, so per-customer metering is possible, but you build it.

## v0 API vs Lovable API vs Totalum API: what you pay and what you get

Prices and scope below were read on the vendors' own pages on November 30, 2026.

| | v0 API | Lovable API | Totalum API |
|---|---|---|---|
| Creates apps from a prompt via the API | Yes (`chats.create`, `messages.send`) | No: the REST API manages and deploys existing projects; creation runs through Lovable's MCP server | Yes (Launch Project, then Run AI Agent) |
| Plan needed for API keys | Any v0 account with credits; team features on Plus ($30/user/month) and Business ($100/user/month) | Business ($50/month, 100 credits) or Enterprise | Every plan, including Free; Starter is $29/month |
| Unit of billing | Model tokens: $0.10 to $8 input, $0.50 to $40 output per 1M | No separate API price; API calls, including deploys, use no build credits | Credits from $0.07 each, cheaper in bigger packs; most reads free |
| Spend control | Usage per response; pool limits per team member (beta) | Workspace credit plan; API calls themselves use no credits | Per-project monthly credit caps and per-project spend analytics |
| Database and sign-in in generated apps | Via integrations you install through the Vercel API (for example Neon or Supabase) | Set up inside Lovable while building | Built in: SQL database per project (development and live) and BetterAuth sign-in |
| Payments | Via integrations | Set up inside Lovable while building | Stripe into the app owner's account through an onboarding link |
| Previews inside your product | Proxy on a separate preview domain plus trusted hosts | One-hour embed URL for a project's built preview | A preview URL per project, then publish |
| Where apps run | Vercel (`chats.deploy`) | Lovable hosting | Cloudflare Workers with a D1 database, no Cloudflare account needed |
| End users need a vendor account | No | No for embedded previews | No, every project belongs to your account |

The short version: v0 sells a generation engine, Lovable's API is an admin and deploy layer over projects people build in Lovable, and Totalum sells the whole app builder as a service. Our [Lovable API guide](https://www.totalum.app/blog/lovable-api-2026) goes deeper on Lovable's endpoints.

## What a white-label build really costs: our November data

Token prices are hard to translate into "what does one customer app cost me". So we pulled our own numbers from the Totalum API on November 30, 2026, using the spending analytics endpoint on the account we use for blog build tests.

- **32 apps** were created and built through the API between November 1 and November 29, each from a single business prompt plus follow-up edits.
- **1,470.4 credits** in total: 1,467.2 for development (agent prompts, project creation, browser tests) and 3.2 for infrastructure (database, storage, workers, email). Running the apps cost about 0.2% of the bill.
- **Median 46.1 credits per app**, which is about **$3.23 at $0.07 per credit**. The cheapest app used 2.9 credits and the most expensive 84.7 (about $5.93); the mean was 45.95.

The same API also publishes its operation prices, so a reseller can bill from real numbers instead of hard-coding them. The `credit costs` endpoint returned this on November 30, 2026:

| Operation | Credits |
|---|---|
| Create a project | 2 |
| Publish a deployment | 0.5 |
| Add a custom domain | 4 |
| Export a project | 4 |
| Apply a visual edit | 0.6 |
| Manual database backup | 2 |
| Monthly project fee | 1 |
| Monthly hosting fee | 2 |
| Monthly custom domain fee | 3 |
| Upload or update a file | 0 |

Agent prompts are metered by the work done, like v0's tokens, but every project also has a monthly credit cap you set through the API, so a single customer cannot spend past the budget you give them.

**Want these economics under your own brand?** [See the Totalum white-label builder](https://www.totalum.app/en/whitelabel) or [book a 30-minute call](https://crm.totalum.app/book/first-steps-with-totalum) to walk through your integration, with free credits to test.

## What you still build around the v0 API

The v0 API is deliberately a building block. For a product your customers pay for, the docs leave these pieces to you:

1. **A preview proxy on its own registrable domain.** `chats.getPreview` returns a URL and a short-lived token that a browser cannot attach to an iframe. The docs describe four parts: a backend helper that caches preview details, a catch-all route, a loading route that retries while the sandbox starts, and a framework-level proxy for root-relative assets. Because previews run generated code, they must not share your app's origin.
2. **Trusted hosts.** Register the proxy hostname with `setPreviewHosts`, or previews will not load.
3. **Integrations.** When the agent needs a database or auth provider, it pauses with a `get_or_request_integration` action. Your app installs the integration through the Vercel API on the chat's `vercelProjectId`, then confirms it with `messages.resolve`.
4. **Accounts and permissions.** Map your users to chats with metadata, and authorize every write on your own backend; the v0 key's scope does not replace your access control.
5. **Billing.** Turn per-response token usage into a price for your customer, knowing that input tokens grow with project size.
6. **Where the apps live.** Deploys go to Vercel projects, so custom domains and per-app hosting limits are managed on the Vercel side.

None of this is a defect. If your team already runs on Vercel and wants full control of the agent's trace, the v0 API is a strong engine. It is simply not a finished builder-as-a-service.

## Looking for a v0 API alternative?

Most teams who search for an alternative want one of three things: app generation without running preview infrastructure, a backend that comes with every generated app, or predictable unit costs per customer. Here is how the options line up:

- **Totalum API.** One HTTP API (`builder-api.totalum.app/api/v1/vcaas`, header `api-key`) launches a project from a prompt; agents work in an isolated sandbox per project and test the app in a real browser before you see it. Each app ships with its own database, sign-in, file storage, AI features, email and Stripe payments. The [API overview](https://www.totalum.app/docs/api/overview) lists every endpoint, and an MCP server exposes the same tools to AI agents.
- **Lovable API plus MCP.** Good if your users already build in Lovable and you need workspace admin, security-scan data or embedded previews. App creation is not part of the REST API.
- **Build your own on an open model.** You can wire a coding model to a sandbox yourself; our [Lovable and Bolt clone in Next.js](https://www.totalum.app/blog/build-your-own-lovable-bolt-clone-nextjs) tutorial shows the moving parts and why most teams stop before hosting and databases.

If you are comparing the end-user products rather than the APIs, our [v0 alternatives](https://www.totalum.app/blog/v0-alternative-2026) roundup and [Lovable vs v0](https://www.totalum.app/blog/lovable-vs-v0-2026) comparison cover that.

## Why Totalum for a white-label AI app builder

- **The backend is part of the result.** A launch call returns a Next.js app that already has development and live SQL databases, BetterAuth sign-in and file storage. There is no integration-install step to script.
- **Your customers get paid directly.** Generated apps take payments into the app owner's own Stripe account through an onboarding link; renewals, cancellations and refunds reach the app's webhook route without extra wiring.
- **Costs you can resell.** Credits start at $0.07, operation prices come from the API, reads are mostly free, and per-project caps stop runaway spend. Our median November build cost about $3.23.
- **Previews without a proxy project.** Each project has a development preview URL; publishing moves it to a live URL and, on any paid plan, to your customer's own domain set through the API.
- **Nothing to provision.** Apps run on Cloudflare Workers with D1, and you never need a Cloudflare account.
- **A working starting point.** The MIT-licensed reference builder (github.com/totalumlabs/ai-app-builder-open) runs with one environment variable, `TOTALUM_VCAAS_API_KEY`, so you can rebrand a complete builder instead of writing the chat UI from scratch.
- **Free to prototype.** The API works on every plan, including Free, so you can test the integration before choosing a plan.

For the full architecture, read [how to embed an AI app builder in your SaaS via API](https://www.totalum.app/blog/how-to-embed-ai-app-builder-saas-via-api) and our [white label AI app builder](https://www.totalum.app/blog/white-label-ai-app-builder-2026) guide.

## When the v0 API is the better pick

Choose the v0 API if your stack already lives on Vercel and generated apps should deploy there, if you want the agent's step-by-step trace (thinking, file edits, bash commands) in your UI, if you start from existing repositories or synced templates, or if you need visual editing and security reviews you can trigger from your own product. Choose the Totalum API if you want each customer's app to arrive with its database, sign-in, payments, hosting and domain already handled, and per-project budgets you can price against.

## FAQ

### Does v0 have an API?

Yes. The v0 API gives your product v0's app-building agent: create apps from prompts, iterate with follow-up messages, embed sandboxed previews and deploy to Vercel. The current version, v2, has been generally available since August 5, 2026; the v1 docs remain for older integrations.

### How much does the v0 API cost?

It is billed in model tokens from your v0 credits. On November 30, 2026, v0 Mini cost $0.10 per million input tokens and $0.50 per million output tokens, v0 Pro $2 and $10, v0 Max $4 and $20, and v0 Max Fast $8 and $40. There is no separate API subscription.

### How do I pay for v0 API usage?

API calls draw on the same credits as the v0 app. Paid plans include monthly credits (Plus and Business include $30 per user per month, plus $2 of daily credits on login), and you can buy additional on-demand credits with centralized billing on vercel.com. New free users get $5 of one-time credits.

### How do I get a v0 API key?

Create one in your v0 settings and store it server-side as `V0_API_KEY`. Install the SDK with `npm install v0`, or start from `npx create-v0-sdk-app`, which includes a chat UI, proxy routes and a preview app.

### Can I build a white-label app builder with the v0 API?

Yes, Vercel presents it for exactly that. You still build the preview proxy on a separate domain, the trusted-hosts setup, integration installs through the Vercel API, user accounts and customer billing, and the generated apps deploy to Vercel.

### What is the best v0 API alternative?

For a complete white-label builder, the Totalum API: one key creates apps with their own database, sign-in, Stripe payments and Cloudflare hosting, credits start at $0.07 with per-project caps, and it works on every plan, including Free. The Lovable API manages existing Lovable projects but does not create apps.

### Do my users need a v0 or Totalum account?

No, in both cases. Your server holds the API key and the generated apps belong to your account.

## Launch your own AI app builder

The v0 API is a capable generation engine, best for teams already deploying on Vercel. If you want to sell a complete AI app builder under your brand, with databases, sign-in, payments, hosting and domains handled for every customer and a cost per app you can measure, [start with the Totalum white-label builder](https://www.totalum.app/en/whitelabel), read the [API docs](https://www.totalum.app/docs/api/overview), or [book a call](https://crm.totalum.app/book/first-steps-with-totalum).
