VercelLogotypeVercelLogotype
LoginSign Up

Simple v0: v0 Platform API Demo

A Next.js application demonstrating the v0 Platform API

DeployView Demo

Simple v0

The simplest way to use v0. Just prompt and see your app generated instantly - no chat management, no complexity. Build AI-powered apps with real-time generation and seamless deployment to Vercel.

[Image blocked: Screenshot]

Deploy Your Own

You can deploy your own version of Simple v0 to Vercel with one click:

Setup

  1. Install dependencies:

    pnpm install
  2. Configure environment: Create a .env.local file in the root directory:

    V0_API_KEY=your_api_key_here
    # Optional: For rate limiting (if not provided, rate limiting is disabled)
    KV_REST_API_URL=your_kv_rest_api_url
    KV_REST_API_TOKEN=your_kv_rest_api_token
    • Get your v0 API key from v0.dev/settings
    • Optionally get your Upstash Redis credentials from upstash.com for rate limiting
  3. Run development server:

    pnpm dev

    Open http://localhost:3000 to view the application.

Features

  • AI App Generation: Create applications from natural language prompts using v0's AI
  • Project Management: Organize your work into projects with multiple chat conversations
  • Live Preview: Instantly preview generated applications in an embedded iframe
  • Chat Management: Continue conversations, fork chats, rename, and delete as needed
  • One-Click Deployment: Deploy generated apps directly to Vercel
  • File Attachments: Upload images and files to enhance your prompts
  • Voice Input: Use speech-to-text for hands-free prompt creation
  • Rate Limiting: Built-in rate limiting (3 AI generations per 12 hours) to prevent abuse
  • Responsive Design: Works seamlessly on desktop and mobile devices
  • Session Caching: Improved performance with intelligent caching of projects and chats

API Routes

  • GET /api/validate - Validate API key
  • GET /api/projects - List all projects
  • GET /api/projects/[id] - Get project details with associated chats
  • POST /api/generate - Generate or continue app conversation
  • GET /api/chats/[id] - Retrieve chat details and history
  • DELETE /api/chats/[id] - Delete a chat conversation
  • PATCH /api/chats/[id] - Update chat (rename)
  • POST /api/chats/fork - Create a new chat from an existing one
  • POST /api/deployments - Deploy generated apps to Vercel

Tech Stack

  • Framework: Next.js 15 with App Router
  • Runtime: React 19 with TypeScript
  • Styling: Tailwind CSS 4
  • UI Components: Radix UI primitives with custom styling
  • API Integration: v0-sdk for Platform API communication
  • Rate Limiting: Upstash Redis with sliding window algorithm
  • Fonts: Geist Sans and Geist Mono via next/font
  • Build Tool: Turbopack for fast development

Rate Limiting

This application implements optional rate limiting to prevent abuse and ensure fair usage:

  • Limit: 3 AI generations per 12 hours per IP address
  • What counts as 1 generation: Each call to v0.chats.create() or v0.chats.sendMessage()
  • Scope: Applies to all AI generation requests regardless of chat type
  • Implementation: Uses Upstash Redis with a sliding window algorithm
  • Optional: If Upstash credentials are not provided, rate limiting is disabled
  • Fallback: If rate limiting service is unavailable, requests are allowed (fail-open strategy)

When the rate limit is exceeded, users receive a 429 status code with information about when they can try again.

Project Structure

├── app/
│ ├── api/ # API route handlers
│ │ ├── chats/[chatId]/ # Chat CRUD operations
│ │ ├── deployments/ # Vercel deployment handling
│ │ ├── generate/ # AI app generation
│ │ ├── projects/ # Project management
│ │ └── validate/ # API key validation
│ ├── components/ # App-specific components
│ ├── projects/[projectId]/ # Dynamic project pages
│ │ └── chats/[chatId]/ # Individual chat pages
│ ├── globals.css # Global styles and Tailwind config
│ ├── layout.tsx # Root layout with metadata
│ └── page.tsx # Homepage with main interface
├── components/
│ └── ui/ # Reusable UI components (buttons, dialogs, etc.)
├── lib/
│ ├── hooks/ # Custom React hooks
│ └── utils.ts # Utility functions
└── public/ # Static assets

Environment Variables

VariableRequiredDescription
V0_API_KEYYesYour v0 Platform API key from v0.dev/settings
KV_REST_API_URLNoUpstash Redis REST URL for rate limiting (if not provided, rate limiting is disabled)
KV_REST_API_TOKENNoUpstash Redis REST token for rate limiting (if not provided, rate limiting is disabled)

Development Commands

# Install dependencies
pnpm install
# Start development server with Turbopack
pnpm dev
# Build for production
pnpm build
# Start production server
pnpm start
# Run linting
pnpm lint
# Format code
pnpm format
# Check formatting
pnpm format:check

Usage

  1. Start Creating: Enter a prompt describing the app you want to build
  2. Organize Work: Create projects to group related conversations
  3. Iterate: Continue conversations to refine and improve your apps
  4. Deploy: One-click deployment to Vercel for sharing and testing
  5. Manage: Rename, delete, or fork chats as your projects evolve

Learn More

  • v0 Platform API Documentation
  • Next.js Documentation
  • Tailwind CSS
  • Radix UI
GitHub Repovercel/v0-sdk
LicenseView License
Use Cases
AI
Stack
Next.js
Tailwind

Related Templates

Chatbot

A full-featured, hackable Next.js AI chatbot built by Vercel
Chatbot thumbnail

AI SDK Computer Use

An open-source AI agent demonstrating Claude Sonnet's computer use capabilities, built with Next.js, Vercel Sandbox, and the AI SDK.
AI SDK Computer Use thumbnail

AI SDK Slackbot

An open-source AI Slackbot.
AI SDK Slackbot thumbnail

Get Started

  • Templates
  • Supported frameworks
  • Marketplace
  • Domains

Build

  • Next.js on Vercel
  • Turborepo
  • v0

Scale

  • Content delivery network
  • Fluid compute
  • CI/CD
  • Observability
  • AI GatewayNew
  • Vercel AgentNew

Secure

  • Platform security
  • Web Application Firewall
  • Bot management
  • BotID
  • SandboxNew

Resources

  • Pricing
  • Customers
  • Enterprise
  • Articles
  • Startups
  • Solution partners

Learn

  • Docs
  • Blog
  • Changelog
  • Knowledge Base
  • Academy
  • Community

Frameworks

  • Next.js
  • Nuxt
  • Svelte
  • Nitro
  • Turbo

SDKs

  • AI SDK
  • Workflow SDKNew
  • Flags SDK
  • Chat SDK
  • Streamdown AINew

Use Cases

  • Composable commerce
  • Multi-tenant platforms
  • Web apps
  • Marketing sites
  • Platform engineers
  • Design engineers

Company

  • About
  • Careers
  • Help
  • Press
  • Legal
  • Privacy Policy

Community

  • Open source program
  • Events
  • Shipped on Vercel
  • GitHub
  • LinkedIn
  • X
  • YouTube

Loading status…

Select a display theme:
    • AI Cloud
      • AI Gateway

        One endpoint, all your models

      • Sandbox

        Isolated, safe code execution

      • Vercel Agent

        An agent that knows your stack

      • AI SDK

        The AI Toolkit for TypeScript

      • v0

        Build applications with AI

    • Core Platform
      • CI/CD

        Helping teams ship 6× faster

      • Content Delivery

        Fast, scalable, and reliable

      • Fluid Compute

        Servers, in serverless form

      • Workflow

        Long-running workflows at scale

      • Observability

        Trace every step

    • Security
      • Bot Management

        Scalable bot protection

      • BotID

        Invisible CAPTCHA

      • Platform Security

        DDoS Protection, Firewall

      • Web Application Firewall

        Granular, custom protection

    • Company
      • Customers

        Trusted by the best teams

      • Blog

        The latest posts and changes

      • Changelog

        See what shipped

      • Press

        Read the latest news

      • Events

        Join us at an event

    • Learn
      • Docs

        Vercel documentation

      • Academy

        Linear courses to level up

      • Knowledge Base

        Find help quickly

      • Community

        Join the conversation

    • Open Source
      • Next.js

        The native Next.js platform

      • Nuxt

        The progressive web framework

      • Svelte

        The web’s efficient UI framework

      • Turborepo

        Speed with Enterprise scale

    • Use Cases
      • AI Apps

        Deploy at the speed of AI

      • Composable Commerce

        Power storefronts that convert

      • Marketing Sites

        Launch campaigns fast

      • Multi-tenant Platforms

        Scale apps with one codebase

      • Web Apps

        Ship features, not infrastructure

    • Tools
      • Marketplace

        Extend and automate workflows

      • Templates

        Jumpstart app development

      • Partner Finder

        Get help from solution partners

    • Users
      • Platform Engineers

        Automate away repetition

      • Design Engineers

        Deploy for every idea

  • Enterprise
  • Pricing
Log InContact
Sign Up
Sign Up
DeployView Demo
AI Gateway

One endpoint, all your models

Sandbox

Isolated, safe code execution

Vercel Agent

An agent that knows your stack

AI SDK

The AI Toolkit for TypeScript

v0

Build applications with AI

CI/CD

Helping teams ship 6× faster

Content Delivery

Fast, scalable, and reliable

Fluid Compute

Servers, in serverless form

Workflow

Long-running workflows at scale

Observability

Trace every step

Bot Management

Scalable bot protection

BotID

Invisible CAPTCHA

Platform Security

DDoS Protection, Firewall

Web Application Firewall

Granular, custom protection

Customers

Trusted by the best teams

Blog

The latest posts and changes

Changelog

See what shipped

Press

Read the latest news

Events

Join us at an event

Docs

Vercel documentation

Academy

Linear courses to level up

Knowledge Base

Find help quickly

Community

Join the conversation

Next.js

The native Next.js platform

Nuxt

The progressive web framework

Svelte

The web’s efficient UI framework

Turborepo

Speed with Enterprise scale

AI Apps

Deploy at the speed of AI

Composable Commerce

Power storefronts that convert

Marketing Sites

Launch campaigns fast

Multi-tenant Platforms

Scale apps with one codebase

Web Apps

Ship features, not infrastructure

Marketplace

Extend and automate workflows

Templates

Jumpstart app development

Partner Finder

Get help from solution partners

Platform Engineers

Automate away repetition

Design Engineers

Deploy for every idea