# Table of Contents - [What is v0? | v0 Docs](#what-is-v0-v0-docs) - [Classic v0 | v0 Docs](#classic-v0-v0-docs) - [v0 Clone | v0 Docs](#v0-clone-v0-docs) - [v0 Model API | v0 Docs](#v0-model-api-v0-docs) - [MCP Server | v0 Docs](#mcp-server-v0-docs) - [AI Tools Example | v0 Docs](#ai-tools-example-v0-docs) - [React Components Example | v0 Docs](#react-components-example-v0-docs) - [AI Tools | v0 Docs](#ai-tools-v0-docs) - [Overview | v0 Docs](#overview-v0-docs) - [Delete Chat | v0 Docs](#delete-chat-v0-docs) - [Quickstart | v0 Docs](#quickstart-v0-docs) - [Favorite Chat | v0 Docs](#favorite-chat-v0-docs) - [Download version files | v0 Docs](#download-version-files-v0-docs) - [Environment Variables | v0 Docs](#environment-variables-v0-docs) - [Find Chat Versions | v0 Docs](#find-chat-versions-v0-docs) - [Get Chat Message | v0 Docs](#get-chat-message-v0-docs) - [Get Chat Version | v0 Docs](#get-chat-version-v0-docs) - [Find Chats | v0 Docs](#find-chats-v0-docs) - [Find Chat Messages | v0 Docs](#find-chat-messages-v0-docs) - [Resume Message | v0 Docs](#resume-message-v0-docs) - [Get Chat | v0 Docs](#get-chat-v0-docs) - [Fork Chat | v0 Docs](#fork-chat-v0-docs) - [Find Deployment Errors | v0 Docs](#find-deployment-errors-v0-docs) - [MCP Integrations | v0 Docs](#mcp-integrations-v0-docs) - [Find Deployments | v0 Docs](#find-deployments-v0-docs) - [Create Chat | v0 Docs](#create-chat-v0-docs) - [Send Message | v0 Docs](#send-message-v0-docs) - [Delete Deployment | v0 Docs](#delete-deployment-v0-docs) - [Get Deployment | v0 Docs](#get-deployment-v0-docs) - [AI models | v0 Docs](#ai-models-v0-docs) - [Create Deployment | v0 Docs](#create-deployment-v0-docs) - [Find Deployment Logs | v0 Docs](#find-deployment-logs-v0-docs) - [Lock Files from AI Changes | v0 Docs](#lock-files-from-ai-changes-v0-docs) - [Update Chat | v0 Docs](#update-chat-v0-docs) - [Initialize Chat | v0 Docs](#initialize-chat-v0-docs) - [Start from Existing Code | v0 Docs](#start-from-existing-code-v0-docs) - [Find Hooks | v0 Docs](#find-hooks-v0-docs) - [Agentic Features | v0 Docs](#agentic-features-v0-docs) - [Create Hook | v0 Docs](#create-hook-v0-docs) - [Get Hook | v0 Docs](#get-hook-v0-docs) - [Create Vercel Project | v0 Docs](#create-vercel-project-v0-docs) - [@v0-sdk/react | v0 Docs](#-v0-sdk-react-v0-docs) - [Update Chat Version Files | v0 Docs](#update-chat-version-files-v0-docs) - [Delete Hook | v0 Docs](#delete-hook-v0-docs) - [Account | v0 Docs](#account-v0-docs) - [Find Vercel Projects | v0 Docs](#find-vercel-projects-v0-docs) - [@v0-sdk/ai-tools | v0 Docs](#-v0-sdk-ai-tools-v0-docs) - [create-v0-sdk-app | v0 Docs](#create-v0-sdk-app-v0-docs) - [v0-sdk | v0 Docs](#v0-sdk-v0-docs) - [Update Hook | v0 Docs](#update-hook-v0-docs) - [Assign Project to Chat | v0 Docs](#assign-project-to-chat-v0-docs) - [Delete Project | v0 Docs](#delete-project-v0-docs) - [Delete Environment Variables | v0 Docs](#delete-environment-variables-v0-docs) - [Create Environment Variables | v0 Docs](#create-environment-variables-v0-docs) - [Find Projects | v0 Docs](#find-projects-v0-docs) - [Find Environment Variables | v0 Docs](#find-environment-variables-v0-docs) - [Get Plan | v0 Docs](#get-plan-v0-docs) - [Get Billing | v0 Docs](#get-billing-v0-docs) - [Find Rate Limit | v0 Docs](#find-rate-limit-v0-docs) - [Get Usage Report | v0 Docs](#get-usage-report-v0-docs) - [Create Project | v0 Docs](#create-project-v0-docs) - [Get User | v0 Docs](#get-user-v0-docs) - [Get Project by ID | v0 Docs](#get-project-by-id-v0-docs) - [Update Environment Variables | v0 Docs](#update-environment-variables-v0-docs) - [Get User Scopes | v0 Docs](#get-user-scopes-v0-docs) - [Get Project by Chat ID | v0 Docs](#get-project-by-chat-id-v0-docs) - [Update Project | v0 Docs](#update-project-v0-docs) - [Get Environment Variable | v0 Docs](#get-environment-variable-v0-docs) - [Overview | v0 Docs](#overview-v0-docs) - [Displaying Chat Messages | v0 Docs](#displaying-chat-messages-v0-docs) - [Cursor | v0 Docs](#cursor-v0-docs) - [Community | v0 Docs](#community-v0-docs) - [Custom domain | v0 Docs](#custom-domain-v0-docs) - [Databases | v0 Docs](#databases-v0-docs) - [Cline | v0 Docs](#cline-v0-docs) - [Figma | v0 Docs](#figma-v0-docs) - [Code editing | v0 Docs](#code-editing-v0-docs) - [Prototyping | v0 Docs](#prototyping-v0-docs) - [Full-stack apps | v0 Docs](#full-stack-apps-v0-docs) - [External APIs | v0 Docs](#external-apis-v0-docs) - [Deployments | v0 Docs](#deployments-v0-docs) - [Enterprise | v0 Docs](#enterprise-v0-docs) - [PRD design | v0 Docs](#prd-design-v0-docs) - [GitHub | v0 Docs](#github-v0-docs) - [OpenAI Codex | v0 Docs](#openai-codex-v0-docs) - [Projects | v0 Docs](#projects-v0-docs) - [Instructions | v0 Docs](#instructions-v0-docs) - [Screenshots and Files | v0 Docs](#screenshots-and-files-v0-docs) - [Images and videos | v0 Docs](#images-and-videos-v0-docs) - [Sharing | v0 Docs](#sharing-v0-docs) - [Design mode | v0 Docs](#design-mode-v0-docs) - [Versions | v0 Docs](#versions-v0-docs) - [Design systems | v0 Docs](#design-systems-v0-docs) - [Zed | v0 Docs](#zed-v0-docs) - [Vercel Integration | v0 Docs](#vercel-integration-v0-docs) - [Pricing | v0 Docs](#pricing-v0-docs) - [Teams | v0 Docs](#teams-v0-docs) - [Security | v0 Docs](#security-v0-docs) - [FAQs | v0 Docs](#faqs-v0-docs) - [Text Prompting | v0 Docs](#text-prompting-v0-docs) - [Templates | v0 Docs](#templates-v0-docs) - [Quickstart | v0 Docs](#quickstart-v0-docs) --- # What is v0? | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu What is v0? =========== Copy page v0 is an AI-powered development platform that turns ideas into production-ready, full-stack web apps. Describe what you want with natural language, and v0's intelligent agent builds it for you. v0 can search the web, inspect sites, automatically fix errors, and integrate with external tools. Anyone can build and collaborate in v0, taking a concept to working software in minutes. [What can you do with v0?](https://v0.app/docs/introduction#what-can-you-do-with-v0) ------------------------------------------------------------------------------------- * **Describe your idea** in your preferred language. * **Create high-fidelity UIs** from your wireframes or mockups. * **Connect to backend** to build rich, data driven applications. * **Deploy with one click** to secure, scalable infrastructure powered by Vercel. * **Automatically fix errors** in your code with intelligent diagnostics. [Getting Started\ \ Quickstart tutorial to create your first project.](https://v0.app/docs/quickstart) [Prompt Engineering\ \ Build faster in v0 with effective prompting.](https://v0.app/docs/text-prompting) [FAQs\ \ Find commonly asked questions about v0.](https://v0.app/docs/faqs) [Blog\ \ Stay up to date with new product features and announcements.](https://vercel.com/blog/category/v0) [Why should I choose v0 instead of other tools?](https://v0.app/docs/faqs#why-should-i-choose-v0) [Examples](https://v0.app/docs/introduction#examples) ------------------------------------------------------ You can use v0 to build anything, from landing pages, dashboards, ecommerce stores, AI apps, to full-stack applications. * [![Dashboard – M.O.N.K.Y](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fexamples%2Fdashboard.png&w=3840&q=75)\ \ Dashboard – M.O.N.K.Y](https://v0.app/templates/b7GDYVxuoGC) * [![Brillance SaaS Landing Page](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fexamples%2Flanding.png&w=3840&q=75)\ \ Brillance SaaS Landing Page](https://v0.app/templates/zdiN8dHwaaT) * [![Shopify Ecommerce Template](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fexamples%2Fecoommerce.png&w=3840&q=75)\ \ Shopify Ecommerce Template](https://v0.app/templates/XmzC9oi7g4m) * [![Nano Banana Pro Playground](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fexamples%2Fnanonananapro.png&w=3840&q=75)\ \ Nano Banana Pro Playground](https://v0.app/templates/hkRpZoLOrJC) [Explore what our community is building](https://v0.app/templates) [Who is v0 for?](https://v0.app/docs/introduction#who-is-v0-for) ----------------------------------------------------------------- v0 helps teams prototype, build, and ship faster. Here's how different roles are using it: ### [Product Managers](https://v0.app/docs/introduction#product-managers) Quickly prototype and iterate to align stakeholders, validate ideas early, and gather user feedback before using engineering resources. Examples: * [Draft project plans and timelines](https://v0.app/chat/realtime-food-delivery-app-SYnS5F3f4eQ) * [Generate user interview questions for researching new features](https://v0.app/chat/figma-integration-questions-tEygM4v11nr) * [Create feedback forms where submissions are sent to a database](https://v0.app/chat/vercel-blob-form-AEdow4eYNT1?b=b_lL01SLSDPbg) * [Create templates for new features or RFCs](https://v0.app/chat/rfc-template-creation-1SUWumwg7VA?b=b_r4q4NtEyq7L) ### [Designers](https://v0.app/docs/introduction#designers) Turn mockups into real, high-fidelity user interfaces that reflect user flows and constraints. Examples: * [Clone pages with screenshots or Figma files](https://v0.app/chat/air-bn-b-clone-z2USwBXCUkt?b=b_wsRgLc7Q6Np) * [Generate CSS and HTML for prototypes and landing pages](https://v0.app/chat/responsive-grid-layout-ORiwZhoEQJN?b=b_cbgUrNMYrUI) * [Add accessibility improvements for basic design elements](https://v0.app/chat/accessible-form-component-cfAFpQlzYij?b=b_PLmcnssJsJT) * [Create interactive components to handoff to developers](https://v0.app/chat/next-js-dark-mode-pU5dltJuOlC?b=b_woRepE69E8F) ### [Engineers](https://v0.app/docs/introduction#engineers) Quickly scaffold full-stack apps or components following best practices and modern standards. Focus on solving the harder problems while using v0 as your AI pair programmer. Examples: * [Create React components](https://v0.app/chat/responsive-nav-bar-ndXU3P0uwkI?b=b_A63dydZKsmW) * [Create custom hooks and functionality](https://v0.app/chat/custom-react-hook-mTAR0Mfr1fE?b=b_sHFhXDNCZq3) * [Migrate to the latest Next.js features](https://v0.app/chat/migrating-to-new-api-s-BS2vObWxSnw) ### [Data Scientists](https://v0.app/docs/introduction#data-scientists) Build and deploy data applications on Snowflake with v0. Work with Python and SQL to analyze data and create visualizations. Use tools like [Matplotlib](https://matplotlib.org/) , [Pandas](https://pandas.pydata.org/) , and more. Examples: * [Learn SQL](https://v0.app/chat/sql-basics-QWHEeRIUuK8) * [Write complex queries](https://v0.app/chat/sql-query-for-p99-4RhGamYCG2Q) * [Generate code for data visualization and analysis](https://v0.app/chat/matplotlib-summary-plots-qSnMQHS5tYm) * [Create dashboards for visualizations](https://v0.app/chat/next-js-charts-ky1gWd57Jbq?ref=TQT1P6) ### [Marketing Teams](https://v0.app/docs/introduction#marketing-teams) Reduce time-to-market for promotional initiatives by launching custom marketing pages. Generate content ideas, copy, and draft email campaigns. Examples: * [Generate ideas for blog posts, social media content, and ad copy](https://v0.app/chat/ai-blog-topic-ideas-g6gCHmftUFZ?b=b_G5a4ouPZyFk) * [Research keywords and optimize your SEO](https://v0.app/chat/next-js-blog-component-liT74sXMshG?b=b_g2hXZa9ruMw) * [Draft email campaigns and newsletters](https://v0.app/chat/MdfCDyWYFQw?b=b_d0dKVt93l1C) * [Collaborate with developers on features like A/B testing](https://v0.app/chat/next-js-a-b-testing-AFjquiFstFY?b=b_wTb5bso8PDn) ### [Content Creators and Educators](https://v0.app/docs/introduction#content-creators-and-educators) Create interactive examples and games that are easy to follow and understand. Write lesson plans and create engineering quizzes. Examples: * [Help create lesson plans and educational content](https://v0.app/chat/next-js-lesson-plan-uDmldsC7TBg?b=b_2xwzGb1Nn85) * [Generate practice exercises and quizzes](https://v0.app/chat/interactive-react-quiz-vXjFt7Xr2Ja?b=b_aoDHlI7JKat) * [Assist in developing online course materials with progress tracking](https://v0.app/chat/progress-tracking-component-h4VLQZsiMjc?b=b_kTjunlFR2hE) * [Provide visual explanations for complex concepts, especially related to engineering](https://v0.app/chat/git-basics-for-beginners-GI25SZGQtqP) ### [Customer Support](https://v0.app/docs/introduction#customer-support) Help customers with technical issues, and build customer support tools. Examples: * [Create a chatbot for customer support](https://v0.app/chat/chatbot-interface-component-eJquKqGe4l8?ref=TQT1P6) * [Assist in creating a searchable knowledge base and articles](https://v0.app/chat/searchable-knowledge-base-QRwo0y9ClK1?b=b_CJpNHy3hUJe) * [Design a customer feedback form](https://v0.app/chat/customer-feedback-form-jgRqnP9KYpF?b=b_fP8kTb5fldI) ### [Founders](https://v0.app/docs/introduction#founders) Ship MVPs fast without hiring a dev team, and focus your time on refining product and market fit. [What makes v0 different?](https://v0.app/docs/introduction#what-makes-v0-different) ------------------------------------------------------------------------------------- * **End-to-end Development**: Build both UI and backend logic, not just mockups. * **Works with your stack**: Use modern tools like Next.js, Tailwind, shadcn/ui, and more. * **Team-friendly**: Powers collaborative design, product, and engineering workflows. * **Extensible**: Use your APIs, databases, and components. * **Intelligent Agent**: Autonomous capabilities including web search, site inspection, error fixing, and external tool integration. * **Real-time Feedback**: Real-time preview of your app, with visual progress indicators and rich UI feedback for all agent actions. * **Multi-modal**: Combines code generation, web browsing, debugging, and external API interactions in one platform. [Agentic Features\ \ v0's intelligent agent capabilities for web search, site inspection, and error fixing.](https://v0.app/docs/agentic-features) --- # Classic v0 | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/Examples Classic v0 ========== Copy page A faithful recreation of the original v0.dev interface Build the iconic v0.dev experience with modern web technologies. This example shows you how to create the classic three-generation workflow using React, Next.js, and the v0 SDK. [Features](https://v0.app/docs/api/platform/examples/classic-v0#features) -------------------------------------------------------------------------- * **Classic v0 Interface**: Faithful recreation of the original v0.dev workflow * **Multiple Generations**: Creates 3 different variations (A, B, C) for each prompt * **Generation Selection**: Click between different generations to compare and choose * **Live Preview**: See your generated components in real-time via iframe * **Modern Stack**: Built with Next.js 15, React 19, TypeScript, and Tailwind CSS * **shadcn/ui Components**: Professional UI components for a polished interface * **Two-Stage Workflow**: Prompt input → Multiple generations → Selection and iteration [Technologies Used](https://v0.app/docs/api/platform/examples/classic-v0#technologies-used) -------------------------------------------------------------------------------------------- * **Frontend Framework**: Next.js 15 with App Router * **UI Library**: shadcn/ui + Radix UI primitives * **Styling**: Tailwind CSS * **AI Integration**: v0-sdk for chat and component generation * **Code Highlighting**: react-syntax-highlighter * **Icons**: Lucide React [Getting Started](https://v0.app/docs/api/platform/examples/classic-v0#getting-started) ---------------------------------------------------------------------------------------- ### [Prerequisites](https://v0.app/docs/api/platform/examples/classic-v0#prerequisites) * Node.js 22+ * pnpm (recommended) or npm * v0 API key from [v0.dev/chat/settings/keys](https://v0.dev/chat/settings/keys) ### [Installation](https://v0.app/docs/api/platform/examples/classic-v0#installation) 1. Navigate to the classic-v0 directory: cd examples/classic-v0 2. Install dependencies: pnpm install 3. Set up environment variables: export V0_API_KEY=your_api_key_here 4. Run the development server: pnpm dev 5. Open [http://localhost:3000](http://localhost:3000/) in your browser [Usage](https://v0.app/docs/api/platform/examples/classic-v0#usage) -------------------------------------------------------------------- 1. **Enter Your Prompt**: Describe the UI component you want to build 2. **Get Suggestions**: Click on any of the provided prompt suggestions to get started quickly 3. **View Multiple Generations**: Three different variations (A, B, C) are generated simultaneously 4. **Select Your Favorite**: Click on the generation buttons to switch between options 5. **Continue Iterating**: Choose one generation to continue refining and iterating 6. **Start Over**: Use the back button or "+" to begin a new prompt ### [Example Prompts](https://v0.app/docs/api/platform/examples/classic-v0#example-prompts) * "Create a responsive navbar with Tailwind CSS" * "Build a todo app with React hooks" * "Make a landing page for a coffee shop" * "Design a contact form with validation" * "Create a dashboard with charts" [Interface Components](https://v0.app/docs/api/platform/examples/classic-v0#interface-components) -------------------------------------------------------------------------------------------------- ### [Prompt Input Stage](https://v0.app/docs/api/platform/examples/classic-v0#prompt-input-stage) * **Main Prompt**: Large textarea for describing your UI * **Suggestions**: Quick-start prompts for inspiration * **Loading State**: Animated feedback while generating ### [Generations View](https://v0.app/docs/api/platform/examples/classic-v0#generations-view) * **Generation Display**: Full-screen preview of selected generation * **Generation Selector**: A, B, C buttons to switch between options * **Navigation**: Back button to return to prompt input * **Headers**: Clean navigation with v0 branding [Environment Variables](https://v0.app/docs/api/platform/examples/classic-v0#environment-variables) ---------------------------------------------------------------------------------------------------- | Variable | Description | Required | | --- | --- | --- | | `V0_API_KEY` | Your v0 API key for authentication | Yes | [Source Code](https://v0.app/docs/api/platform/examples/classic-v0#source-code) -------------------------------------------------------------------------------- View the complete source code on GitHub: [v0-sdk/examples/classic-v0](https://github.com/vercel/v0-sdk/tree/main/examples/classic-v0) [v0 Clone\ \ A full-featured v0 clone with authentication and multi-tenant support](https://v0.app/docs/api/platform/examples/v0-clone) [AI Tools Example\ \ Using v0-sdk with AI SDK for programmatic interaction](https://v0.app/docs/api/platform/examples/ai-tools) --- # v0 Clone | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/Examples v0 Clone ======== Copy page A full-featured v0 clone with authentication and multi-tenant support This example demonstrates how to build a complete v0.dev replica using the v0 SDK, featuring user authentication, multi-tenant architecture, and real-time streaming capabilities. [Deploy Your Own](https://v0.app/docs/api/platform/examples/v0-clone#deploy-your-own) -------------------------------------------------------------------------------------- You can deploy your own version of the v0 clone to Vercel with one click: [**Deploy with Vercel →**](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fv0-sdk&env=V0_API_KEY,AUTH_SECRET,POSTGRES_URL&envDescription=Learn+more+about+how+to+get+the+required+environment+variables&envLink=https%3A%2F%2Fgithub.com%2Fvercel%2Fv0-sdk%2Fblob%2Fmain%2Fexamples%2Fv0-clone%2FREADME.md%23environment-variables&project-name=v0-clone&repository-name=v0-clone&demo-title=v0+Clone&demo-description=A+full-featured+v0+clone+built+with+Next.js%2C+AI+Elements%2C+and+the+v0+SDK&demo-url=https%3A%2F%2Fv0.dev&root-directory=examples%2Fv0-clone) [Features](https://v0.app/docs/api/platform/examples/v0-clone#features) ------------------------------------------------------------------------ ### [Core Features](https://v0.app/docs/api/platform/examples/v0-clone#core-features) * **AI Elements Integration**: Uses AI Elements components for a polished UI * **v0 SDK Integration**: Connects to the v0 Platform API for generating apps * **Real-time Preview**: Split-screen interface with chat and preview panels * **Conversation History**: Maintains chat history throughout the session * **Suggestion System**: Provides helpful prompts to get users started * **Streaming Support**: Toggle between streaming and non-streaming AI responses for real-time updates ### [Authentication & Multi-Tenant Features](https://v0.app/docs/api/platform/examples/v0-clone#authentication--multi-tenant-features) * **Anonymous Access**: Unauthenticated users can create chats directly (with rate limits) * **Guest Access**: Users can register as guests for persistent sessions * **User Registration/Login**: Email/password authentication with secure password hashing * **Session Management**: Secure session handling with NextAuth.js * **Multi-Tenant Architecture**: Multiple users share the same v0 API organization * **Ownership Mapping**: Authenticated users only see their own chats and projects * **Rate Limiting**: Different limits for anonymous, guest, and registered users * **User Navigation**: Header dropdown with user info and sign-out options [Setup](https://v0.app/docs/api/platform/examples/v0-clone#setup) ------------------------------------------------------------------ ### [Environment Variables](https://v0.app/docs/api/platform/examples/v0-clone#environment-variables) Create a `.env` file with all required variables: # Auth Secret - Generate a random string for production # Generate with: openssl rand -base64 32 # Or visit: https://generate-secret.vercel.app/32 AUTH_SECRET=your-auth-secret-here # Database URL - PostgreSQL connection string POSTGRES_URL=postgresql://user:password@localhost:5432/v0_clone # For Vercel Postgres, use the connection string from your dashboard # Get your API key from https://v0.dev/chat/settings/keys V0_API_KEY=your_v0_api_key_here # Optional: Use a custom API URL # V0_API_URL=http://localhost:3001/v1 ### [Database Setup](https://v0.app/docs/api/platform/examples/v0-clone#database-setup) This project uses PostgreSQL with Drizzle ORM. Set up your database: 1. **Generate Database Schema**: pnpm db:generate 2. **Run Database Migrations**: pnpm db:migrate 3. **Optional - Open Database Studio**: pnpm db:studio [Getting Started](https://v0.app/docs/api/platform/examples/v0-clone#getting-started) -------------------------------------------------------------------------------------- Then, run the development server: pnpm dev Open [http://localhost:3000](http://localhost:3000/) with your browser to see the result. [Architecture](https://v0.app/docs/api/platform/examples/v0-clone#architecture) -------------------------------------------------------------------------------- ### [Multi-Tenant Design](https://v0.app/docs/api/platform/examples/v0-clone#multi-tenant-design) * **v0 API as Source of Truth**: All actual chat/project data stays in v0 API * **Ownership Layer**: Database only tracks "who owns what" * **Access Control**: API routes filter v0 data based on ownership * **No Data Duplication**: Avoids storing redundant data ### [Database Schema](https://v0.app/docs/api/platform/examples/v0-clone#database-schema) * **Users**: Store user accounts with email and hashed passwords * **ProjectOwnership**: Maps v0 API project IDs → user IDs (ownership only) * **ChatOwnership**: Maps v0 API chat IDs → user IDs with optional project association * **AnonymousChatLog**: Tracks anonymous chat creation by IP address for rate limiting ### [User Types & Rate Limits](https://v0.app/docs/api/platform/examples/v0-clone#user-types--rate-limits) * **Anonymous Users**: No account needed, 3 chats per day, no data persistence * **Guest Users**: Auto-created accounts, 5 chats per day, data persists during session * **Registered Users**: Permanent accounts, 50 chats per day, data persists across sessions and devices Rate limits are enforced per 24-hour period and reset daily. [Source Code](https://v0.app/docs/api/platform/examples/v0-clone#source-code) ------------------------------------------------------------------------------ View the complete source code on GitHub: [v0-sdk/examples/v0-clone](https://github.com/vercel/v0-sdk/tree/main/examples/v0-clone) [Lock Files from AI Changes\ \ Learn how to protect files from AI modifications in v0 chats](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) [Classic v0\ \ A faithful recreation of the original v0.dev interface](https://v0.app/docs/api/platform/examples/classic-v0) --- # v0 Model API | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Model API ============ Copy page The v0 Model API is designed for building modern web applications. It supports text and image inputs, provides fast streaming responses, and is compatible with the [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat) format. [Features](https://v0.app/docs/api/model#features) --------------------------------------------------- * **Framework aware completions**: Evaluated on modern stacks like Next.js and Vercel. * **Auto-fix**: Identifies and corrects common coding issues during generation. * **Quick edit**: Streams inline edits as they’re available. * **OpenAI compatible**: Can be used with any tool or SDK that supports OpenAI's API format. * **Multimodal**: Supports both text and image inputs (base64-encoded image data). You can experiment with the Models API in the AI Playground to test prompts and view responses: * [v0-1.5-md](https://ai-sdk.dev/playground/vercel:v0-1.5-md) * [v0-1.5-lg](https://ai-sdk.dev/playground/vercel:v0-1.5-lg) * [v0-1.0-md](https://ai-sdk.dev/playground/vercel:v0-1.0-md) [Getting started](https://v0.app/docs/api/model#getting-started) ----------------------------------------------------------------- The v0 API is currently in beta and requires a Premium or Team plan with usage-based billing enabled. For details, visit the [pricing page](https://v0.app/docs/pricing) . To start using the Models API, create an API key on [v0.app](https://v0.app/chat/settings/keys) . You can then integrate it using the [AI SDK](https://ai-sdk.dev/) , a TypeScript library designed for working with and other OpenAI-compatible models. pnpm add ai @ai-sdk/vercel ### [Example usage](https://v0.app/docs/api/model#example-usage) import { generateText } from 'ai' import { vercel } from '@ai-sdk/vercel' const { text } = await generateText({ model: vercel('v0-1.0-md'), prompt: 'Create a Next.js AI chatbot with authentication', }) [Models](https://v0.app/docs/api/model#models) ----------------------------------------------- ### [v0-1.5-md](https://v0.app/docs/api/model#v0-15-md) The `v0-1.5-md` model is for everyday tasks and UI generation. ### [v0-1.5-lg](https://v0.app/docs/api/model#v0-15-lg) The `v0-1.5-lg` model is for advanced thinking or reasoning. ### [v0-1.0-md (legacy)](https://v0.app/docs/api/model#v0-10-md-legacy) The `v0-1.0-md` model is the legacy model served by the API. **Capabilities:** * Supports text and image inputs (multimodal) * Compatible with OpenAI’s Chat Completions format * Supports function/tool calls * Streaming responses with low latency * Optimized for frontend and full-stack web development [API reference](https://v0.app/docs/api/model#api-reference) ------------------------------------------------------------- ### [Endpoint](https://v0.app/docs/api/model#endpoint) POST https://api.v0.dev/v1/chat/completions This endpoint generates a model response based on a list of messages. ### [Headers](https://v0.app/docs/api/model#headers) | Header | Required | Description | | --- | --- | --- | | Authorization | Yes | Bearer token: `Bearer $V0_API_KEY` | | Content-Type | Yes | Must be `application/json` | ### [Request body](https://v0.app/docs/api/model#request-body) | Field | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | Model name. | | `messages` | array | Yes | List of message objects forming the conversation. | | `stream` | boolean | No | If true, the response will be returned as a stream of data chunks. | | `tools` | array | No | Optional tool definitions (e.g., functions or API calls). | | `tool_choice` | string or object | No | Specifies which tool to call, if tools are provided. | | `max_completion_tokens` | integer | No | Maximum generated output tokens (default: `4000`). | Each message object must contain: | Field | Type | Required | Description | | --- | --- | --- | --- | | `role` | string | Yes | One of `"user"`, `"assistant"`, or `"system"`. | | `content` | string or array | Yes | The message content. Can be a string or array of text/image blocks. | ### [Example request](https://v0.app/docs/api/model#example-request) curl https://api.v0.dev/v1/chat/completions \ -H "Authorization: Bearer $V0_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "v0-1.5-md", "messages": [\ { "role": "user", "content": "Create a Next.js AI chatbot" }\ ] }' ### [Example with streaming](https://v0.app/docs/api/model#example-with-streaming) curl https://api.v0.dev/v1/chat/completions \ -H "Authorization: Bearer $V0_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "v0-1.5-md", "stream": true, "messages": [\ { "role": "user", "content": "Add login to my Next.js app" }\ ] }' ### [Response](https://v0.app/docs/api/model#response) If `stream` is `false` (default), the response is a JSON object: { "id": "v0-123", "model": "v0-1.5-md", "object": "chat.completion", "created": 1715620000, "choices": [\ {\ "index": 0,\ "message": {\ "role": "assistant",\ "content": "Here's how to add login to your Next.js app..."\ },\ "finish_reason": "stop"\ }\ ] } If `stream` is `true`, the server returns a series of data chunks formatted as [Server-Sent Events (SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) . Each line begins with `data:` followed by a partial delta: { "id": "v0-123", "model": "v0-1.5-md", "object": "chat.completion.chunk", "choices": [\ {\ "delta": {\ "role": "assistant",\ "content": "Here's how"\ },\ "index": 0,\ "finish_reason": null\ }\ ] } [Usage limits](https://v0.app/docs/api/model#usage-limits) ----------------------------------------------------------- | Model | Max context window size | Max output context size | | --- | --- | --- | | v0-1.0-md | 128,000 tokens | 64,000 tokens | | v0-1.5-md | 128,000 tokens | 64,000 tokens | | v0-1.5-lg | 512,000 tokens | 64,000 tokens | To request a higher limit, contact us at [support@v0.dev](mailto:support@v0.dev) . By using our API, you agree to our [API Terms](https://vercel.com/legal/api-terms) . [Overview\ \ Two APIs for AI-powered development - choose the one that fits your needs](https://v0.app/docs/api) [Quickstart\ \ Get started with the v0 Platform API in minutes](https://v0.app/docs/api/platform/quickstart) --- # MCP Server | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/Adapters MCP Server ========== Copy page The v0 MCP (Model Context Protocol) server allows you to integrate v0's capabilities directly into your IDE, providing seamless access to v0's AI-powered code generation and assistance. [Overview](https://v0.app/docs/api/platform/adapters/mcp-server#overview) -------------------------------------------------------------------------- The v0 MCP server enables your IDE's AI assistant to: * Create and manage v0 chats * Access v0's code generation capabilities * Leverage v0's design and development expertise * Integrate v0 workflows into your development process [Supported IDEs](https://v0.app/docs/api/platform/adapters/mcp-server#supported-ides) -------------------------------------------------------------------------------------- The v0 MCP server works with any IDE that supports the Model Context Protocol, including: * **Cursor** - AI-powered code editor * **Claude Desktop** - Anthropic's Claude desktop application * **VS Code** (with MCP extensions) * **Any MCP-compatible IDE** [Configuration](https://v0.app/docs/api/platform/adapters/mcp-server#configuration) ------------------------------------------------------------------------------------ ### [Prerequisites](https://v0.app/docs/api/platform/adapters/mcp-server#prerequisites) 1. **v0 API Key**: Get your API key from your [v0 account settings](https://v0.app/chat/settings/keys) 2. **Environment Variable**: Set your API key as an environment variable: export V0_API_KEY=your_api_key_here ### [IDE Configuration](https://v0.app/docs/api/platform/adapters/mcp-server#ide-configuration) Add the following configuration to your IDE's MCP settings: #### [Cursor](https://v0.app/docs/api/platform/adapters/mcp-server#cursor) Add to your Cursor settings (`~/.cursor/mcp.json`): { "mcpServers": { "v0": { "command": "npx", "args": [\ "mcp-remote",\ "https://mcp.v0.dev",\ "--header",\ "Authorization: Bearer ${V0_API_KEY}"\ ] } } } #### [Claude Desktop](https://v0.app/docs/api/platform/adapters/mcp-server#claude-desktop) Add to your Claude Desktop configuration (`~/.config/claude-desktop/config.json` on Linux/macOS or `%APPDATA%\Claude Desktop\config.json` on Windows): { "mcpServers": { "v0": { "command": "npx", "args": [\ "mcp-remote",\ "https://mcp.v0.dev",\ "--header",\ "Authorization: Bearer ${V0_API_KEY}"\ ] } } } #### [VS Code](https://v0.app/docs/api/platform/adapters/mcp-server#vs-code) Install an MCP extension and add the v0 server configuration: { "mcpServers": { "v0": { "command": "npx", "args": [\ "mcp-remote",\ "https://mcp.v0.dev",\ "--header",\ "Authorization: Bearer ${V0_API_KEY}"\ ] } } } [Usage](https://v0.app/docs/api/platform/adapters/mcp-server#usage) -------------------------------------------------------------------- Once configured, your IDE's AI assistant will have access to v0's MCP tools. You can: ### [Create Chats](https://v0.app/docs/api/platform/adapters/mcp-server#create-chats) Ask your AI assistant to create new v0 chats with specific prompts: "Create a v0 chat for building a React dashboard component" ### [Access Chat Information](https://v0.app/docs/api/platform/adapters/mcp-server#access-chat-information) Get details about existing chats: "Show me the details of v0 chat ID abc123" ### [Find Chats](https://v0.app/docs/api/platform/adapters/mcp-server#find-chats) Search through your v0 chats: "Find my v0 chats related to React components" ### [Send Messages](https://v0.app/docs/api/platform/adapters/mcp-server#send-messages) Continue conversations in existing chats: "Send a message to chat abc123 asking to add dark mode support" [Environment Variables](https://v0.app/docs/api/platform/adapters/mcp-server#environment-variables) ---------------------------------------------------------------------------------------------------- Make sure your `V0_API_KEY` environment variable is properly set: ### [macOS/Linux](https://v0.app/docs/api/platform/adapters/mcp-server#macoslinux) # Add to your shell profile (~/.bashrc, ~/.zshrc, etc.) export V0_API_KEY=your_api_key_here ### [Windows](https://v0.app/docs/api/platform/adapters/mcp-server#windows) # Set permanently setx V0_API_KEY "your_api_key_here" # Or set for current session set V0_API_KEY=your_api_key_here [Troubleshooting](https://v0.app/docs/api/platform/adapters/mcp-server#troubleshooting) ---------------------------------------------------------------------------------------- ### [Common Issues](https://v0.app/docs/api/platform/adapters/mcp-server#common-issues) **"Command not found: npx"** * Install Node.js and npm: [https://nodejs.org/](https://nodejs.org/) **"Permission denied"** * Ensure your API key is correctly set in the environment variable * Verify the API key has the necessary permissions **"Connection failed"** * Check your internet connection * Verify the MCP server URL: `https://mcp.v0.dev` * Ensure your firewall allows outbound connections **"Invalid API key"** * Regenerate your API key from [v0 account settings](https://v0.app/chat/settings/keys) * Ensure the environment variable is properly exported [Next Steps](https://v0.app/docs/api/platform/adapters/mcp-server#next-steps) ------------------------------------------------------------------------------ After configuring the MCP server, explore the [Platform API documentation](https://v0.app/docs/api/platform) to understand the full range of capabilities available through v0's API. [React Components Example\ \ Using v0-sdk React components for streaming UI responses](https://v0.app/docs/api/platform/examples/react-components) [AI Tools\ \ Integrate v0 Platform API with AI SDK to build autonomous agents and intelligent workflows](https://v0.app/docs/api/platform/adapters/ai-tools) --- # AI Tools Example | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/Examples AI Tools Example ================ Copy page Using v0-sdk with AI SDK for programmatic interaction Learn how to build AI agents that can autonomously interact with the v0 platform using `@v0-sdk/ai-tools` and the AI SDK for complex workflows and automation. [Setup](https://v0.app/docs/api/platform/examples/ai-tools#setup) ------------------------------------------------------------------ 1. **Install dependencies:** pnpm install 2. **Set up environment variables:** Create a `.env` file in this directory: V0_API_KEY=your_v0_api_key_here AI_GATEWAY_API_KEY=your_ai_gateway_api_key_here 3. **Get your API keys:** * **v0 API Key**: Get from [v0.dev](https://v0.dev/) account settings * **AI Gateway API Key**: Get from [vercel.com](https://vercel.com/) AI Gateway settings [Examples](https://v0.app/docs/api/platform/examples/ai-tools#examples) ------------------------------------------------------------------------ ### [Simple Example (Recommended Start)](https://v0.app/docs/api/platform/examples/ai-tools#simple-example-recommended-start) pnpm dev Shows the basic structure and available tools without AI SDK complexity. ### [Full AI Integration Examples](https://v0.app/docs/api/platform/examples/ai-tools#full-ai-integration-examples) # Complete workflow examples pnpm dev:full # Chat-focused example pnpm dev:chat # Project management example pnpm dev:project # Advanced agent patterns example pnpm dev:agent **Note**: The full AI integration examples require compatible versions of AI SDK and may have type compatibility issues. Start with the simple example first. [Key Concepts](https://v0.app/docs/api/platform/examples/ai-tools#key-concepts) -------------------------------------------------------------------------------- ### [1\. All Tools (High Context)](https://v0.app/docs/api/platform/examples/ai-tools#1-all-tools-high-context) import { v0Tools } from '@v0-sdk/ai-tools' const result = await generateText({ model: 'openai/gpt-5-mini', prompt: 'Create a new React component', tools: v0Tools({ apiKey: process.env.V0_API_KEY }), }) ⚠️ **Note**: This includes all ~20+ tools which adds significant context to your AI calls. ### [2\. Selective Tools (Recommended)](https://v0.app/docs/api/platform/examples/ai-tools#2-selective-tools-recommended) import { v0ToolsByCategory } from '@v0-sdk/ai-tools' const tools = v0ToolsByCategory({ apiKey: process.env.V0_API_KEY }) const result = await generateText({ model: 'openai/gpt-5-mini', prompt: 'Create a new project and chat', tools: { ...tools.project, // Only project tools ...tools.chat, // Only chat tools }, }) ### [3\. Available Tool Categories](https://v0.app/docs/api/platform/examples/ai-tools#3-available-tool-categories) * **`tools.chat`** - Create, manage, and interact with v0 chats * **`tools.project`** - Create and manage v0 projects * **`tools.deployment`** - Handle deployments and logs * **`tools.user`** - Get user information and billing details * **`tools.hook`** - Manage webhooks for events [Agent Patterns](https://v0.app/docs/api/platform/examples/ai-tools#agent-patterns) ------------------------------------------------------------------------------------ The `dev:agent` example demonstrates advanced AI agent patterns: ### [1\. Multi-Step Agent with `stopWhen`](https://v0.app/docs/api/platform/examples/ai-tools#1-multi-step-agent-with-stopwhen) * Autonomous agents that can plan and execute complex workflows * Uses `stepCountIs()` to control execution length * Structured answers with answer tools ### [2\. Sequential Processing (Chains)](https://v0.app/docs/api/platform/examples/ai-tools#2-sequential-processing-chains) * Step-by-step workflows where each step builds on the previous * Quality checks and iterative improvement * Requirements analysis → Project creation → Validation ### [3\. Routing Agent](https://v0.app/docs/api/platform/examples/ai-tools#3-routing-agent) * Intelligent request classification and routing * Dynamic model selection based on complexity * Context-aware tool selection ### [4\. Parallel Processing](https://v0.app/docs/api/platform/examples/ai-tools#4-parallel-processing) * Independent tasks executed simultaneously * Efficient resource utilization * Result synthesis from multiple analyses ### [5\. Evaluator-Optimizer](https://v0.app/docs/api/platform/examples/ai-tools#5-evaluator-optimizer) * Feedback loops for continuous improvement * Quality assessment and iterative refinement * Self-improving workflows [Tips](https://v0.app/docs/api/platform/examples/ai-tools#tips) ---------------------------------------------------------------- 1. **Start with selective tools** - Only include the categories you need to reduce context size 2. **Use `stopWhen`** - Control agent execution with conditions like `stepCountIs(n)` 3. **Handle errors** - Wrap AI calls in try-catch blocks 4. **Monitor usage** - Check your API usage on both v0 and AI Gateway platforms [Troubleshooting](https://v0.app/docs/api/platform/examples/ai-tools#troubleshooting) -------------------------------------------------------------------------------------- * **"Invalid API key"**: Check your `.env` file and API key validity * **"Tool not found"**: Ensure you're using the correct tool category * **Rate limits**: Both v0 and AI Gateway have rate limits - add delays if needed [Source Code](https://v0.app/docs/api/platform/examples/ai-tools#source-code) ------------------------------------------------------------------------------ View the complete source code on GitHub: [v0-sdk/examples/ai-tools-example](https://github.com/vercel/v0-sdk/tree/main/examples/ai-tools-example) [Classic v0\ \ A faithful recreation of the original v0.dev interface](https://v0.app/docs/api/platform/examples/classic-v0) [React Components Example\ \ Using v0-sdk React components for streaming UI responses](https://v0.app/docs/api/platform/examples/react-components) --- # React Components Example | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/Examples React Components Example ======================== Copy page Using v0-sdk React components for streaming UI responses Explore different design themes and interactive components for rendering real-time AI responses. This showcase demonstrates the full capabilities of `@v0-sdk/react` components. [Features](https://v0.app/docs/api/platform/examples/react-components#features) -------------------------------------------------------------------------------- * **Multiple Design Themes**: Elegant, Minimal, Neobrutalism, Terminal styles * **Streaming Responses**: Real-time rendering of AI-generated content * **Interactive Components**: Code blocks, thinking sections, task management * **Modern UI**: Built with Next.js 15, React 19, and Tailwind CSS * **Responsive Design**: Works across different screen sizes and devices [Design Themes](https://v0.app/docs/api/platform/examples/react-components#design-themes) ------------------------------------------------------------------------------------------ ### [Elegant Theme](https://v0.app/docs/api/platform/examples/react-components#elegant-theme) A sophisticated design with smooth animations and elegant typography. ### [Minimal Theme](https://v0.app/docs/api/platform/examples/react-components#minimal-theme) Clean, distraction-free interface focusing on content clarity. ### [Neobrutalism Theme](https://v0.app/docs/api/platform/examples/react-components#neobrutalism-theme) Bold, high-contrast design with sharp edges and vibrant colors. ### [Terminal Theme](https://v0.app/docs/api/platform/examples/react-components#terminal-theme) Developer-focused interface mimicking terminal aesthetics. ### [Streaming Theme](https://v0.app/docs/api/platform/examples/react-components#streaming-theme) Optimized for real-time streaming content with live updates. [Key Components](https://v0.app/docs/api/platform/examples/react-components#key-components) -------------------------------------------------------------------------------------------- ### [StreamingMessage Component](https://v0.app/docs/api/platform/examples/react-components#streamingmessage-component) import { StreamingMessage } from '@v0-sdk/react' function ChatInterface() { return ( { console.log('Streaming complete:', result) }} /> ) } ### [Code Block Component](https://v0.app/docs/api/platform/examples/react-components#code-block-component) import { CodeBlock } from '@v0-sdk/react' function CodeDisplay() { return ( ) } ### [Thinking Section Component](https://v0.app/docs/api/platform/examples/react-components#thinking-section-component) import { ThinkingSection } from '@v0-sdk/react' function AIThinking() { return ( ) } [Getting Started](https://v0.app/docs/api/platform/examples/react-components#getting-started) ---------------------------------------------------------------------------------------------- ### [Prerequisites](https://v0.app/docs/api/platform/examples/react-components#prerequisites) * Node.js 22+ * pnpm (recommended) or npm * v0 API key from [v0.dev/chat/settings/keys](https://v0.dev/chat/settings/keys) ### [Installation](https://v0.app/docs/api/platform/examples/react-components#installation) 1. Navigate to the react example directory: cd examples/v0-sdk-react-example 2. Install dependencies: pnpm install 3. Set up environment variables: export V0_API_KEY=your_api_key_here 4. Run the development server: pnpm dev 5. Open [http://localhost:3000](http://localhost:3000/) in your browser [Usage Patterns](https://v0.app/docs/api/platform/examples/react-components#usage-patterns) -------------------------------------------------------------------------------------------- ### [Basic Streaming](https://v0.app/docs/api/platform/examples/react-components#basic-streaming) import { useStreamingChat } from '@v0-sdk/react' function ChatApp() { const { messages, sendMessage, isLoading } = useStreamingChat({ apiKey: process.env.V0_API_KEY, }) return (
{messages.map((message, index) => ( ))}
) } ### [Theme Customization](https://v0.app/docs/api/platform/examples/react-components#theme-customization) import { ThemeProvider } from '@v0-sdk/react' function App() { return ( ) } ### [Custom Styling](https://v0.app/docs/api/platform/examples/react-components#custom-styling) import { StreamingMessage } from '@v0-sdk/react' function CustomChat() { return ( ) } [Technologies Used](https://v0.app/docs/api/platform/examples/react-components#technologies-used) -------------------------------------------------------------------------------------------------- * **Frontend Framework**: Next.js 15 with App Router * **React Version**: React 19 * **Styling**: Tailwind CSS with custom design systems * **UI Components**: Custom components optimized for AI content * **Animations**: Framer Motion for smooth interactions * **Code Highlighting**: Syntax highlighting for code blocks [Environment Variables](https://v0.app/docs/api/platform/examples/react-components#environment-variables) ---------------------------------------------------------------------------------------------------------- | Variable | Description | Required | | --- | --- | --- | | `V0_API_KEY` | Your v0 API key for authentication | Yes | [Source Code](https://v0.app/docs/api/platform/examples/react-components#source-code) -------------------------------------------------------------------------------------- View the complete source code on GitHub: [v0-sdk/examples/v0-sdk-react-example](https://github.com/vercel/v0-sdk/tree/main/examples/v0-sdk-react-example) [AI Tools Example\ \ Using v0-sdk with AI SDK for programmatic interaction](https://v0.app/docs/api/platform/examples/ai-tools) [MCP Server\ \ The v0 MCP (Model Context Protocol) server allows you to integrate v0's capabilities directly into your IDE, providing seamless access to v0's AI-powered code generation and assistance.](https://v0.app/docs/api/platform/adapters/mcp-server) --- # AI Tools | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/Adapters AI Tools ======== Copy page Integrate v0 Platform API with AI SDK to build autonomous agents and intelligent workflows The AI Tools adapter enables AI agents to interact with the v0 Platform API through the AI SDK, allowing for autonomous workflows, intelligent code generation, and automated project management. [Overview](https://v0.app/docs/api/platform/adapters/ai-tools#overview) ------------------------------------------------------------------------ The AI Tools adapter provides: * **Autonomous Agents**: AI agents that can independently manage v0 projects * **Intelligent Workflows**: Multi-step processes with AI decision-making * **Tool Integration**: Seamless integration with popular AI frameworks * **Context-Aware Operations**: AI agents understand project context and requirements [Supported AI Frameworks](https://v0.app/docs/api/platform/adapters/ai-tools#supported-ai-frameworks) ------------------------------------------------------------------------------------------------------ ### [AI SDK (Vercel)](https://v0.app/docs/api/platform/adapters/ai-tools#ai-sdk-vercel) The primary integration for building AI agents with v0 capabilities: import { generateText } from 'ai' import { v0Tools } from '@v0-sdk/ai-tools' const result = await generateText({ model: openai('gpt-4o-mini'), prompt: 'Create a React dashboard with charts', tools: v0Tools({ apiKey: process.env.V0_API_KEY, }), }) ### [LangChain](https://v0.app/docs/api/platform/adapters/ai-tools#langchain) Integration with LangChain for complex agent workflows: import { ChatOpenAI } from 'langchain/chat_models/openai' import { V0Tools } from '@v0-sdk/langchain-tools' const model = new ChatOpenAI({ modelName: 'gpt-4o-mini', }) const tools = new V0Tools({ apiKey: process.env.V0_API_KEY, }) const agent = createReactAgent({ llm: model, tools: tools.getTools(), }) ### [OpenAI Functions](https://v0.app/docs/api/platform/adapters/ai-tools#openai-functions) Direct integration with OpenAI's function calling: import OpenAI from 'openai' import { v0FunctionDefinitions } from '@v0-sdk/openai-functions' const openai = new OpenAI() const response = await openai.chat.completions.create({ model: 'gpt-4o-mini', messages: [\ {\ role: 'user',\ content: 'Build a todo app with React and deploy it',\ },\ ], functions: v0FunctionDefinitions, function_call: 'auto', }) [Installation](https://v0.app/docs/api/platform/adapters/ai-tools#installation) -------------------------------------------------------------------------------- npm install @v0-sdk/ai-tools ai # or pnpm add @v0-sdk/ai-tools ai For specific frameworks: # LangChain integration npm install @v0-sdk/langchain-tools langchain # OpenAI Functions npm install @v0-sdk/openai-functions openai [Configuration](https://v0.app/docs/api/platform/adapters/ai-tools#configuration) ---------------------------------------------------------------------------------- ### [Environment Variables](https://v0.app/docs/api/platform/adapters/ai-tools#environment-variables) V0_API_KEY=your_v0_api_key_here OPENAI_API_KEY=your_openai_api_key_here # or ANTHROPIC_API_KEY=your_anthropic_api_key_here ### [Tool Categories](https://v0.app/docs/api/platform/adapters/ai-tools#tool-categories) Choose specific tool categories for better performance: import { v0ToolsByCategory } from '@v0-sdk/ai-tools' const tools = v0ToolsByCategory({ apiKey: process.env.V0_API_KEY, }) // Use specific categories const projectAndChatTools = { ...tools.project, ...tools.chat, } [Agent Patterns](https://v0.app/docs/api/platform/adapters/ai-tools#agent-patterns) ------------------------------------------------------------------------------------ ### [Project Creation Agent](https://v0.app/docs/api/platform/adapters/ai-tools#project-creation-agent) const projectAgent = await generateText({ model: openai('gpt-4o-mini'), prompt: ` Create a new project for a React e-commerce website. The project should include: - Product catalog - Shopping cart - Checkout process - User authentication `, tools: { ...tools.project, ...tools.chat, }, }) ### [Development Workflow Agent](https://v0.app/docs/api/platform/adapters/ai-tools#development-workflow-agent) const developmentAgent = await generateText({ model: openai('gpt-4o-mini'), prompt: ` I need to: 1. Create a new project 2. Start a development chat 3. Build the initial components 4. Deploy when ready Project: Personal portfolio website with blog `, tools: v0Tools({ apiKey: process.env.V0_API_KEY, }), stopWhen: stepCountIs(10), }) ### [Deployment Management Agent](https://v0.app/docs/api/platform/adapters/ai-tools#deployment-management-agent) const deploymentAgent = await generateText({ model: openai('gpt-4o-mini'), prompt: 'Deploy project xyz123 and monitor its status', tools: { ...tools.deployment, ...tools.project, }, }) [Advanced Workflows](https://v0.app/docs/api/platform/adapters/ai-tools#advanced-workflows) -------------------------------------------------------------------------------------------- ### [Multi-Agent Collaboration](https://v0.app/docs/api/platform/adapters/ai-tools#multi-agent-collaboration) // Project Manager Agent const projectManager = await generateText({ model: openai('gpt-4o-mini'), prompt: 'Plan and create a new SaaS dashboard project', tools: tools.project, }) // Development Agent const developer = await generateText({ model: openai('gpt-4o-mini'), prompt: `Build the dashboard components for project ${projectId}`, tools: tools.chat, }) // DevOps Agent const devops = await generateText({ model: openai('gpt-4o-mini'), prompt: `Deploy and monitor project ${projectId}`, tools: tools.deployment, }) ### [Conditional Logic](https://v0.app/docs/api/platform/adapters/ai-tools#conditional-logic) const smartAgent = await generateText({ model: openai('gpt-4o-mini'), prompt: ` Check if project "my-app" exists. If it exists, add a new feature. If it doesn't exist, create it first. `, tools: v0Tools({ apiKey: process.env.V0_API_KEY, }), }) ### [Error Recovery](https://v0.app/docs/api/platform/adapters/ai-tools#error-recovery) try { const result = await generateText({ model: openai('gpt-4o-mini'), prompt: 'Deploy the latest version of my project', tools: tools.deployment, }) } catch (error) { // Retry with error context const recovery = await generateText({ model: openai('gpt-4o-mini'), prompt: ` Previous deployment failed with error: ${error.message} Please diagnose and fix the issue, then retry deployment. `, tools: { ...tools.deployment, ...tools.project, }, }) } [Best Practices](https://v0.app/docs/api/platform/adapters/ai-tools#best-practices) ------------------------------------------------------------------------------------ ### [1\. Use Selective Tools](https://v0.app/docs/api/platform/adapters/ai-tools#1-use-selective-tools) Only include the tool categories you need: // Good: Specific tools for the task const tools = { ...toolsByCategory.project, ...toolsByCategory.chat, } // Avoid: All tools (high context overhead) const allTools = v0Tools({ apiKey }) ### [2\. Set Execution Limits](https://v0.app/docs/api/platform/adapters/ai-tools#2-set-execution-limits) Control agent execution with step limits: const result = await generateText({ model: openai('gpt-4o-mini'), prompt: 'Build and deploy a complete app', tools: v0Tools({ apiKey }), stopWhen: stepCountIs(15), // Prevent infinite loops }) ### [3\. Handle Errors Gracefully](https://v0.app/docs/api/platform/adapters/ai-tools#3-handle-errors-gracefully) const result = await generateText({ model: openai('gpt-4o-mini'), prompt: 'Create a project', tools: tools.project, onError: (error) => { console.error('Agent error:', error) // Implement recovery logic }, }) ### [4\. Monitor Usage](https://v0.app/docs/api/platform/adapters/ai-tools#4-monitor-usage) Track API calls and costs: let apiCallCount = 0 const monitoredTools = v0Tools({ apiKey: process.env.V0_API_KEY, onApiCall: (endpoint, cost) => { apiCallCount++ console.log(`API call ${apiCallCount}: ${endpoint} (cost: ${cost})`) }, }) [Troubleshooting](https://v0.app/docs/api/platform/adapters/ai-tools#troubleshooting) -------------------------------------------------------------------------------------- ### [Common Issues](https://v0.app/docs/api/platform/adapters/ai-tools#common-issues) **"Tool not found"** * Ensure you're using the correct tool category * Check that the tool is included in your tools object **"Rate limit exceeded"** * Implement delays between API calls * Use selective tools to reduce call frequency **"Invalid API key"** * Verify your v0 API key is correctly set * Check API key permissions and scope **"Agent stuck in loop"** * Use `stopWhen` conditions to limit execution * Add explicit termination criteria in prompts [Examples](https://v0.app/docs/api/platform/adapters/ai-tools#examples) ------------------------------------------------------------------------ See the complete [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) for detailed implementation examples and agent patterns. [Requirements](https://v0.app/docs/api/platform/adapters/ai-tools#requirements) -------------------------------------------------------------------------------- * Node.js 22+ * AI SDK 5.0+ or compatible AI framework * v0 API key from [v0.dev](https://v0.dev/chat/settings/keys) [Links](https://v0.app/docs/api/platform/adapters/ai-tools#links) ------------------------------------------------------------------ * [AI Tools Package](https://v0.app/docs/api/platform/packages/ai-tools) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [GitHub Repository](https://github.com/vercel/v0-sdk/tree/main/packages/ai-tools) [MCP Server\ \ The v0 MCP (Model Context Protocol) server allows you to integrate v0's capabilities directly into your IDE, providing seamless access to v0's AI-powered code generation and assistance.](https://v0.app/docs/api/platform/adapters/mcp-server) [v0-sdk\ \ TypeScript SDK for the v0 Platform API](https://v0.app/docs/api/platform/packages/v0-sdk) --- # Overview | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu Overview ======== Copy page Two APIs for AI-powered development - choose the one that fits your needs Model API OpenAI Compatible Direct AI model access for generating React components and Next.js apps. * • Framework-aware code generation * • Works with existing OpenAI tools * • Fast streaming responses * • Text + image inputs [Documentation](https://v0.app/docs/api/model) [Try It](https://ai-sdk.dev/playground/vercel:v0-1.5-md) Platform API Full Stack Complete development infrastructure for building dev tools and platforms. * • Chat & conversation management * • Code parsing & file generation * • Browser app execution * • Project & deployment tools [Documentation](https://v0.app/docs/api/platform) [Quick Start](https://v0.app/docs/api/platform/quickstart) [Quick Setup](https://v0.app/docs/api#quick-setup) --------------------------------------------------- Both APIs require an API key from [v0.app settings](https://v0.app/chat/settings/keys) and a Premium or Team plan. Add your API key to `.env`: V0_API_KEY=your_api_key_here **Model API:** Use with AI SDK → `pnpm add ai @ai-sdk/vercel` **Platform API:** Use v0 SDK → `pnpm add v0-sdk` [v0 Model API\ \ Next Page](https://v0.app/docs/api/model) --- # Delete Chat | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Delete Chat =========== Copy page Deletes a specific chat based on the provided chatId. This operation is irreversible and permanently removes the chat and its contents. DELETE/v1/chats/{chatId} [Usage](https://v0.app/docs/api/platform/reference/chats/delete#usage) ----------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.delete({ chatId: '123', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/delete#api-signature) --------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/delete#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/chats/delete#path-parameters) chatId: string The unique identifier of the chat to delete. This must be passed as a path parameter in the URL. ### [Response](https://v0.app/docs/api/platform/reference/chats/delete#response) id: string object: 'chat' deleted: 'true' [Initialize Chat\ \ Initializes a new chat from source content such as files, repositories, registries, or zip archives. Enables context-rich conversations based on code or assets.](https://v0.app/docs/api/platform/reference/chats/init) [Get Chat\ \ Retrieves the full details of a specific chat using its \`chatId\`. Includes messages, metadata, and associated configuration.](https://v0.app/docs/api/platform/reference/chats/get-by-id) --- # Quickstart | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API Quickstart ========== Copy page Get started with the v0 Platform API in minutes [v0 SDK](https://v0.app/docs/api/platform/quickstart#v0-sdk) ------------------------------------------------------------- The v0 SDK is a TypeScript library that makes it simple to interact with the v0 Platform API. [Installation](https://v0.app/docs/api/platform/quickstart#installation) ------------------------------------------------------------------------- pnpm add v0-sdk [Authentication](https://v0.app/docs/api/platform/quickstart#authentication) ----------------------------------------------------------------------------- Get your API key from your [v0 account settings](https://v0.app/chat/settings/keys) and set it as an environment variable: Add your API key to `.env`: V0_API_KEY=your_api_key_here The SDK automatically uses the `V0_API_KEY` environment variable: import { v0 } from 'v0-sdk' // No initialization needed - uses V0_API_KEY automatically [Use Case 1: Get a Chat URL for Iframe Embedding](https://v0.app/docs/api/platform/quickstart#use-case-1-get-a-chat-url-for-iframe-embedding) ---------------------------------------------------------------------------------------------------------------------------------------------- Create a chat and embed it directly in your application: // Create a new chat const chat = await v0.chats.create({ message: 'Create a responsive navbar with Tailwind CSS' }) // Use the Demo URL in an iframe [Use Case 2: Get Generated Files](https://v0.app/docs/api/platform/quickstart#use-case-2-get-generated-files) -------------------------------------------------------------------------------------------------------------- Create a chat and access the generated code files: // Create a chat const chat = await v0.chats.create({ message: 'Build a todo app with React and TypeScript', }) // Access the generated files chat.files?.forEach((file) => { console.log(`File: ${file.name}`) console.log(`Content: ${file.content}`) }) [Continue the Conversation](https://v0.app/docs/api/platform/quickstart#continue-the-conversation) --------------------------------------------------------------------------------------------------- Add follow-up messages to refine the output: // Add a follow-up message const response = await v0.chats.sendMessage({ chatId: chat.id, message: 'Add dark mode support', }) That's it! You now have everything you need to integrate v0's AI-powered code generation into your application. [v0 Model API\ \ Previous Page](https://v0.app/docs/api/model) [Overview\ \ Core concepts, capabilities, and architecture](https://v0.app/docs/api/platform/overview) --- # Favorite Chat | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Favorite Chat ============= Copy page Marks or unmarks a chat as a favorite using its \`chatId\`. This helps with organizing and quickly accessing important chats. PUT/v1/chats/{chatId}/favorite [Usage](https://v0.app/docs/api/platform/reference/chats/favorite#usage) ------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.favorite({ chatId: '123', isFavorite: true, }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/favorite#api-signature) ----------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/favorite#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/chats/favorite#path-parameters) chatId: string The unique identifier of the chat to update. Provided as a path parameter. #### [Body](https://v0.app/docs/api/platform/reference/chats/favorite#body) isFavorite: boolean Specifies whether the chat should be marked as a favorite. * `"true"`: mark as favorite * `"false"`: remove from favorites ### [Response](https://v0.app/docs/api/platform/reference/chats/favorite#response) id: string object: 'chat' favorited: boolean [Update Chat\ \ Updates the metadata of an existing chat using its \`chatId\`. Supports changes to the chat name and privacy setting.](https://v0.app/docs/api/platform/reference/chats/update) [Fork Chat\ \ Creates a new chat fork (duplicate) from a specific version within an existing chat. Useful for branching off alternate directions without modifying the original conversation.](https://v0.app/docs/api/platform/reference/chats/fork) --- # Download version files | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Download version files ====================== Copy page Download all files for a specific chat version as a zip or tarball archive. Use includeDefaultFiles=true to include all deployment files (package.json, configuration files, etc.) or false/omitted to return only the generated source files. GET/v1/chats/{chatId}/versions/{versionId}/download [Usage](https://v0.app/docs/api/platform/reference/chats/download-version#usage) --------------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.downloadVersion({ chatId: '123', versionId: '456', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/download-version#api-signature) ------------------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/download-version#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/chats/download-version#path-parameters) chatId: string The unique identifier of the chat containing the version. Provided as a path parameter. versionId: string The unique identifier of the version to download. Provided as a path parameter. #### [Query Parameters](https://v0.app/docs/api/platform/reference/chats/download-version#query-parameters) format?: 'zip' | 'tarball' The archive format for the download. Choose "zip" for broad compatibility or "tarball" for Unix/Linux systems. includeDefaultFiles?: 'true' | 'false' When true, includes all default files (package.json, configuration files, etc.) that would be part of a complete deployment. When false or omitted, returns only the generated source files. [Resume Message\ \ Resumes processing of a previously interrupted or incomplete message in a chat. Useful for continuing generation when a message was paused or stopped.](https://v0.app/docs/api/platform/reference/chats/resume) [Create Deployment\ \ Create a new deployment for a specific chat and version. This will trigger a deployment to Vercel.](https://v0.app/docs/api/platform/reference/deployments/create) --- # Environment Variables | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/Guides Environment Variables ===================== Copy page Learn how to manage environment variables and configuration in v0 projects Learn how to securely manage environment variables and configuration settings in your v0 projects. Environment variables are tied to projects, making them available across all chats in that project. [Overview](https://v0.app/docs/api/platform/guides/environment-variables#overview) ----------------------------------------------------------------------------------- Environment variables in v0 provide a secure way to manage: * **API keys and secrets** - Database connections, third-party services * **Configuration settings** - Feature flags, deployment settings * **Build-time variables** - Framework configurations, asset paths Environment variables are **project-scoped**, meaning all chats in a project have access to the same environment variables. [Managing Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables#managing-environment-variables) ------------------------------------------------------------------------------------------------------------------------------- ### [Creating Variables](https://v0.app/docs/api/platform/guides/environment-variables#creating-variables) import { v0 } from 'v0-sdk' // Create new environment variables await v0.projects.createEnvVars({ projectId: 'your-project-id', environmentVariables: [\ {\ key: 'DATABASE_URL',\ value: 'postgresql://localhost:5432/myapp',\ },\ {\ key: 'API_KEY',\ value: 'your-api-key-here',\ },\ ], }) // Create or update variables (upsert) await v0.projects.createEnvVars({ projectId: 'your-project-id', upsert: true, environmentVariables: [\ {\ key: 'DATABASE_URL',\ value: 'postgresql://newhost:5432/myapp',\ },\ ], }) ### [Reading Variables](https://v0.app/docs/api/platform/guides/environment-variables#reading-variables) // Get all environment variables for a project const envVars = await v0.projects.findEnvVars({ projectId: 'your-project-id', decrypted: 'false', // 'true' to get decrypted values }) console.log('Environment variables:', envVars.data) ### [Updating Variables](https://v0.app/docs/api/platform/guides/environment-variables#updating-variables) // Update existing variables by ID await v0.projects.updateEnvVars({ projectId: 'your-project-id', environmentVariables: [\ {\ id: 'env-var-id-1',\ value: 'updated-value',\ },\ ], }) ### [Deleting Variables](https://v0.app/docs/api/platform/guides/environment-variables#deleting-variables) // Delete variables by ID await v0.projects.deleteEnvVars({ projectId: 'your-project-id', environmentVariableIds: ['env-var-id-1', 'env-var-id-2'], }) ### [Getting Individual Variables](https://v0.app/docs/api/platform/guides/environment-variables#getting-individual-variables) // Get a specific environment variable by ID const envVar = await v0.projects.getEnvVar({ projectId: 'your-project-id', environmentVariableId: 'env-var-id-1', }) console.log('Environment variable:', envVar.data) [Usage in Development](https://v0.app/docs/api/platform/guides/environment-variables#usage-in-development) ----------------------------------------------------------------------------------------------------------- ### [Chat Context](https://v0.app/docs/api/platform/guides/environment-variables#chat-context) Environment variables are automatically available in chat sessions when you link your chat to a project: // Start a chat with project context const chat = await v0.chats.init({ projectId: 'your-project-id', files: existingFiles, initialContext: ` Configure the database connection using the DATABASE_URL environment variable. Use the API_KEY for third-party service authentication. `, }) // AI can reference and use environment variables in generated code [Best Practices](https://v0.app/docs/api/platform/guides/environment-variables#best-practices) ----------------------------------------------------------------------------------------------- ### [1\. Secure Secrets Management](https://v0.app/docs/api/platform/guides/environment-variables#1-secure-secrets-management) // ✅ Good: Keep sensitive data in environment variables await v0.projects.createEnvVars({ projectId, environmentVariables: [\ { key: 'DATABASE_PASSWORD', value: 'secret-password' },\ { key: 'API_SECRET_KEY', value: 'sk_live_...' },\ { key: 'APP_NAME', value: 'My App' }, // Not sensitive\ ], }) ### [2\. Consistent Naming](https://v0.app/docs/api/platform/guides/environment-variables#2-consistent-naming) // ✅ Good: Consistent naming convention const variables = [\ // Database\ { key: 'DATABASE_URL', value: 'postgresql://...' },\ { key: 'DATABASE_POOL_SIZE', value: '10' },\ \ // API Configuration\ { key: 'API_BASE_URL', value: 'https://api.example.com' },\ { key: 'API_TIMEOUT', value: '30000' },\ \ // Feature Flags\ { key: 'FEATURE_NEW_UI', value: 'true' },\ { key: 'FEATURE_BETA_FEATURES', value: 'false' },\ ] ### [3\. Documentation](https://v0.app/docs/api/platform/guides/environment-variables#3-documentation) Document your environment variables for team members: // Document your environment variables const environmentVariables = { // Database Configuration DATABASE_URL: { description: 'PostgreSQL connection string', example: 'postgresql://user:pass@localhost:5432/dbname', required: true, }, // API Configuration API_KEY: { description: 'Third-party service API key', example: 'sk_live_...', required: true, }, // Optional Configuration LOG_LEVEL: { description: 'Logging level', example: 'info', default: 'info', options: ['debug', 'info', 'warn', 'error'], }, } [Start from Existing Code\ \ Learn how to start v0 chats from existing codebases, repositories, and file structures](https://v0.app/docs/api/platform/guides/start-from-existing-code) [Lock Files from AI Changes\ \ Learn how to protect files from AI modifications in v0 chats](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) --- # Find Chat Versions | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Find Chat Versions ================== Copy page Retrieves a list of all versions (iterations) for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes version status and demo URLs. GET/v1/chats/{chatId}/versions [Usage](https://v0.app/docs/api/platform/reference/chats/find-versions#usage) ------------------------------------------------------------------------------ TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.findVersions() console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/find-versions#api-signature) ---------------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/find-versions#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/chats/find-versions#path-parameters) chatId: string The unique identifier of the chat to retrieve versions for. Provided as a path parameter. #### [Query Parameters](https://v0.app/docs/api/platform/reference/chats/find-versions#query-parameters) limit?: number Specifies the maximum number of version records to return in a single response. Useful for paginating results when there are many versions. cursor?: string Base64 encoded cursor containing pagination data ### [Response](https://v0.app/docs/api/platform/reference/chats/find-versions#response) object: 'list' data: object\[\] id?: string A unique identifier for the version. object?: 'version' Fixed value identifying this object as a version. status?: 'pending' | 'completed' | 'failed' The current status of the version generation process. demoUrl?: string Optional URL for previewing the generated output. screenshotUrl?: string URL to retrieve a screenshot of this version. createdAt?: string The date and time when the version was created, in ISO 8601 format. updatedAt?: string The date and time when the version was last updated, in ISO 8601 format. pagination: object hasMore: boolean nextCursor?: string nextUrl?: string [Get Chat Message\ \ Retrieves detailed information about a specific message within a chat, including content, files, model configuration, and demo URLs.](https://v0.app/docs/api/platform/reference/chats/get-message) [Get Chat Version\ \ Retrieves detailed information about a specific version of a chat, including all files with their content and lock status.](https://v0.app/docs/api/platform/reference/chats/get-version) --- # Get Chat Message | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Get Chat Message ================ Copy page Retrieves detailed information about a specific message within a chat, including content, files, model configuration, and demo URLs. GET/v1/chats/{chatId}/messages/{messageId} [Usage](https://v0.app/docs/api/platform/reference/chats/get-message#usage) ---------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.getMessage() console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/get-message#api-signature) -------------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/get-message#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/chats/get-message#path-parameters) chatId: string The unique identifier of the chat containing the message. Provided as a path parameter. messageId: string The unique identifier of the message to retrieve. Provided as a path parameter. ### [Response](https://v0.app/docs/api/platform/reference/chats/get-message#response) id: string A unique identifier for the message. object: 'message' Fixed value identifying this object as a message. content: string The main text content of the message. experimental\_content?: any\[\] | any\[\]\[\] The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change. createdAt: string The ISO timestamp representing when the message was created. updatedAt?: string The ISO timestamp representing when the message was last updated. type: 'message' | 'forked-block' | 'forked-chat' | 'open-in-v0' | 'refinement' | 'added-environment-variables' | 'added-integration' | 'deleted-file' | 'moved-file' | 'renamed-file' | 'edited-file' | 'replace-src' | 'reverted-block' | 'fix-with-v0' | 'auto-fix-with-v0' | 'sync-git' | 'fix-cve' | 'answered-questions' Indicates the format or category of the message, such as plain text or code. role: 'user' | 'assistant' Specifies whether the message was sent by the user or the assistant. finishReason?: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other' | 'unknown' The reason why the message generation finished. apiUrl: string API URL to access this message via the API. authorId: stringnull The ID of the user who sent the message. parentId?: stringnull The ID of the parent message. attachments?: object\[\] url: string The URL where the attachment file can be accessed. name?: string The original filename of the attachment. contentType?: string The MIME type of the attachment file (e.g., image/png, application/pdf). size: number The size of the attachment file in bytes. content?: string The base64-encoded content of the attachment file, if available. type?: 'screenshot' | 'figma' | 'zip' Optional v0-specific attachment type for enhanced processing. chatId: string The ID of the chat to which this message belongs. [Find Chat Messages\ \ Retrieves a list of all messages for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes message content, role, and type information.](https://v0.app/docs/api/platform/reference/chats/find-messages) [Find Chat Versions\ \ Retrieves a list of all versions (iterations) for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes version status and demo URLs.](https://v0.app/docs/api/platform/reference/chats/find-versions) --- # Get Chat Version | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Get Chat Version ================ Copy page Retrieves detailed information about a specific version of a chat, including all files with their content and lock status. GET/v1/chats/{chatId}/versions/{versionId} [Usage](https://v0.app/docs/api/platform/reference/chats/get-version#usage) ---------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.getVersion() console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/get-version#api-signature) -------------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/get-version#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/chats/get-version#path-parameters) chatId: string The unique identifier of the chat containing the version. Provided as a path parameter. versionId: string The unique identifier of the version to retrieve. Provided as a path parameter. #### [Query Parameters](https://v0.app/docs/api/platform/reference/chats/get-version#query-parameters) includeDefaultFiles?: 'true' | 'false' When true, includes all default files (package.json, configuration files, etc.) that would be part of a ZIP download. When false or omitted, returns only the generated source files. ### [Response](https://v0.app/docs/api/platform/reference/chats/get-version#response) id: string A unique identifier for the version. object: 'version' Fixed value identifying this object as a version. status: 'pending' | 'completed' | 'failed' The current status of the version generation process. demoUrl?: string Optional URL for previewing the generated output. screenshotUrl?: string URL to retrieve a screenshot of this version. createdAt: string The date and time when the version was created, in ISO 8601 format. updatedAt?: string The date and time when the version was last updated, in ISO 8601 format. files: object\[\] A list of files that were generated or included in this version. object: 'file' Fixed value identifying this object as a file. name: string The name of the file, including its extension. content: string The full contents of the file as a raw string. locked: boolean Whether the file is locked to prevent AI from overwriting it during new version generation. [Find Chat Versions\ \ Retrieves a list of all versions (iterations) for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes version status and demo URLs.](https://v0.app/docs/api/platform/reference/chats/find-versions) [Update Chat Version Files\ \ Updates the source files of a specific chat version (block) manually. This allows editing generated files directly through the API.](https://v0.app/docs/api/platform/reference/chats/update-version) --- # Find Chats | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Find Chats ========== Copy page Retrieves a list of existing chats, with support for pagination and filtering by favorite status. Helps manage and navigate chat history. GET/v1/chats [Usage](https://v0.app/docs/api/platform/reference/chats/find#usage) --------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.find({ limit: '10', offset: '0', isFavorite: 'false', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/find#api-signature) ------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/find#request) #### [Query Parameters](https://v0.app/docs/api/platform/reference/chats/find#query-parameters) limit?: number Specifies the maximum number of chat records to return in a single response. Useful for paginating results when there are many chats. offset?: number Determines the starting point for pagination. Used in conjunction with limit to retrieve a specific page of chat results. isFavorite?: 'true' | 'false' Filters chats by their "favorite" status. Accepts `"true"` or `"false"` (as strings, not booleans). * `"true"`: returns only chats marked as favorites. * `"false"`: returns only non-favorite chats. ### [Response](https://v0.app/docs/api/platform/reference/chats/find#response) object: 'list' data: object\[\] id?: string A unique identifier for the chat. object?: 'chat' Fixed value identifying this object as a chat. shareable?: boolean Indicates whether the chat can be shared via public link. privacy?: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted' Defines the visibility of the chat—private, team-only, or public. name?: string An optional name assigned to the chat by the user. title?: string deprecated Deprecated title field preserved for backward compatibility. createdAt?: string The ISO timestamp representing when the chat was created. updatedAt?: string The ISO timestamp of the last update to the chat. favorite?: boolean Indicates whether the chat is marked as a favorite. authorId?: string The ID of the user who created the chat. projectId?: string Optional ID of the v0 project associated with this chat. webUrl?: string Web URL to view this chat in the browser. apiUrl?: string API URL to access this chat via the API. latestVersion?: object The most recent generated version of the chat, if available. id: string A unique identifier for the version. object: 'version' Fixed value identifying this object as a version. status: 'pending' | 'completed' | 'failed' The current status of the version generation process. demoUrl?: string Optional URL for previewing the generated output. screenshotUrl?: string URL to retrieve a screenshot of this version. createdAt: string The date and time when the version was created, in ISO 8601 format. updatedAt?: string The date and time when the version was last updated, in ISO 8601 format. [Create Chat\ \ Creates a new chat using a user message, optional system context, and model configuration. Useful for prompting the model within the scope of a specific project.](https://v0.app/docs/api/platform/reference/chats/create) [Initialize Chat\ \ Initializes a new chat from source content such as files, repositories, registries, or zip archives. Enables context-rich conversations based on code or assets.](https://v0.app/docs/api/platform/reference/chats/init) --- # Find Chat Messages | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Find Chat Messages ================== Copy page Retrieves a list of all messages for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes message content, role, and type information. GET/v1/chats/{chatId}/messages [Usage](https://v0.app/docs/api/platform/reference/chats/find-messages#usage) ------------------------------------------------------------------------------ TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.findMessages() console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/find-messages#api-signature) ---------------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/find-messages#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/chats/find-messages#path-parameters) chatId: string The unique identifier of the chat to retrieve messages for. Provided as a path parameter. #### [Query Parameters](https://v0.app/docs/api/platform/reference/chats/find-messages#query-parameters) limit?: number Specifies the maximum number of message records to return in a single response. Useful for paginating results when there are many messages. cursor?: string Base64 encoded cursor containing pagination data ### [Response](https://v0.app/docs/api/platform/reference/chats/find-messages#response) object: 'list' data: object\[\] id?: string A unique identifier for the message. object?: 'message' Fixed value identifying this object as a message. content?: string The main text content of the message. experimental\_content?: any\[\] | any\[\]\[\] The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change. createdAt?: string The ISO timestamp representing when the message was created. updatedAt?: string The ISO timestamp representing when the message was last updated. type?: 'message' | 'forked-block' | 'forked-chat' | 'open-in-v0' | 'refinement' | 'added-environment-variables' | 'added-integration' | 'deleted-file' | 'moved-file' | 'renamed-file' | 'edited-file' | 'replace-src' | 'reverted-block' | 'fix-with-v0' | 'auto-fix-with-v0' | 'sync-git' | 'fix-cve' | 'answered-questions' Indicates the format or category of the message, such as plain text or code. role?: 'user' | 'assistant' Specifies whether the message was sent by the user or the assistant. finishReason?: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other' | 'unknown' The reason why the message generation finished. apiUrl?: string API URL to access this message via the API. authorId?: stringnull The ID of the user who sent the message. parentId?: stringnull The ID of the parent message. attachments?: object\[\] url: string The URL where the attachment file can be accessed. name?: string The original filename of the attachment. contentType?: string The MIME type of the attachment file (e.g., image/png, application/pdf). size: number The size of the attachment file in bytes. content?: string The base64-encoded content of the attachment file, if available. type?: 'screenshot' | 'figma' | 'zip' Optional v0-specific attachment type for enhanced processing. pagination: object hasMore: boolean nextCursor?: string nextUrl?: string [Send Message\ \ Creates a new message in an existing chat. Triggers a model response using the provided prompt, with optional attachments and configuration settings.](https://v0.app/docs/api/platform/reference/chats/send-message) [Get Chat Message\ \ Retrieves detailed information about a specific message within a chat, including content, files, model configuration, and demo URLs.](https://v0.app/docs/api/platform/reference/chats/get-message) --- # Resume Message | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Resume Message ============== Copy page Resumes processing of a previously interrupted or incomplete message in a chat. Useful for continuing generation when a message was paused or stopped. POST/v1/chats/{chatId}/messages/{messageId}/resume [Usage](https://v0.app/docs/api/platform/reference/chats/resume#usage) ----------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.resume() console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/resume#api-signature) --------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/resume#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/chats/resume#path-parameters) chatId: string The unique identifier of the chat containing the message to resume. Provided as a path parameter. messageId: string The identifier of the specific message to resume. Provided as a path parameter. ### [Response](https://v0.app/docs/api/platform/reference/chats/resume#response) id: string A unique identifier for the message. object: 'message' Fixed value identifying this object as a message. content: string The main text content of the message. experimental\_content?: any\[\] | any\[\]\[\] The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change. createdAt: string The ISO timestamp representing when the message was created. updatedAt?: string The ISO timestamp representing when the message was last updated. type: 'message' | 'forked-block' | 'forked-chat' | 'open-in-v0' | 'refinement' | 'added-environment-variables' | 'added-integration' | 'deleted-file' | 'moved-file' | 'renamed-file' | 'edited-file' | 'replace-src' | 'reverted-block' | 'fix-with-v0' | 'auto-fix-with-v0' | 'sync-git' | 'fix-cve' | 'answered-questions' Indicates the format or category of the message, such as plain text or code. role: 'user' | 'assistant' Specifies whether the message was sent by the user or the assistant. finishReason?: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other' | 'unknown' The reason why the message generation finished. apiUrl: string API URL to access this message via the API. authorId: stringnull The ID of the user who sent the message. parentId?: stringnull The ID of the parent message. attachments?: object\[\] url: string The URL where the attachment file can be accessed. name?: string The original filename of the attachment. contentType?: string The MIME type of the attachment file (e.g., image/png, application/pdf). size: number The size of the attachment file in bytes. content?: string The base64-encoded content of the attachment file, if available. type?: 'screenshot' | 'figma' | 'zip' Optional v0-specific attachment type for enhanced processing. chatId: string The ID of the chat to which this message belongs. [Update Chat Version Files\ \ Updates the source files of a specific chat version (block) manually. This allows editing generated files directly through the API.](https://v0.app/docs/api/platform/reference/chats/update-version) [Download version files\ \ Download all files for a specific chat version as a zip or tarball archive. Use includeDefaultFiles=true to include all deployment files (package.json, configuration files, etc.) or false/omitted to return only the generated source files.](https://v0.app/docs/api/platform/reference/chats/download-version) --- # Get Chat | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Get Chat ======== Copy page Retrieves the full details of a specific chat using its \`chatId\`. Includes messages, metadata, and associated configuration. GET/v1/chats/{chatId} [Usage](https://v0.app/docs/api/platform/reference/chats/get-by-id#usage) -------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.getById({ chatId: '123', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/get-by-id#api-signature) ------------------------------------------------------------------------------------------ ### [Request](https://v0.app/docs/api/platform/reference/chats/get-by-id#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/chats/get-by-id#path-parameters) chatId: string The unique identifier of the chat to retrieve. Must be provided as a path parameter. ### [Response](https://v0.app/docs/api/platform/reference/chats/get-by-id#response) id: string A unique identifier for the chat. object: 'chat' Fixed value identifying this object as a chat. shareable: boolean Indicates whether the chat can be shared via public link. privacy: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted' Defines the visibility of the chat—private, team-only, or public. name?: string An optional name assigned to the chat by the user. title?: string deprecated Deprecated title field preserved for backward compatibility. createdAt: string The ISO timestamp representing when the chat was created. updatedAt?: string The ISO timestamp of the last update to the chat. favorite: boolean Indicates whether the chat is marked as a favorite. authorId: string The ID of the user who created the chat. projectId?: string Optional ID of the v0 project associated with this chat. webUrl: string Web URL to view this chat in the browser. apiUrl: string API URL to access this chat via the API. latestVersion?: object Full details of the most recent generated version, if available. id: string A unique identifier for the version. object: 'version' Fixed value identifying this object as a version. status: 'pending' | 'completed' | 'failed' The current status of the version generation process. demoUrl?: string Optional URL for previewing the generated output. screenshotUrl?: string URL to retrieve a screenshot of this version. createdAt: string The date and time when the version was created, in ISO 8601 format. updatedAt?: string The date and time when the version was last updated, in ISO 8601 format. files: object\[\] A list of files that were generated or included in this version. url: string deprecated The canonical URL to access this chat. messages: object\[\] All messages exchanged in the chat, including user and assistant entries. id: string A unique identifier for the message. object: 'message' Fixed value identifying this object as a message. content: string The main text content of the message. experimental\_content?: any\[\] | any\[\]\[\] The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change. createdAt: string The ISO timestamp representing when the message was created. updatedAt?: string The ISO timestamp representing when the message was last updated. type: 'message' | 'forked-block' | 'forked-chat' | 'open-in-v0' | 'refinement' | 'added-environment-variables' | 'added-integration' | 'deleted-file' | 'moved-file' | 'renamed-file' | 'edited-file' | 'replace-src' | 'reverted-block' | 'fix-with-v0' | 'auto-fix-with-v0' | 'sync-git' | 'fix-cve' | 'answered-questions' Indicates the format or category of the message, such as plain text or code. role: 'user' | 'assistant' Specifies whether the message was sent by the user or the assistant. finishReason?: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other' | 'unknown' The reason why the message generation finished. apiUrl: string API URL to access this message via the API. authorId: stringnull The ID of the user who sent the message. parentId?: stringnull The ID of the parent message. attachments?: object\[\] url: string The URL where the attachment file can be accessed. name?: string The original filename of the attachment. contentType?: string The MIME type of the attachment file (e.g., image/png, application/pdf). size: number The size of the attachment file in bytes. content?: string The base64-encoded content of the attachment file, if available. type?: 'screenshot' | 'figma' | 'zip' Optional v0-specific attachment type for enhanced processing. files?: object\[\] Optional array of files associated with the chat context. lang: string Programming language used in the file (e.g., JavaScript, Python). meta: object A key-value map of metadata associated with the file (e.g., path, type). source: string The origin or identifier of the file source (e.g., path or upload label). demo?: string deprecated Deprecated demo URL used for previewing the chat result. text: string The main user prompt or instruction that started the chat. modelConfiguration?: object The configuration used to generate responses in this chat. modelId?: 'v0-mini' | 'v0-pro' | 'v0-max' deprecated Deprecated Model ID field preserved for backward compatibility. imageGenerations?: boolean Enables image generations to generate up to 5 images per version. thinking?: boolean Enables thinking to generate a response in multiple steps. permissions: object write: boolean If true, the user has write access to the chat. [Delete Chat\ \ Deletes a specific chat based on the provided chatId. This operation is irreversible and permanently removes the chat and its contents.](https://v0.app/docs/api/platform/reference/chats/delete) [Update Chat\ \ Updates the metadata of an existing chat using its \`chatId\`. Supports changes to the chat name and privacy setting.](https://v0.app/docs/api/platform/reference/chats/update) --- # Fork Chat | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Fork Chat ========= Copy page Creates a new chat fork (duplicate) from a specific version within an existing chat. Useful for branching off alternate directions without modifying the original conversation. POST/v1/chats/{chatId}/fork [Usage](https://v0.app/docs/api/platform/reference/chats/fork#usage) --------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.fork({ chatId: '123', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/fork#api-signature) ------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/fork#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/chats/fork#path-parameters) chatId: string The unique identifier of the chat to fork. Provided as a path parameter. #### [Body](https://v0.app/docs/api/platform/reference/chats/fork#body) versionId?: string The identifier of the specific chat version to fork from. If omitted, the latest version will be used. privacy?: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted' Determines the privacy setting of the forked chat. This can control whether the chat is visible only to the user, to team members, or is public. ### [Response](https://v0.app/docs/api/platform/reference/chats/fork#response) id: string A unique identifier for the chat. object: 'chat' Fixed value identifying this object as a chat. shareable: boolean Indicates whether the chat can be shared via public link. privacy: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted' Defines the visibility of the chat—private, team-only, or public. name?: string An optional name assigned to the chat by the user. title?: string deprecated Deprecated title field preserved for backward compatibility. createdAt: string The ISO timestamp representing when the chat was created. updatedAt?: string The ISO timestamp of the last update to the chat. favorite: boolean Indicates whether the chat is marked as a favorite. authorId: string The ID of the user who created the chat. projectId?: string Optional ID of the v0 project associated with this chat. webUrl: string Web URL to view this chat in the browser. apiUrl: string API URL to access this chat via the API. latestVersion?: object Full details of the most recent generated version, if available. id: string A unique identifier for the version. object: 'version' Fixed value identifying this object as a version. status: 'pending' | 'completed' | 'failed' The current status of the version generation process. demoUrl?: string Optional URL for previewing the generated output. screenshotUrl?: string URL to retrieve a screenshot of this version. createdAt: string The date and time when the version was created, in ISO 8601 format. updatedAt?: string The date and time when the version was last updated, in ISO 8601 format. files: object\[\] A list of files that were generated or included in this version. url: string deprecated The canonical URL to access this chat. messages: object\[\] All messages exchanged in the chat, including user and assistant entries. id: string A unique identifier for the message. object: 'message' Fixed value identifying this object as a message. content: string The main text content of the message. experimental\_content?: any\[\] | any\[\]\[\] The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change. createdAt: string The ISO timestamp representing when the message was created. updatedAt?: string The ISO timestamp representing when the message was last updated. type: 'message' | 'forked-block' | 'forked-chat' | 'open-in-v0' | 'refinement' | 'added-environment-variables' | 'added-integration' | 'deleted-file' | 'moved-file' | 'renamed-file' | 'edited-file' | 'replace-src' | 'reverted-block' | 'fix-with-v0' | 'auto-fix-with-v0' | 'sync-git' | 'fix-cve' | 'answered-questions' Indicates the format or category of the message, such as plain text or code. role: 'user' | 'assistant' Specifies whether the message was sent by the user or the assistant. finishReason?: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other' | 'unknown' The reason why the message generation finished. apiUrl: string API URL to access this message via the API. authorId: stringnull The ID of the user who sent the message. parentId?: stringnull The ID of the parent message. attachments?: object\[\] url: string The URL where the attachment file can be accessed. name?: string The original filename of the attachment. contentType?: string The MIME type of the attachment file (e.g., image/png, application/pdf). size: number The size of the attachment file in bytes. content?: string The base64-encoded content of the attachment file, if available. type?: 'screenshot' | 'figma' | 'zip' Optional v0-specific attachment type for enhanced processing. files?: object\[\] Optional array of files associated with the chat context. lang: string Programming language used in the file (e.g., JavaScript, Python). meta: object A key-value map of metadata associated with the file (e.g., path, type). source: string The origin or identifier of the file source (e.g., path or upload label). demo?: string deprecated Deprecated demo URL used for previewing the chat result. text: string The main user prompt or instruction that started the chat. modelConfiguration?: object The configuration used to generate responses in this chat. modelId?: 'v0-mini' | 'v0-pro' | 'v0-max' deprecated Deprecated Model ID field preserved for backward compatibility. imageGenerations?: boolean Enables image generations to generate up to 5 images per version. thinking?: boolean Enables thinking to generate a response in multiple steps. permissions: object write: boolean If true, the user has write access to the chat. [Favorite Chat\ \ Marks or unmarks a chat as a favorite using its \`chatId\`. This helps with organizing and quickly accessing important chats.](https://v0.app/docs/api/platform/reference/chats/favorite) [Send Message\ \ Creates a new message in an existing chat. Triggers a model response using the provided prompt, with optional attachments and configuration settings.](https://v0.app/docs/api/platform/reference/chats/send-message) --- # Find Deployment Errors | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * [Create Deployment](https://v0.app/docs/api/platform/reference/deployments/create) * [Find Deployments](https://v0.app/docs/api/platform/reference/deployments/find) * [Get Deployment](https://v0.app/docs/api/platform/reference/deployments/get-by-id) * [Delete Deployment](https://v0.app/docs/api/platform/reference/deployments/delete) * [Find Deployment Logs](https://v0.app/docs/api/platform/reference/deployments/find-logs) * [Find Deployment Errors](https://v0.app/docs/api/platform/reference/deployments/find-errors) * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Deployments Find Deployment Errors ====================== Copy page Retrieves a list of errors that occurred during a specific deployment. Useful for diagnosing and debugging deployment issues. GET/v1/deployments/{deploymentId}/errors [Usage](https://v0.app/docs/api/platform/reference/deployments/find-errors#usage) ---------------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.deployments.findErrors({ deploymentId: '123', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/deployments/find-errors#api-signature) -------------------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/deployments/find-errors#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/deployments/find-errors#path-parameters) deploymentId: string The unique identifier of the deployment to inspect for errors. Provided as a path parameter. ### [Response](https://v0.app/docs/api/platform/reference/deployments/find-errors#response) error?: string fullErrorText?: string errorType?: string formattedError?: string [Find Deployment Logs\ \ Retrieves logs for a specific deployment. Supports filtering by timestamp to fetch only recent logs.](https://v0.app/docs/api/platform/reference/deployments/find-logs) [Create Vercel Project\ \ Links a Vercel project to an existing v0 project. Enables Vercel-related features and deployment integration within the v0 workspace.](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.create) --- # MCP Integrations | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu MCP Integrations ================ Copy page Connect and use MCP servers from the Vercel Marketplace directly in v0 [Overview](https://v0.app/docs/MCP#overview) --------------------------------------------- v0 supports tool calls from [Vercel Marketplace Integrations](https://vercel.com/changelog/vercel-marketplace-integrations-now-available-in-v0) , allowing you to connect services from the Vercel Marketplace directly to your v0 chats. These integrations provide v0 with specialized tools and capabilities to interact with external services like databases, APIs, and other platforms. With Native Integrations, v0 can: * Query and manage your databases (e.g., Neon, Supabase, Upstash) * Ask questions about your products and revenue (Stripe) * Interact with cloud services and APIs * Access project-specific resources and data * Execute operations across your integrated services * Provide context-aware assistance for your connected tools [Getting Started](https://v0.app/docs/MCP#getting-started) ----------------------------------------------------------- **Important**: Enabling remote MCP for an integration may increase per-message costs and could potentially execute destructive actions. Always review the integration's capabilities before enabling auto mode. ### [Connecting Integrations](https://v0.app/docs/MCP#connecting-integrations) 1. **Navigate to the Connect Tab** * Open any chat in v0 * Click on the **Connect** tab in your chat interface * Browse available integrations from the Vercel Marketplace 2. **Install an Integration** * Select an integration from the marketplace * Follow the authentication and setup flow * Grant necessary permissions for v0 to access the service 3. **Configure Integration Settings** * After connecting, click on the integration to manage its settings * Configure MCP tool permissions (see [Permission Modes](https://v0.app/docs/MCP#permission-modes) below) * Set up resource-specific access if applicable [Permission Modes](https://v0.app/docs/MCP#permission-modes) ------------------------------------------------------------- Native Integrations support three permission modes for MCP tool execution: ### [Disabled](https://v0.app/docs/MCP#disabled) 🚫 Disabled * v0 will **not** use tool calls from this integration * The integration remains connected and can be accessed in your generation, but v0 will not make tool calls to interact with it ### [Ask for Approval (Manual)](https://v0.app/docs/MCP#ask-for-approval-manual) ✋ Manual * v0 will **ask for permission** before executing any tool call * You'll see a confirmation dialog showing: * Which tool will be called * What parameters will be used * What action will be performed * **Default mode** for new integrations * Recommended for integrations that perform write operations ### [Always Run (Auto)](https://v0.app/docs/MCP#always-run-auto) ✓ Auto * v0 will **automatically execute** tool calls without asking. You will have 5 seconds to cancel after the call is made. * Provides a seamless, hands-free experience * Best for read-only operations or trusted integrations * **Safety feature**: Even in auto mode, dangerous operations still require explicit approval [Managing Integrations](https://v0.app/docs/MCP#managing-integrations) ----------------------------------------------------------------------- ### [Configuration Dialog](https://v0.app/docs/MCP#configuration-dialog) To manage an integration's settings: 1. Navigate to the Connect tab in your chat 2. Click on a connected integration 3. The **Manage Integration** dialog shows: * **Integration Details**: Name, description, and category * **Instance Information**: Connected resource name and ID * **Documentation Link**: Direct link to Marketplace listing * **Remote MCP Toggle**: Configure permission mode * **Configure Button**: Access integration-specific settings ### [Changing Permissions](https://v0.app/docs/MCP#changing-permissions) To change an integration's permission mode: 1. Open the Manage Integration dialog 2. Locate the **Remote MCP** section (marked with a "New" badge) 3. Select your preferred mode: * Click the **🚫** icon for Disabled * Click the **✋** icon for Ask for Approval * Click the **✓** icon for Always Run 4. Changes take effect immediately ### [Disconnecting Integrations](https://v0.app/docs/MCP#disconnecting-integrations) To remove an integration: 1. Open the Manage Integration dialog 2. Click **Configure** to access integration settings 3. Follow the integration's disconnect flow on Vercel 4. The integration will be removed from your Connect tab [Integration Scoping](https://v0.app/docs/MCP#integration-scoping) ------------------------------------------------------------------- Many marketplace MCPs operate globally, but v0 scopes them to specific projects and resources: * **Project-Specific**: Integrations are linked to your v0 project * **Resource-Specific**: Database integrations target specific database instances * **Context-Aware**: v0 automatically provides resource context to ensure commands target the correct service When v0 uses an integration, it includes context like: * Resource ID (e.g., specific database instance) * Integration instance name * Project associations This ensures all operations are scoped correctly and prevents accidental cross-project operations. [Examples](https://v0.app/docs/MCP#examples) --------------------------------------------- ### [Database Integration](https://v0.app/docs/MCP#database-integration) After connecting a Neon database integration: User: "Show me the schema for my users table" v0: [Uses neon_query tool to inspect schema] "Your users table has these columns: - id (uuid, primary key) - email (varchar) - created_at (timestamp) - updated_at (timestamp)" [Related Resources](https://v0.app/docs/MCP#related-resources) --------------------------------------------------------------- * [Vercel Marketplace](https://vercel.com/marketplace) - Browse available integrations * [MCP Server Documentation](https://v0.app/docs/api/platform/adapters/mcp-server) - Use v0 as an MCP server in your IDE [GitHub\ \ Connect your GitHub repositories to v0 to automatically create projects and track changes.](https://v0.app/docs/github) [Deployments\ \ Deploy your v0 projects to Vercel with one click and manage production deployments.](https://v0.app/docs/deployments) --- # Find Deployments | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * [Create Deployment](https://v0.app/docs/api/platform/reference/deployments/create) * [Find Deployments](https://v0.app/docs/api/platform/reference/deployments/find) * [Get Deployment](https://v0.app/docs/api/platform/reference/deployments/get-by-id) * [Delete Deployment](https://v0.app/docs/api/platform/reference/deployments/delete) * [Find Deployment Logs](https://v0.app/docs/api/platform/reference/deployments/find-logs) * [Find Deployment Errors](https://v0.app/docs/api/platform/reference/deployments/find-errors) * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Deployments Find Deployments ================ Copy page Find deployments by project and chat IDs. This will return a list of deployments for the given project and chat IDs. GET/v1/deployments [Usage](https://v0.app/docs/api/platform/reference/deployments/find#usage) --------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.deployments.find({ projectId: '123', chatId: '123', versionId: '123', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/deployments/find#api-signature) ------------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/deployments/find#request) #### [Query Parameters](https://v0.app/docs/api/platform/reference/deployments/find#query-parameters) projectId: string The ID of the project to find deployments for chatId: string The ID of the chat to find deployments for versionId: string The ID of the version to find deployments for ### [Response](https://v0.app/docs/api/platform/reference/deployments/find#response) object: 'list' data: object\[\] id?: string A unique identifier for the deployment. object?: 'deployment' Fixed value identifying this object as a deployment. inspectorUrl?: string URL to the deployment inspector. chatId?: string The ID of the chat that this deployment is scoped to. projectId?: string The ID of the project that this deployment is scoped to. versionId?: string The ID of the version that this deployment is scoped to. apiUrl?: string The API endpoint URL for accessing this deployment programmatically. webUrl?: string The web URL where the deployment can be viewed or managed. [Create Deployment\ \ Create a new deployment for a specific chat and version. This will trigger a deployment to Vercel.](https://v0.app/docs/api/platform/reference/deployments/create) [Get Deployment\ \ Get a deployment by ID. This will return the details of the deployment, including the inspector URL, chat ID, project ID, version ID, API URL, and web URL.](https://v0.app/docs/api/platform/reference/deployments/get-by-id) --- # Create Chat | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Create Chat =========== Copy page Creates a new chat using a user message, optional system context, and model configuration. Useful for prompting the model within the scope of a specific project. POST/v1/chats [Usage](https://v0.app/docs/api/platform/reference/chats/create#usage) ----------------------------------------------------------------------- SyncAsyncAttachments TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.create({ system: 'You are an expert coder', message: 'Create a landing page for a new product', projectId: 'proj_123', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/create#api-signature) --------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/create#request) #### [Body](https://v0.app/docs/api/platform/reference/chats/create#body) message: string Creates a new chat using a user message, optional system context, and model configuration. Useful for prompting the model within the scope of a specific project. attachments?: object\[\] A list of files or assets to be included in the conversation context. Useful when the chat or task requires referencing documents, images, or other resources. url: string system?: string Provides system-level context or background for the chat. This is typically used to specify frameworks, tools, or development environments relevant to the task. chatPrivacy?: 'public' | 'private' | 'team-edit' | 'team' | 'unlisted' Determines the privacy setting of the chat. This can control whether the chat is visible only to the user, to team members, or is public. projectId?: string Associates the chat with a specific project in your workspace. Helps organize and group related chats under a common project context. modelConfiguration?: object Settings that control how the model behaves in the chat. modelId?: 'v0-mini' | 'v0-pro' | 'v0-max' deprecated Deprecated Model ID field preserved for backward compatibility. imageGenerations?: boolean Enables image generations to generate up to 5 images per version. thinking?: boolean Enables thinking to generate a response in multiple steps. responseMode?: 'sync' | 'async' | 'experimental\_stream' Controls how the response is delivered. * `"sync"`: The response is returned immediately with the HTTP request. * `"async"`: Returns a message placeholder immediately; use getById to poll for completion status and final output. * `"experimental_stream"`: Returns content parts as Server-Sent Events for real-time streaming. designSystemId?: stringnull The ID of a design system to apply to this chat. Design systems provide consistent styling and components for generated UI. ### [Response](https://v0.app/docs/api/platform/reference/chats/create#response) id: string A unique identifier for the chat. object: 'chat' Fixed value identifying this object as a chat. shareable: boolean Indicates whether the chat can be shared via public link. privacy: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted' Defines the visibility of the chat—private, team-only, or public. name?: string An optional name assigned to the chat by the user. title?: string deprecated Deprecated title field preserved for backward compatibility. createdAt: string The ISO timestamp representing when the chat was created. updatedAt?: string The ISO timestamp of the last update to the chat. favorite: boolean Indicates whether the chat is marked as a favorite. authorId: string The ID of the user who created the chat. projectId?: string Optional ID of the v0 project associated with this chat. webUrl: string Web URL to view this chat in the browser. apiUrl: string API URL to access this chat via the API. latestVersion?: object Full details of the most recent generated version, if available. id: string A unique identifier for the version. object: 'version' Fixed value identifying this object as a version. status: 'pending' | 'completed' | 'failed' The current status of the version generation process. demoUrl?: string Optional URL for previewing the generated output. screenshotUrl?: string URL to retrieve a screenshot of this version. createdAt: string The date and time when the version was created, in ISO 8601 format. updatedAt?: string The date and time when the version was last updated, in ISO 8601 format. files: object\[\] A list of files that were generated or included in this version. url: string deprecated The canonical URL to access this chat. messages: object\[\] All messages exchanged in the chat, including user and assistant entries. id: string A unique identifier for the message. object: 'message' Fixed value identifying this object as a message. content: string The main text content of the message. experimental\_content?: any\[\] | any\[\]\[\] The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change. createdAt: string The ISO timestamp representing when the message was created. updatedAt?: string The ISO timestamp representing when the message was last updated. type: 'message' | 'forked-block' | 'forked-chat' | 'open-in-v0' | 'refinement' | 'added-environment-variables' | 'added-integration' | 'deleted-file' | 'moved-file' | 'renamed-file' | 'edited-file' | 'replace-src' | 'reverted-block' | 'fix-with-v0' | 'auto-fix-with-v0' | 'sync-git' | 'fix-cve' | 'answered-questions' Indicates the format or category of the message, such as plain text or code. role: 'user' | 'assistant' Specifies whether the message was sent by the user or the assistant. finishReason?: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other' | 'unknown' The reason why the message generation finished. apiUrl: string API URL to access this message via the API. authorId: stringnull The ID of the user who sent the message. parentId?: stringnull The ID of the parent message. attachments?: object\[\] url: string The URL where the attachment file can be accessed. name?: string The original filename of the attachment. contentType?: string The MIME type of the attachment file (e.g., image/png, application/pdf). size: number The size of the attachment file in bytes. content?: string The base64-encoded content of the attachment file, if available. type?: 'screenshot' | 'figma' | 'zip' Optional v0-specific attachment type for enhanced processing. files?: object\[\] Optional array of files associated with the chat context. lang: string Programming language used in the file (e.g., JavaScript, Python). meta: object A key-value map of metadata associated with the file (e.g., path, type). source: string The origin or identifier of the file source (e.g., path or upload label). demo?: string deprecated Deprecated demo URL used for previewing the chat result. text: string The main user prompt or instruction that started the chat. modelConfiguration?: object The configuration used to generate responses in this chat. modelId?: 'v0-mini' | 'v0-pro' | 'v0-max' deprecated Deprecated Model ID field preserved for backward compatibility. imageGenerations?: boolean Enables image generations to generate up to 5 images per version. thinking?: boolean Enables thinking to generate a response in multiple steps. permissions: object write: boolean If true, the user has write access to the chat. [Update Environment Variables\ \ Updates multiple environment variables for a given project. Only the value of each environment variable can be updated.](https://v0.app/docs/api/platform/reference/projects/update-env-vars) [Find Chats\ \ Retrieves a list of existing chats, with support for pagination and filtering by favorite status. Helps manage and navigate chat history.](https://v0.app/docs/api/platform/reference/chats/find) --- # Send Message | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Send Message ============ Copy page Creates a new message in an existing chat. Triggers a model response using the provided prompt, with optional attachments and configuration settings. POST/v1/chats/{chatId}/messages [Usage](https://v0.app/docs/api/platform/reference/chats/send-message#usage) ----------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.sendMessage({ chatId: '123', message: 'Add dark mode', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/send-message#api-signature) --------------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/send-message#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/chats/send-message#path-parameters) chatId: string The unique identifier of the chat to send the message to. Provided as a path parameter. #### [Body](https://v0.app/docs/api/platform/reference/chats/send-message#body) message: string The prompt or instruction to send to the model as part of the chat. attachments?: object\[\] A list of files or assets to include with the message. url: string system?: string Provides system-level context or background for the chat. This is typically used to specify frameworks, tools, or development environments relevant to the task. modelConfiguration?: object Overrides for the model behavior. modelId?: 'v0-mini' | 'v0-pro' | 'v0-max' deprecated Deprecated Model ID field preserved for backward compatibility. imageGenerations?: boolean Enables image generations to generate up to 5 images per version. thinking?: boolean Enables thinking to generate a response in multiple steps. responseMode?: 'sync' | 'async' | 'experimental\_stream' Controls how the response is delivered. * `"sync"`: The response is returned immediately with the HTTP request. * `"async"`: Returns a message placeholder immediately; use getById to poll for completion status and final output. * `"experimental_stream"`: Returns content parts as Server-Sent Events for real-time streaming. ### [Response](https://v0.app/docs/api/platform/reference/chats/send-message#response) id: string A unique identifier for the chat. object: 'chat' Fixed value identifying this object as a chat. shareable: boolean Indicates whether the chat can be shared via public link. privacy: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted' Defines the visibility of the chat—private, team-only, or public. name?: string An optional name assigned to the chat by the user. title?: string deprecated Deprecated title field preserved for backward compatibility. createdAt: string The ISO timestamp representing when the chat was created. updatedAt?: string The ISO timestamp of the last update to the chat. favorite: boolean Indicates whether the chat is marked as a favorite. authorId: string The ID of the user who created the chat. projectId?: string Optional ID of the v0 project associated with this chat. webUrl: string Web URL to view this chat in the browser. apiUrl: string API URL to access this chat via the API. latestVersion?: object Full details of the most recent generated version, if available. id: string A unique identifier for the version. object: 'version' Fixed value identifying this object as a version. status: 'pending' | 'completed' | 'failed' The current status of the version generation process. demoUrl?: string Optional URL for previewing the generated output. screenshotUrl?: string URL to retrieve a screenshot of this version. createdAt: string The date and time when the version was created, in ISO 8601 format. updatedAt?: string The date and time when the version was last updated, in ISO 8601 format. files: object\[\] A list of files that were generated or included in this version. url: string deprecated The canonical URL to access this chat. messages: object\[\] All messages exchanged in the chat, including user and assistant entries. id: string A unique identifier for the message. object: 'message' Fixed value identifying this object as a message. content: string The main text content of the message. experimental\_content?: any\[\] | any\[\]\[\] The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change. createdAt: string The ISO timestamp representing when the message was created. updatedAt?: string The ISO timestamp representing when the message was last updated. type: 'message' | 'forked-block' | 'forked-chat' | 'open-in-v0' | 'refinement' | 'added-environment-variables' | 'added-integration' | 'deleted-file' | 'moved-file' | 'renamed-file' | 'edited-file' | 'replace-src' | 'reverted-block' | 'fix-with-v0' | 'auto-fix-with-v0' | 'sync-git' | 'fix-cve' | 'answered-questions' Indicates the format or category of the message, such as plain text or code. role: 'user' | 'assistant' Specifies whether the message was sent by the user or the assistant. finishReason?: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other' | 'unknown' The reason why the message generation finished. apiUrl: string API URL to access this message via the API. authorId: stringnull The ID of the user who sent the message. parentId?: stringnull The ID of the parent message. attachments?: object\[\] url: string The URL where the attachment file can be accessed. name?: string The original filename of the attachment. contentType?: string The MIME type of the attachment file (e.g., image/png, application/pdf). size: number The size of the attachment file in bytes. content?: string The base64-encoded content of the attachment file, if available. type?: 'screenshot' | 'figma' | 'zip' Optional v0-specific attachment type for enhanced processing. files?: object\[\] Optional array of files associated with the chat context. lang: string Programming language used in the file (e.g., JavaScript, Python). meta: object A key-value map of metadata associated with the file (e.g., path, type). source: string The origin or identifier of the file source (e.g., path or upload label). demo?: string deprecated Deprecated demo URL used for previewing the chat result. text: string The main user prompt or instruction that started the chat. modelConfiguration?: object The configuration used to generate responses in this chat. modelId?: 'v0-mini' | 'v0-pro' | 'v0-max' deprecated Deprecated Model ID field preserved for backward compatibility. imageGenerations?: boolean Enables image generations to generate up to 5 images per version. thinking?: boolean Enables thinking to generate a response in multiple steps. permissions: object write: boolean If true, the user has write access to the chat. [Fork Chat\ \ Creates a new chat fork (duplicate) from a specific version within an existing chat. Useful for branching off alternate directions without modifying the original conversation.](https://v0.app/docs/api/platform/reference/chats/fork) [Find Chat Messages\ \ Retrieves a list of all messages for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes message content, role, and type information.](https://v0.app/docs/api/platform/reference/chats/find-messages) --- # Delete Deployment | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * [Create Deployment](https://v0.app/docs/api/platform/reference/deployments/create) * [Find Deployments](https://v0.app/docs/api/platform/reference/deployments/find) * [Get Deployment](https://v0.app/docs/api/platform/reference/deployments/get-by-id) * [Delete Deployment](https://v0.app/docs/api/platform/reference/deployments/delete) * [Find Deployment Logs](https://v0.app/docs/api/platform/reference/deployments/find-logs) * [Find Deployment Errors](https://v0.app/docs/api/platform/reference/deployments/find-errors) * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Deployments Delete Deployment ================= Copy page Delete a deployment by ID. This will delete the deployment from Vercel. DELETE/v1/deployments/{deploymentId} [Usage](https://v0.app/docs/api/platform/reference/deployments/delete#usage) ----------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.deployments.delete({ deploymentId: '123', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/deployments/delete#api-signature) --------------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/deployments/delete#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/deployments/delete#path-parameters) deploymentId: string Path parameter "deploymentId" ### [Response](https://v0.app/docs/api/platform/reference/deployments/delete#response) id: string object: 'deployment' deleted: 'true' [Get Deployment\ \ Get a deployment by ID. This will return the details of the deployment, including the inspector URL, chat ID, project ID, version ID, API URL, and web URL.](https://v0.app/docs/api/platform/reference/deployments/get-by-id) [Find Deployment Logs\ \ Retrieves logs for a specific deployment. Supports filtering by timestamp to fetch only recent logs.](https://v0.app/docs/api/platform/reference/deployments/find-logs) --- # Get Deployment | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * [Create Deployment](https://v0.app/docs/api/platform/reference/deployments/create) * [Find Deployments](https://v0.app/docs/api/platform/reference/deployments/find) * [Get Deployment](https://v0.app/docs/api/platform/reference/deployments/get-by-id) * [Delete Deployment](https://v0.app/docs/api/platform/reference/deployments/delete) * [Find Deployment Logs](https://v0.app/docs/api/platform/reference/deployments/find-logs) * [Find Deployment Errors](https://v0.app/docs/api/platform/reference/deployments/find-errors) * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Deployments Get Deployment ============== Copy page Get a deployment by ID. This will return the details of the deployment, including the inspector URL, chat ID, project ID, version ID, API URL, and web URL. GET/v1/deployments/{deploymentId} [Usage](https://v0.app/docs/api/platform/reference/deployments/get-by-id#usage) -------------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.deployments.getById({ deploymentId: '123', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/deployments/get-by-id#api-signature) ------------------------------------------------------------------------------------------------ ### [Request](https://v0.app/docs/api/platform/reference/deployments/get-by-id#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/deployments/get-by-id#path-parameters) deploymentId: string Path parameter "deploymentId" ### [Response](https://v0.app/docs/api/platform/reference/deployments/get-by-id#response) id: string A unique identifier for the deployment. object: 'deployment' Fixed value identifying this object as a deployment. inspectorUrl: string URL to the deployment inspector. chatId: string The ID of the chat that this deployment is scoped to. projectId: string The ID of the project that this deployment is scoped to. versionId: string The ID of the version that this deployment is scoped to. apiUrl: string The API endpoint URL for accessing this deployment programmatically. webUrl: string The web URL where the deployment can be viewed or managed. [Find Deployments\ \ Find deployments by project and chat IDs. This will return a list of deployments for the given project and chat IDs.](https://v0.app/docs/api/platform/reference/deployments/find) [Delete Deployment\ \ Delete a deployment by ID. This will delete the deployment from Vercel.](https://v0.app/docs/api/platform/reference/deployments/delete) --- # AI models | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu AI models ========= Copy page Add AI functionality to your v0 projects by integrating AI models and platforms. v0 can build AI functionality into your projects by integrating with AI platforms or by using API keys for specific providers. By default, v0 uses the [Vercel AI Gateway](https://vercel.com/ai-gateway) to connect to various AI models. ### [Using the Vercel AI Gateway](https://v0.app/docs/ai-models#using-the-vercel-ai-gateway) To use the Vercel AI Gateway, no additional setup is required. v0 is pre-configured to connect to the gateway and access supported AI models. ### [Marketplace integrations](https://v0.app/docs/ai-models#marketplace-integrations) v0 integrates with AI platforms like [Groq](https://groq.com/) , [fal](https://fal.ai/) , and [Deep Infra](https://deepinfra.com/) . You can also connect directly to [Grok by xAI](https://x.ai/grok) . From the **Connect** button your sidebar, you'll see supported providers. Click **Install** to open the Marketplace and accept click-through terms to activate an integration. ![v0 integration options](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fai-models.png&w=3840&q=75)![v0 integration options](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fai-models.png&w=3840&q=75) ### [APIs](https://v0.app/docs/ai-models#apis) To integrate with third-party AI models such as [OpenAI](https://openai.com/) : 1. Go to **Project Settings → Environment Variables** 2. Click **Add Variable** 3. Add your key, e.g. `OPENAI_API_KEY`, with its value v0 will now use this variable when prompted to generate AI functionality. [Versions\ \ Previous Page](https://v0.app/docs/versions) [Databases\ \ Build full-stack applications with v0's database integrations.](https://v0.app/docs/databases) --- # Create Deployment | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * [Create Deployment](https://v0.app/docs/api/platform/reference/deployments/create) * [Find Deployments](https://v0.app/docs/api/platform/reference/deployments/find) * [Get Deployment](https://v0.app/docs/api/platform/reference/deployments/get-by-id) * [Delete Deployment](https://v0.app/docs/api/platform/reference/deployments/delete) * [Find Deployment Logs](https://v0.app/docs/api/platform/reference/deployments/find-logs) * [Find Deployment Errors](https://v0.app/docs/api/platform/reference/deployments/find-errors) * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Deployments Create Deployment ================= Copy page Create a new deployment for a specific chat and version. This will trigger a deployment to Vercel. POST/v1/deployments [Usage](https://v0.app/docs/api/platform/reference/deployments/create#usage) ----------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.deployments.create({ projectId: '123', chatId: '123', versionId: '123', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/deployments/create#api-signature) --------------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/deployments/create#request) #### [Body](https://v0.app/docs/api/platform/reference/deployments/create#body) projectId: string chatId: string versionId: string ### [Response](https://v0.app/docs/api/platform/reference/deployments/create#response) id: string A unique identifier for the deployment. object: 'deployment' Fixed value identifying this object as a deployment. inspectorUrl: string URL to the deployment inspector. chatId: string The ID of the chat that this deployment is scoped to. projectId: string The ID of the project that this deployment is scoped to. versionId: string The ID of the version that this deployment is scoped to. apiUrl: string The API endpoint URL for accessing this deployment programmatically. webUrl: string The web URL where the deployment can be viewed or managed. [Download version files\ \ Download all files for a specific chat version as a zip or tarball archive. Use includeDefaultFiles=true to include all deployment files (package.json, configuration files, etc.) or false/omitted to return only the generated source files.](https://v0.app/docs/api/platform/reference/chats/download-version) [Find Deployments\ \ Find deployments by project and chat IDs. This will return a list of deployments for the given project and chat IDs.](https://v0.app/docs/api/platform/reference/deployments/find) --- # Find Deployment Logs | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * [Create Deployment](https://v0.app/docs/api/platform/reference/deployments/create) * [Find Deployments](https://v0.app/docs/api/platform/reference/deployments/find) * [Get Deployment](https://v0.app/docs/api/platform/reference/deployments/get-by-id) * [Delete Deployment](https://v0.app/docs/api/platform/reference/deployments/delete) * [Find Deployment Logs](https://v0.app/docs/api/platform/reference/deployments/find-logs) * [Find Deployment Errors](https://v0.app/docs/api/platform/reference/deployments/find-errors) * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Deployments Find Deployment Logs ==================== Copy page Retrieves logs for a specific deployment. Supports filtering by timestamp to fetch only recent logs. GET/v1/deployments/{deploymentId}/logs [Usage](https://v0.app/docs/api/platform/reference/deployments/find-logs#usage) -------------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.deployments.findLogs({ deploymentId: '123', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/deployments/find-logs#api-signature) ------------------------------------------------------------------------------------------------ ### [Request](https://v0.app/docs/api/platform/reference/deployments/find-logs#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/deployments/find-logs#path-parameters) deploymentId: string The unique identifier of the deployment to retrieve logs for. Provided as a path parameter. #### [Query Parameters](https://v0.app/docs/api/platform/reference/deployments/find-logs#query-parameters) since?: number A UNIX timestamp (in seconds) used to filter logs. Returns only log entries generated after the specified time. ### [Response](https://v0.app/docs/api/platform/reference/deployments/find-logs#response) logs: object\[\] Array of log entries. createdAt: string Log creation timestamp. deploymentId: string Deployment ID. id: string Log entry ID. text: string Log message content. type: 'stdout' | 'stderr' Output stream type. level?: 'error' | 'warning' | 'info' Log severity level. object: 'deployment\_log' Object type identifier. nextSince?: number Timestamp for pagination. object: 'list' Object type identifier. [Delete Deployment\ \ Delete a deployment by ID. This will delete the deployment from Vercel.](https://v0.app/docs/api/platform/reference/deployments/delete) [Find Deployment Errors\ \ Retrieves a list of errors that occurred during a specific deployment. Useful for diagnosing and debugging deployment issues.](https://v0.app/docs/api/platform/reference/deployments/find-errors) --- # Lock Files from AI Changes | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/Guides Lock Files from AI Changes ========================== Copy page Learn how to protect files from AI modifications in v0 chats File locks allow you to protect specific files from AI modifications during code generation, giving you precise control over which parts of your codebase can be changed. [Overview](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#overview) ---------------------------------------------------------------------------------------- File locks in v0 protect specific files from AI modifications during generation. This is useful when you want to: * **Preserve configuration files** - Keep package.json, tsconfig.json unchanged * **Protect existing code** - Prevent AI from modifying working components * **Maintain file structure** - Lock files that shouldn't be altered * **Control AI scope** - Direct AI attention to specific files only [Setting File Locks During Initialization](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#setting-file-locks-during-initialization) -------------------------------------------------------------------------------------------------------------------------------------------------------- ### [Lock Individual Files](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#lock-individual-files) import { v0 } from 'v0-sdk' // Initialize chat with some files locked const chat = await v0.chats.init({ type: 'files', files: [\ {\ name: 'src/components/Button.tsx',\ content: buttonCode,\ locked: false, // AI can modify this file\ },\ {\ name: 'package.json',\ content: packageJson,\ locked: true, // AI cannot modify this file\ },\ {\ name: 'tsconfig.json',\ content: tsConfig,\ locked: true, // AI cannot modify this file\ },\ ], }) ### [Lock All Files from Repository](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#lock-all-files-from-repository) // Import repository with all files locked const chat = await v0.chats.init({ type: 'repo', repo: { url: 'https://github.com/username/my-app', }, lockAllFiles: true, // Prevents AI from modifying any files }) ### [Lock All Files from Zip](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#lock-all-files-from-zip) // Import zip archive with all files locked const chat = await v0.chats.init({ type: 'zip', zip: { url: 'https://example.com/project.zip', }, lockAllFiles: true, // Protects all imported files }) [Updating File Locks](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#updating-file-locks) -------------------------------------------------------------------------------------------------------------- ### [Update Files and Lock Status](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#update-files-and-lock-status) // Update file content and lock status await v0.chats.updateVersion({ chatId: 'chat_123', versionId: 'version_456', files: [\ {\ name: 'src/components/Button.tsx',\ content: updatedButtonCode,\ locked: true, // Lock this file after updating\ },\ {\ name: 'src/utils/helpers.ts',\ content: helperCode,\ locked: false, // Keep this file unlocked\ },\ ], }) ### [Lock Existing Files](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#lock-existing-files) // Lock files without changing content await v0.chats.updateVersion({ chatId: 'chat_123', versionId: 'version_456', files: [\ {\ name: 'package.json',\ content: existingPackageJson, // Same content\ locked: true, // Just lock the file\ },\ ], }) [Common Use Cases](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#common-use-cases) -------------------------------------------------------------------------------------------------------- ### [1\. Protect Configuration Files](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#1-protect-configuration-files) const chat = await v0.chats.init({ type: 'files', files: [\ // Source code - AI can modify\ { name: 'src/App.tsx', content: appCode, locked: false },\ { name: 'src/components/Header.tsx', content: headerCode, locked: false },\ \ // Configuration - AI cannot modify\ { name: 'package.json', content: packageJson, locked: true },\ { name: 'tsconfig.json', content: tsConfig, locked: true },\ { name: '.env.example', content: envExample, locked: true },\ { name: 'README.md', content: readme, locked: true },\ ], }) ### [2\. Preserve Working Components](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#2-preserve-working-components) const chat = await v0.chats.init({ type: 'files', files: [\ // Working component - protect from changes\ {\ name: 'src/components/WorkingButton.tsx',\ content: workingButtonCode,\ locked: true,\ },\ \ // New component - AI can build this\ {\ name: 'src/components/NewCard.tsx',\ content: '',\ locked: false,\ },\ ], }) ### [3\. Import and Selectively Protect](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#3-import-and-selectively-protect) // First, import everything unlocked const chat = await v0.chats.init({ type: 'repo', repo: { url: 'https://github.com/username/project', }, lockAllFiles: false, }) // Then lock specific files await v0.chats.updateVersion({ chatId: chat.id, versionId: chat.latestVersion.id, files: [\ // Lock configuration files only\ { name: 'package.json', content: existingPackageJson, locked: true },\ { name: 'vite.config.ts', content: existingViteConfig, locked: true },\ ], }) [Best Practices](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#best-practices) ---------------------------------------------------------------------------------------------------- ### [1\. Lock Configuration Files](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#1-lock-configuration-files) // ✅ Good: Always lock configuration files const configFiles = [\ 'package.json',\ 'tsconfig.json',\ 'vite.config.ts',\ 'next.config.js',\ '.env.example',\ 'README.md',\ ] const chat = await v0.chats.init({ type: 'files', files: [\ ...sourceFiles.map((f) => ({ ...f, locked: false })),\ ...configFiles.map((f) => ({ ...f, locked: true })),\ ], }) ### [2\. Protect Working Code](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#2-protect-working-code) // ✅ Good: Lock files that are already working const chat = await v0.chats.init({ type: 'files', files: [\ // Tested, working components\ { name: 'src/components/Button.tsx', content: buttonCode, locked: true },\ { name: 'src/utils/api.ts', content: apiCode, locked: true },\ \ // New features AI should build\ { name: 'src/components/Dashboard.tsx', content: '', locked: false },\ { name: 'src/pages/Settings.tsx', content: '', locked: false },\ ], }) ### [3\. Use Descriptive Comments](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#3-use-descriptive-comments) // ✅ Good: Explain why files are locked const chat = await v0.chats.init({ type: 'files', files: [\ {\ name: 'src/components/PaymentForm.tsx',\ content: paymentFormCode,\ locked: true, // Critical payment logic - don't modify\ },\ {\ name: 'src/components/UserProfile.tsx',\ content: profileCode,\ locked: false, // Needs UI improvements\ },\ ], }) ### [4\. Strategic Locking for Large Projects](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#4-strategic-locking-for-large-projects) // For large imports, lock everything first, then unlock what AI should modify const chat = await v0.chats.init({ type: 'repo', repo: { url: 'https://github.com/company/large-app', }, lockAllFiles: true, // Protect everything initially }) // Then unlock specific files for AI to work on await v0.chats.updateVersion({ chatId: chat.id, versionId: chat.latestVersion.id, files: [\ // Unlock only the component that needs work\ {\ name: 'src/components/ProductCard.tsx',\ content: existingProductCard,\ locked: false, // AI can improve this component\ },\ ], }) [File Lock Status](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes#file-lock-status) -------------------------------------------------------------------------------------------------------- When files are locked: * ✅ **AI will not modify** the file content during generation * ✅ **File remains available** for reference and context * ✅ **You can still manually update** locked files via API * ✅ **Lock status persists** across chat sessions When files are unlocked: * ⚠️ **AI can freely modify** the file content * ⚠️ **Changes may overwrite** your existing code * ✅ **AI uses file for context** when generating other files * ✅ **You can lock again** at any time File locks give you precise control over what the AI can and cannot change, ensuring your important code stays protected while still allowing AI assistance where you need it. [Environment Variables\ \ Learn how to manage environment variables and configuration in v0 projects](https://v0.app/docs/api/platform/guides/environment-variables) [v0 Clone\ \ A full-featured v0 clone with authentication and multi-tenant support](https://v0.app/docs/api/platform/examples/v0-clone) --- # Update Chat | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Update Chat =========== Copy page Updates the metadata of an existing chat using its \`chatId\`. Supports changes to the chat name and privacy setting. PATCH/v1/chats/{chatId} [Usage](https://v0.app/docs/api/platform/reference/chats/update#usage) ----------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.update({ chatId: '123', name: 'My Renamed Chat', privacy: 'public', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/update#api-signature) --------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/update#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/chats/update#path-parameters) chatId: string The unique identifier of the chat to update. Provided as a path parameter. #### [Body](https://v0.app/docs/api/platform/reference/chats/update#body) name?: string A new name to assign to the chat. Helps with identification and organization. privacy?: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted' Sets the privacy level of the chat. ### [Response](https://v0.app/docs/api/platform/reference/chats/update#response) id: string A unique identifier for the chat. object: 'chat' Fixed value identifying this object as a chat. shareable: boolean Indicates whether the chat can be shared via public link. privacy: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted' Defines the visibility of the chat—private, team-only, or public. name?: string An optional name assigned to the chat by the user. title?: string deprecated Deprecated title field preserved for backward compatibility. createdAt: string The ISO timestamp representing when the chat was created. updatedAt?: string The ISO timestamp of the last update to the chat. favorite: boolean Indicates whether the chat is marked as a favorite. authorId: string The ID of the user who created the chat. projectId?: string Optional ID of the v0 project associated with this chat. webUrl: string Web URL to view this chat in the browser. apiUrl: string API URL to access this chat via the API. latestVersion?: object Full details of the most recent generated version, if available. id: string A unique identifier for the version. object: 'version' Fixed value identifying this object as a version. status: 'pending' | 'completed' | 'failed' The current status of the version generation process. demoUrl?: string Optional URL for previewing the generated output. screenshotUrl?: string URL to retrieve a screenshot of this version. createdAt: string The date and time when the version was created, in ISO 8601 format. updatedAt?: string The date and time when the version was last updated, in ISO 8601 format. files: object\[\] A list of files that were generated or included in this version. url: string deprecated The canonical URL to access this chat. messages: object\[\] All messages exchanged in the chat, including user and assistant entries. id: string A unique identifier for the message. object: 'message' Fixed value identifying this object as a message. content: string The main text content of the message. experimental\_content?: any\[\] | any\[\]\[\] The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change. createdAt: string The ISO timestamp representing when the message was created. updatedAt?: string The ISO timestamp representing when the message was last updated. type: 'message' | 'forked-block' | 'forked-chat' | 'open-in-v0' | 'refinement' | 'added-environment-variables' | 'added-integration' | 'deleted-file' | 'moved-file' | 'renamed-file' | 'edited-file' | 'replace-src' | 'reverted-block' | 'fix-with-v0' | 'auto-fix-with-v0' | 'sync-git' | 'fix-cve' | 'answered-questions' Indicates the format or category of the message, such as plain text or code. role: 'user' | 'assistant' Specifies whether the message was sent by the user or the assistant. finishReason?: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other' | 'unknown' The reason why the message generation finished. apiUrl: string API URL to access this message via the API. authorId: stringnull The ID of the user who sent the message. parentId?: stringnull The ID of the parent message. attachments?: object\[\] url: string The URL where the attachment file can be accessed. name?: string The original filename of the attachment. contentType?: string The MIME type of the attachment file (e.g., image/png, application/pdf). size: number The size of the attachment file in bytes. content?: string The base64-encoded content of the attachment file, if available. type?: 'screenshot' | 'figma' | 'zip' Optional v0-specific attachment type for enhanced processing. files?: object\[\] Optional array of files associated with the chat context. lang: string Programming language used in the file (e.g., JavaScript, Python). meta: object A key-value map of metadata associated with the file (e.g., path, type). source: string The origin or identifier of the file source (e.g., path or upload label). demo?: string deprecated Deprecated demo URL used for previewing the chat result. text: string The main user prompt or instruction that started the chat. modelConfiguration?: object The configuration used to generate responses in this chat. modelId?: 'v0-mini' | 'v0-pro' | 'v0-max' deprecated Deprecated Model ID field preserved for backward compatibility. imageGenerations?: boolean Enables image generations to generate up to 5 images per version. thinking?: boolean Enables thinking to generate a response in multiple steps. permissions: object write: boolean If true, the user has write access to the chat. [Get Chat\ \ Retrieves the full details of a specific chat using its \`chatId\`. Includes messages, metadata, and associated configuration.](https://v0.app/docs/api/platform/reference/chats/get-by-id) [Favorite Chat\ \ Marks or unmarks a chat as a favorite using its \`chatId\`. This helps with organizing and quickly accessing important chats.](https://v0.app/docs/api/platform/reference/chats/favorite) --- # Initialize Chat | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * [Create Chat](https://v0.app/docs/api/platform/reference/chats/create) * [Find Chats](https://v0.app/docs/api/platform/reference/chats/find) * [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init) * [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete) * [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id) * [Update Chat](https://v0.app/docs/api/platform/reference/chats/update) * [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite) * [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork) * [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message) * [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages) * [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message) * [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions) * [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version) * [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version) * [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume) * [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version) * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Chats Initialize Chat =============== Copy page Initializes a new chat from source content such as files, repositories, registries, or zip archives. Enables context-rich conversations based on code or assets. POST/v1/chats/init [Usage](https://v0.app/docs/api/platform/reference/chats/init#usage) --------------------------------------------------------------------- FilesRepositoryRegistryZIP Archive TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.chats.init({ type: 'files', files: [\ {\ name: 'app/globals.css',\ content: `\ body {\ background-color: black;\ color: white;\ }\ `,\ },\ ], }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/chats/init#api-signature) ------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/chats/init#request) #### [Body](https://v0.app/docs/api/platform/reference/chats/init#body) name?: string A user-defined name for the chat. Helps identify or describe the purpose of the chat session in the UI or API responses. chatPrivacy?: 'public' | 'private' | 'team-edit' | 'team' | 'unlisted' Controls the visibility of the chat. Defines whether the chat is private, shared with a team, or publicly accessible. projectId?: string Associates the chat with a specific project. Useful for organizing and grouping chats in a workspace. type?: 'template' Specifies the initialization method. For this endpoint, it defines the source of content being used to initialize the chat. files?: object | object\[\] An array of inline file objects used to initialize the chat. Each object must contain a file `name` and its `content`. name?: string url?: string locked?: boolean Whether to lock this file to prevent AI from overwriting it during generation content?: string repo?: object Specifies a repository source for initialization. Supports both public and private GitHub repositories. For private repositories, ensure your GitHub account is connected through Vercel. url: string branch?: string lockAllFiles?: boolean Whether to lock all files from the zip archive to prevent AI from overwriting them during generation registry?: object Allows initialization from a predefined component or code registry. Includes the registry source and identifier for the desired component/module. url: string zip?: object Provides a zipped bundle of files as the input source. Typically includes a base64-encoded archive or a remote URL reference. url: string templateId?: string The ID of the template to initialize the chat from. This should be a valid template ID from the v0 template system. ### [Response](https://v0.app/docs/api/platform/reference/chats/init#response) id: string A unique identifier for the chat. object: 'chat' Fixed value identifying this object as a chat. shareable: boolean Indicates whether the chat can be shared via public link. privacy: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted' Defines the visibility of the chat—private, team-only, or public. name?: string An optional name assigned to the chat by the user. title?: string deprecated Deprecated title field preserved for backward compatibility. createdAt: string The ISO timestamp representing when the chat was created. updatedAt?: string The ISO timestamp of the last update to the chat. favorite: boolean Indicates whether the chat is marked as a favorite. authorId: string The ID of the user who created the chat. projectId?: string Optional ID of the v0 project associated with this chat. webUrl: string Web URL to view this chat in the browser. apiUrl: string API URL to access this chat via the API. latestVersion?: object Full details of the most recent generated version, if available. id: string A unique identifier for the version. object: 'version' Fixed value identifying this object as a version. status: 'pending' | 'completed' | 'failed' The current status of the version generation process. demoUrl?: string Optional URL for previewing the generated output. screenshotUrl?: string URL to retrieve a screenshot of this version. createdAt: string The date and time when the version was created, in ISO 8601 format. updatedAt?: string The date and time when the version was last updated, in ISO 8601 format. files: object\[\] A list of files that were generated or included in this version. url: string deprecated The canonical URL to access this chat. messages: object\[\] All messages exchanged in the chat, including user and assistant entries. id: string A unique identifier for the message. object: 'message' Fixed value identifying this object as a message. content: string The main text content of the message. experimental\_content?: any\[\] | any\[\]\[\] The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change. createdAt: string The ISO timestamp representing when the message was created. updatedAt?: string The ISO timestamp representing when the message was last updated. type: 'message' | 'forked-block' | 'forked-chat' | 'open-in-v0' | 'refinement' | 'added-environment-variables' | 'added-integration' | 'deleted-file' | 'moved-file' | 'renamed-file' | 'edited-file' | 'replace-src' | 'reverted-block' | 'fix-with-v0' | 'auto-fix-with-v0' | 'sync-git' | 'fix-cve' | 'answered-questions' Indicates the format or category of the message, such as plain text or code. role: 'user' | 'assistant' Specifies whether the message was sent by the user or the assistant. finishReason?: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other' | 'unknown' The reason why the message generation finished. apiUrl: string API URL to access this message via the API. authorId: stringnull The ID of the user who sent the message. parentId?: stringnull The ID of the parent message. attachments?: object\[\] url: string The URL where the attachment file can be accessed. name?: string The original filename of the attachment. contentType?: string The MIME type of the attachment file (e.g., image/png, application/pdf). size: number The size of the attachment file in bytes. content?: string The base64-encoded content of the attachment file, if available. type?: 'screenshot' | 'figma' | 'zip' Optional v0-specific attachment type for enhanced processing. files?: object\[\] Optional array of files associated with the chat context. lang: string Programming language used in the file (e.g., JavaScript, Python). meta: object A key-value map of metadata associated with the file (e.g., path, type). source: string The origin or identifier of the file source (e.g., path or upload label). demo?: string deprecated Deprecated demo URL used for previewing the chat result. text: string The main user prompt or instruction that started the chat. modelConfiguration?: object The configuration used to generate responses in this chat. modelId?: 'v0-mini' | 'v0-pro' | 'v0-max' deprecated Deprecated Model ID field preserved for backward compatibility. imageGenerations?: boolean Enables image generations to generate up to 5 images per version. thinking?: boolean Enables thinking to generate a response in multiple steps. permissions: object write: boolean If true, the user has write access to the chat. [Find Chats\ \ Retrieves a list of existing chats, with support for pagination and filtering by favorite status. Helps manage and navigate chat history.](https://v0.app/docs/api/platform/reference/chats/find) [Delete Chat\ \ Deletes a specific chat based on the provided chatId. This operation is irreversible and permanently removes the chat and its contents.](https://v0.app/docs/api/platform/reference/chats/delete) --- # Start from Existing Code | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/Guides Start from Existing Code ======================== Copy page Learn how to start v0 chats from existing codebases, repositories, and file structures Learn how to bootstrap v0 chats from your existing code, whether it's a GitHub repository, local files, or zip archives. [Overview](https://v0.app/docs/api/platform/guides/start-from-existing-code#overview) -------------------------------------------------------------------------------------- The v0 Platform API supports multiple ways to initialize chats from existing code: * **GitHub Repositories** - Import directly from public or private repos * **File Uploads** - Upload individual files with content * **Zip Archives** - Import from zip file URLs * **Registry Components** - Use community components [Importing from GitHub Repositories](https://v0.app/docs/api/platform/guides/start-from-existing-code#importing-from-github-repositories) ------------------------------------------------------------------------------------------------------------------------------------------ ### [Basic Repository Import](https://v0.app/docs/api/platform/guides/start-from-existing-code#basic-repository-import) import { v0 } from 'v0-sdk' // Initialize chat from GitHub repository const chat = await v0.chats.init({ type: 'repo', repo: { url: 'https://github.com/username/my-react-app', branch: 'main', // optional, defaults to default branch }, projectId: 'your-project-id', // optional name: 'My Imported Project', // optional }) console.log(`Chat created: ${chat.id}`) ### [Lock Files from Modification](https://v0.app/docs/api/platform/guides/start-from-existing-code#lock-files-from-modification) // Initialize with all files locked to prevent AI modification const chat = await v0.chats.init({ type: 'repo', repo: { url: 'https://github.com/username/my-app', }, lockAllFiles: true, // Prevents AI from modifying any files }) [Importing from Files](https://v0.app/docs/api/platform/guides/start-from-existing-code#importing-from-files) -------------------------------------------------------------------------------------------------------------- ### [Upload Individual Files](https://v0.app/docs/api/platform/guides/start-from-existing-code#upload-individual-files) // Initialize chat with specific files const chat = await v0.chats.init({ type: 'files', files: [\ {\ name: 'src/components/Button.tsx',\ content: `\ import React from 'react'\ \ export function Button({ children, onClick }) {\ return (\ \ )\ }\ `,\ locked: false, // Allow AI to modify this file\ },\ {\ name: 'src/styles/button.css',\ content: `\ .btn {\ padding: 8px 16px;\ border: none;\ border-radius: 4px;\ background: #007bff;\ color: white;\ cursor: pointer;\ }\ `,\ locked: true, // Prevent AI from modifying this file\ },\ ], }) ### [Upload from URLs](https://v0.app/docs/api/platform/guides/start-from-existing-code#upload-from-urls) // Initialize chat with files from URLs const chat = await v0.chats.init({ type: 'files', files: [\ {\ name: 'package.json',\ url: 'https://raw.githubusercontent.com/username/repo/main/package.json',\ },\ {\ name: 'README.md',\ url: 'https://raw.githubusercontent.com/username/repo/main/README.md',\ locked: true,\ },\ ], }) [Importing from Zip Archives](https://v0.app/docs/api/platform/guides/start-from-existing-code#importing-from-zip-archives) ---------------------------------------------------------------------------------------------------------------------------- // Initialize chat from zip file URL const chat = await v0.chats.init({ type: 'zip', zip: { url: 'https://github.com/username/project/archive/refs/heads/main.zip', }, lockAllFiles: false, // Allow AI to modify files name: 'Project from Archive', }) [Importing from Community Registries](https://v0.app/docs/api/platform/guides/start-from-existing-code#importing-from-community-registries) -------------------------------------------------------------------------------------------------------------------------------------------- For specialized use cases, you can import from component registries: // Initialize chat from component registry (e.g., shadcn/ui) const chat = await v0.chats.init({ type: 'registry', registry: { url: 'https://ui.shadcn.com/registry/styles/default/button.json', }, lockAllFiles: false, }) [Working with Projects](https://v0.app/docs/api/platform/guides/start-from-existing-code#working-with-projects) ---------------------------------------------------------------------------------------------------------------- ### [Create Project and Chat Together](https://v0.app/docs/api/platform/guides/start-from-existing-code#create-project-and-chat-together) // Create a project first const project = await v0.projects.create({ name: 'My React App', description: 'Imported React application', environmentVariables: [\ { key: 'NODE_ENV', value: 'development' },\ { key: 'API_URL', value: 'http://localhost:3001' },\ ], }) // Then initialize chat with the project const chat = await v0.chats.init({ type: 'repo', repo: { url: 'https://github.com/username/react-app', }, projectId: project.id, name: 'Development Chat', }) [Chat vs Init vs Create](https://v0.app/docs/api/platform/guides/start-from-existing-code#chat-vs-init-vs-create) ------------------------------------------------------------------------------------------------------------------ ### [When to Use `chats.init()`](https://v0.app/docs/api/platform/guides/start-from-existing-code#when-to-use-chatsinit) Use `chats.init()` when you have existing code and want to start development: * **Fast** - No AI processing during initialization * **Free** - Doesn't consume tokens * **Files-first** - Start with existing code structure ### [When to Use `chats.create()`](https://v0.app/docs/api/platform/guides/start-from-existing-code#when-to-use-chatscreate) Use `chats.create()` when starting from scratch: * **AI-powered** - Generates initial code from prompts * **Token cost** - Consumes tokens for AI generation * **Prompt-first** - Start with natural language description // chats.init() - Fast, no tokens, existing code const initChat = await v0.chats.init({ type: 'files', files: existingFiles, }) // chats.create() - Slower, uses tokens, generates code const createChat = await v0.chats.create({ message: 'Create a React dashboard with charts', }) [Best Practices](https://v0.app/docs/api/platform/guides/start-from-existing-code#best-practices) -------------------------------------------------------------------------------------------------- ### [1\. File Organization](https://v0.app/docs/api/platform/guides/start-from-existing-code#1-file-organization) // ✅ Good: Organized file structure const chat = await v0.chats.init({ type: 'files', files: [\ { name: 'src/components/Button.tsx', content: '...' },\ { name: 'src/components/Card.tsx', content: '...' },\ { name: 'src/styles/globals.css', content: '...' },\ { name: 'package.json', content: '...', locked: true },\ ], }) ### [2\. Selective File Locking](https://v0.app/docs/api/platform/guides/start-from-existing-code#2-selective-file-locking) // ✅ Good: Lock configuration files, allow code modification const chat = await v0.chats.init({ type: 'files', files: [\ { name: 'src/App.tsx', content: '...', locked: false }, // Allow AI changes\ { name: 'package.json', content: '...', locked: true }, // Protect config\ { name: '.env.example', content: '...', locked: true }, // Protect secrets\ ], }) ### [3\. Project Integration](https://v0.app/docs/api/platform/guides/start-from-existing-code#3-project-integration) // ✅ Good: Use projects for organization const project = await v0.projects.create({ name: 'Frontend Components', instructions: 'Focus on accessible, reusable React components', }) const chat = await v0.chats.init({ type: 'repo', repo: { url: 'https://github.com/company/ui-library' }, projectId: project.id, }) [Displaying Chat Messages\ \ Learn how to render and format chat messages from the v0 Platform API using @v0-sdk/react](https://v0.app/docs/api/platform/guides/displaying-chat-messages) [Environment Variables\ \ Learn how to manage environment variables and configuration in v0 projects](https://v0.app/docs/api/platform/guides/environment-variables) --- # Find Hooks | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * [Find Hooks](https://v0.app/docs/api/platform/reference/hooks/find) * [Create Hook](https://v0.app/docs/api/platform/reference/hooks/create) * [Get Hook](https://v0.app/docs/api/platform/reference/hooks/get-by-id) * [Update Hook](https://v0.app/docs/api/platform/reference/hooks/update) * [Delete Hook](https://v0.app/docs/api/platform/reference/hooks/delete) * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Hooks Find Hooks ========== Copy page Retrieves a list of existing hooks in your workspace. Useful for managing active webhooks tied to chat events or deployments. GET/v1/hooks [Usage](https://v0.app/docs/api/platform/reference/hooks/find#usage) --------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.hooks.find() console.log(result) ### [Response](https://v0.app/docs/api/platform/reference/hooks/find#response) object: 'list' data: object\[\] id?: string A unique identifier for the webhook. object?: 'hook' Fixed value identifying this object as a webhook. name?: string A user-defined name to label the webhook. [Find Vercel Projects\ \ Retrieves a list of Vercel projects linked to your integration. Useful for associating chats, deployments, or hooks with specific Vercel projects.](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.find) [Create Hook\ \ Creates a new webhook that listens for specific events. Supports optional association with a chat.](https://v0.app/docs/api/platform/reference/hooks/create) --- # Agentic Features | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Agentic Features ================ Copy page v0's intelligent agent capabilities for web search, site inspection, and error fixing. v0 is an intelligent agent that can autonomously perform complex tasks beyond just generating code. The agent system combines web search, site inspection, error fixing, and external tool integration to create a truly autonomous development assistant. [Core Agent Capabilities](https://v0.app/docs/agentic-features#core-agent-capabilities) ---------------------------------------------------------------------------------------- ### [Web Search](https://v0.app/docs/agentic-features#web-search) v0 can search the web in real-time and provide cited results directly in your chat. **Features:** * Real-time web search with citation tracking * Rich result display with clickable source links * Progressive UI states showing search progress * Animated loading indicators **How it works:** When you ask v0 to search for current information, the SearchWeb subagent automatically queries the web, analyzes results, and presents them with proper citations. Results are displayed with citation pills that link directly to the source websites. ### [Site Inspection](https://v0.app/docs/agentic-features#site-inspection) v0 can visit and analyze any website, capturing screenshots and extracting content. **Features:** * Automated website screenshot capture * Visual analysis and content extraction * Error handling for inaccessible sites * Screenshot storage and display **Use cases:** * Analyzing competitor websites for design inspiration * Understanding the structure of existing sites * Capturing visual references for recreation * Inspecting responsive design implementations ### [Automatic Error Fixing](https://v0.app/docs/agentic-features#automatic-error-fixing) v0's advanced autofix system can detect and repair various types of errors in your code. **Types of errors it fixes:** * Missing files and dependencies * Code syntax and formatting issues * Runtime errors and bugs * Import and export problems **How it helps:** * Saves time by automatically fixing common errors * Learns from your codebase to suggest appropriate fixes * Handles routine maintenance tasks so you can focus on building [External Tool Integration](https://v0.app/docs/agentic-features#external-tool-integration) -------------------------------------------------------------------------------------------- ### [Third-Party Integrations](https://v0.app/docs/agentic-features#third-party-integrations) v0 can connect to external services and tools to extend its capabilities via the [Vercel Marketplace](https://vercel.com/marketplace) . [How Agent Capabilities Work](https://v0.app/docs/agentic-features#how-agent-capabilities-work) ------------------------------------------------------------------------------------------------ v0's agent system works seamlessly in the background to help you accomplish complex tasks. When you ask v0 to perform actions that require external information or tools, it automatically: * **Coordinates multiple tasks**: Handles complex workflows involving multiple steps * **Maintains context**: Remembers previous actions and results throughout the conversation * **Provides real-time feedback**: Shows you what it's doing as it works * **Handles errors gracefully**: Recovers from issues and tries alternative approaches [User Interface](https://v0.app/docs/agentic-features#user-interface) ---------------------------------------------------------------------- ### [Real-time Feedback](https://v0.app/docs/agentic-features#real-time-feedback) The agent system provides rich visual feedback: * **Progress indicators**: Live updates on agent actions * **Task cards**: Visual representation of ongoing tasks * **Citation display**: Rich formatting for web search results * **Tool execution**: Status cards for external tool operations ### [Agent Control](https://v0.app/docs/agentic-features#agent-control) Users have full control over agent execution: * **Manual stops**: Interrupt agent execution at any time * **Auto-continue**: Automatic progression through multi-step tasks * **Task visibility**: Clear visibility into agent decision-making [Getting Started](https://v0.app/docs/agentic-features#getting-started) ------------------------------------------------------------------------ To use v0's agent capabilities, simply ask v0 to perform tasks that require these features: * **"Search for the latest React best practices"** - triggers web search * **"Show me what GitHub's homepage looks like"** - captures a screenshot * **"Fix the TypeScript errors in my code"** - runs automatic error fixing * **"Connect to my Supabase database"** - sets up external integrations v0 will automatically use the appropriate capabilities based on what you're asking for, with clear visual feedback showing what it's doing. [Get started with v0](https://v0.app/docs/quickstart) [What is v0?\ \ v0 is an AI-powered development platform that turns ideas into production-ready, full-stack web apps.](https://v0.app/docs/introduction) [Vercel Integration\ \ How v0 and Vercel work in tandem.](https://v0.app/docs/vercel-integration) --- # Create Hook | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * [Find Hooks](https://v0.app/docs/api/platform/reference/hooks/find) * [Create Hook](https://v0.app/docs/api/platform/reference/hooks/create) * [Get Hook](https://v0.app/docs/api/platform/reference/hooks/get-by-id) * [Update Hook](https://v0.app/docs/api/platform/reference/hooks/update) * [Delete Hook](https://v0.app/docs/api/platform/reference/hooks/delete) * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Hooks Create Hook =========== Copy page Creates a new webhook that listens for specific events. Supports optional association with a chat. POST/v1/hooks [Usage](https://v0.app/docs/api/platform/reference/hooks/create#usage) ----------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.hooks.create({ name: 'My Hook', events: ['chat.created', 'message.created'], url: 'https://example.com', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/hooks/create#api-signature) --------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/hooks/create#request) #### [Body](https://v0.app/docs/api/platform/reference/hooks/create#body) name: string A human-readable name for the hook. events: 'chat.created' | 'chat.updated' | 'chat.deleted' | 'message.created' | 'message.updated' | 'message.deleted' | 'message.finished'\[\] List of event types the hook should subscribe to. chatId?: string The ID of a chat to scope the hook to. url: string The target URL to receive the webhook payloads. ### [Response](https://v0.app/docs/api/platform/reference/hooks/create#response) id: string A unique identifier for the webhook. object: 'hook' Fixed value identifying this object as a webhook. name: string A user-defined name to label the webhook. events: 'chat.created' | 'chat.updated' | 'chat.deleted' | 'message.created' | 'message.updated' | 'message.deleted' | 'message.finished'\[\] List of event types this webhook is subscribed to. chatId?: string Optional ID of the chat that this webhook is scoped to. url: string Target URL that receives event payloads for this webhook. [Find Hooks\ \ Retrieves a list of existing hooks in your workspace. Useful for managing active webhooks tied to chat events or deployments.](https://v0.app/docs/api/platform/reference/hooks/find) [Get Hook\ \ Retrieves the details of a specific webhook using its ID.](https://v0.app/docs/api/platform/reference/hooks/get-by-id) --- # Get Hook | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * [Find Hooks](https://v0.app/docs/api/platform/reference/hooks/find) * [Create Hook](https://v0.app/docs/api/platform/reference/hooks/create) * [Get Hook](https://v0.app/docs/api/platform/reference/hooks/get-by-id) * [Update Hook](https://v0.app/docs/api/platform/reference/hooks/update) * [Delete Hook](https://v0.app/docs/api/platform/reference/hooks/delete) * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Hooks Get Hook ======== Copy page Retrieves the details of a specific webhook using its ID. GET/v1/hooks/{hookId} [Usage](https://v0.app/docs/api/platform/reference/hooks/get-by-id#usage) -------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.hooks.getById({ hookId: '123', }) console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/hooks/get-by-id#api-signature) ------------------------------------------------------------------------------------------ ### [Request](https://v0.app/docs/api/platform/reference/hooks/get-by-id#request) #### [Path Parameters](https://v0.app/docs/api/platform/reference/hooks/get-by-id#path-parameters) hookId: string The unique identifier of the hook to retrieve. ### [Response](https://v0.app/docs/api/platform/reference/hooks/get-by-id#response) id: string A unique identifier for the webhook. object: 'hook' Fixed value identifying this object as a webhook. name: string A user-defined name to label the webhook. events: 'chat.created' | 'chat.updated' | 'chat.deleted' | 'message.created' | 'message.updated' | 'message.deleted' | 'message.finished'\[\] List of event types this webhook is subscribed to. chatId?: string Optional ID of the chat that this webhook is scoped to. url: string Target URL that receives event payloads for this webhook. [Create Hook\ \ Creates a new webhook that listens for specific events. Supports optional association with a chat.](https://v0.app/docs/api/platform/reference/hooks/create) [Update Hook\ \ Updates the configuration of an existing webhook, including its name, event subscriptions, or target URL.](https://v0.app/docs/api/platform/reference/hooks/update) --- # Create Vercel Project | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * [Create Vercel Project](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.create) * [Find Vercel Projects](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.find) * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/API Reference/Integrations Create Vercel Project ===================== Copy page Links a Vercel project to an existing v0 project. Enables Vercel-related features and deployment integration within the v0 workspace. POST/v1/integrations/vercel/projects [Usage](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.create#usage) ----------------------------------------------------------------------------------------------------------- TypeScript Example TypeScriptcURL import { v0 } from 'v0-sdk' const result = await v0.integrations.vercel.projects.create() console.log(result) [API Signature](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.create#api-signature) --------------------------------------------------------------------------------------------------------------------------- ### [Request](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.create#request) #### [Body](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.create#body) projectId: string The ID of the v0 project to link to the new Vercel project. name: string The name to assign to the new Vercel project. ### [Response](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.create#response) id: string A unique identifier for the linked Vercel project. object: 'vercel\_project' Fixed value identifying this object as a Vercel project. name: string The name of the Vercel project. [Find Deployment Errors\ \ Retrieves a list of errors that occurred during a specific deployment. Useful for diagnosing and debugging deployment issues.](https://v0.app/docs/api/platform/reference/deployments/find-errors) [Find Vercel Projects\ \ Retrieves a list of Vercel projects linked to your integration. Useful for associating chats, deployments, or hooks with specific Vercel projects.](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.find) --- # @v0-sdk/react | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/Packages @v0-sdk/react ============= Copy page Headless React components for rendering v0 Platform API content Headless React components for rendering content from the v0 Platform API. Provides components for streaming messages, code blocks, thinking sections, and more. [Installation](https://v0.app/docs/api/platform/packages/react#installation) ----------------------------------------------------------------------------- npm install @v0-sdk/react # or pnpm add @v0-sdk/react # or yarn add @v0-sdk/react [Quick Start](https://v0.app/docs/api/platform/packages/react#quick-start) --------------------------------------------------------------------------- import { StreamingMessage } from '@v0-sdk/react' function ChatInterface({ message }) { return ( { console.log('Streaming complete:', result) }} /> ) } [Components](https://v0.app/docs/api/platform/packages/react#components) ------------------------------------------------------------------------- ### [StreamingMessage](https://v0.app/docs/api/platform/packages/react#streamingmessage) Renders streaming chat messages with real-time updates. import { StreamingMessage } from '@v0-sdk/react' function Chat() { return ( { // Handle completion }} onError={(error) => { // Handle errors }} /> ) } #### [Props](https://v0.app/docs/api/platform/packages/react#props) * `message` - The streaming message data * `theme?` - Visual theme (`elegant`, `minimal`, `neobrutalism`, `terminal`) * `className?` - Additional CSS classes * `onComplete?` - Callback when streaming completes * `onError?` - Callback for error handling ### [CodeBlock](https://v0.app/docs/api/platform/packages/react#codeblock) Syntax-highlighted code blocks with copy functionality. import { CodeBlock } from '@v0-sdk/react' function CodeDisplay() { return ( ) } #### [Props](https://v0.app/docs/api/platform/packages/react#props-1) * `code` - The code string to display * `language` - Programming language for syntax highlighting * `showLineNumbers?` - Display line numbers * `copyable?` - Show copy button * `theme?` - Color theme for syntax highlighting ### [ThinkingSection](https://v0.app/docs/api/platform/packages/react#thinkingsection) Displays AI thinking process with animated indicators. import { ThinkingSection } from '@v0-sdk/react' function AIThinking() { return ( ) } #### [Props](https://v0.app/docs/api/platform/packages/react#props-2) * `thoughts` - Array of thinking steps * `isVisible?` - Control visibility * `animated?` - Enable animations * `collapsible?` - Allow collapse/expand ### [TaskSection](https://v0.app/docs/api/platform/packages/react#tasksection) Renders task lists and progress indicators. import { TaskSection } from '@v0-sdk/react' function TaskProgress() { return ( { // Handle task completion }} /> ) } #### [Props](https://v0.app/docs/api/platform/packages/react#props-3) * `tasks` - Array of task objects * `showProgress?` - Display progress bar * `interactive?` - Allow user interaction * `onTaskComplete?` - Callback for task completion [Themes](https://v0.app/docs/api/platform/packages/react#themes) ----------------------------------------------------------------- ### [Built-in Themes](https://v0.app/docs/api/platform/packages/react#built-in-themes) // Elegant - Sophisticated design // Minimal - Clean, distraction-free // Neobrutalism - Bold, high-contrast // Terminal - Developer-focused ### [Custom Themes](https://v0.app/docs/api/platform/packages/react#custom-themes) const customTheme = { primary: '#3b82f6', background: '#f8fafc', text: '#1e293b', accent: '#06b6d4', border: '#e2e8f0', } [Hooks](https://v0.app/docs/api/platform/packages/react#hooks) --------------------------------------------------------------- ### [useStreamingChat](https://v0.app/docs/api/platform/packages/react#usestreamingchat) Hook for managing streaming chat state. import { useStreamingChat } from '@v0-sdk/react' function ChatApp() { const { messages, sendMessage, isLoading, error, clearMessages } = useStreamingChat({ apiKey: process.env.V0_API_KEY, onMessage: (message) => { console.log('New message:', message) }, }) return (
{messages.map((message, index) => ( ))}
) } ### [useCodeHighlight](https://v0.app/docs/api/platform/packages/react#usecodehighlight) Hook for syntax highlighting with custom themes. import { useCodeHighlight } from '@v0-sdk/react' function CustomCodeBlock({ code, language }) { const { highlightedCode, isLoading } = useCodeHighlight({ code, language, theme: 'github-dark', }) if (isLoading) return
Loading...
return
    }

[Styling](https://v0.app/docs/api/platform/packages/react#styling)

-------------------------------------------------------------------

### [CSS Custom Properties](https://v0.app/docs/api/platform/packages/react#css-custom-properties)

    :root {
      --v0-primary: #3b82f6;
      --v0-background: #ffffff;
      --v0-text: #1e293b;
      --v0-border: #e2e8f0;
      --v0-accent: #06b6d4;
    }
    
    .dark {
      --v0-primary: #60a5fa;
      --v0-background: #0f172a;
      --v0-text: #f1f5f9;
      --v0-border: #334155;
      --v0-accent: #22d3ee;
    }

### [Tailwind CSS Classes](https://v0.app/docs/api/platform/packages/react#tailwind-css-classes)

The components work seamlessly with Tailwind CSS:

    

[TypeScript Support](https://v0.app/docs/api/platform/packages/react#typescript-support)

-----------------------------------------------------------------------------------------

Full TypeScript support with comprehensive type definitions:

    import type {
      StreamingMessageProps,
      CodeBlockProps,
      ThinkingSectionProps,
      ChatMessage,
      StreamingState,
    } from '@v0-sdk/react'
    
    interface CustomChatProps {
      messages: ChatMessage[]
      onSendMessage: (message: string) => void
    }
    
    const CustomChat: React.FC = ({ messages, onSendMessage }) => {
      // Component implementation
    }

[Requirements](https://v0.app/docs/api/platform/packages/react#requirements)

-----------------------------------------------------------------------------

*   React 18+ or React 19+
*   TypeScript 5.0+ (for TypeScript projects)

[Links](https://v0.app/docs/api/platform/packages/react#links)

---------------------------------------------------------------

*   [GitHub Repository](https://github.com/vercel/v0-sdk/tree/main/packages/react)
    
*   [npm Package](https://www.npmjs.com/package/@v0-sdk/react)
    
*   [React Examples](https://v0.app/docs/api/platform/examples/react-components)
    

[create-v0-sdk-app\
\
Create v0 SDK-powered apps with one command](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
[@v0-sdk/ai-tools\
\
AI SDK tools for the v0 Platform API](https://v0.app/docs/api/platform/packages/ai-tools)

---

# Update Chat Version Files | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   [Create Chat](https://v0.app/docs/api/platform/reference/chats/create)
    
*   [Find Chats](https://v0.app/docs/api/platform/reference/chats/find)
    
*   [Initialize Chat](https://v0.app/docs/api/platform/reference/chats/init)
    
*   [Delete Chat](https://v0.app/docs/api/platform/reference/chats/delete)
    
*   [Get Chat](https://v0.app/docs/api/platform/reference/chats/get-by-id)
    
*   [Update Chat](https://v0.app/docs/api/platform/reference/chats/update)
    
*   [Favorite Chat](https://v0.app/docs/api/platform/reference/chats/favorite)
    
*   [Fork Chat](https://v0.app/docs/api/platform/reference/chats/fork)
    
*   [Send Message](https://v0.app/docs/api/platform/reference/chats/send-message)
    
*   [Find Chat Messages](https://v0.app/docs/api/platform/reference/chats/find-messages)
    
*   [Get Chat Message](https://v0.app/docs/api/platform/reference/chats/get-message)
    
*   [Find Chat Versions](https://v0.app/docs/api/platform/reference/chats/find-versions)
    
*   [Get Chat Version](https://v0.app/docs/api/platform/reference/chats/get-version)
    
*   [Update Chat Version Files](https://v0.app/docs/api/platform/reference/chats/update-version)
    
*   [Resume Message](https://v0.app/docs/api/platform/reference/chats/resume)
    
*   [Download version files](https://v0.app/docs/api/platform/reference/chats/download-version)
    

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Chats

Update Chat Version Files
=========================

Copy page

Updates the source files of a specific chat version (block) manually. This allows editing generated files directly through the API.

PATCH/v1/chats/{chatId}/versions/{versionId}

[Usage](https://v0.app/docs/api/platform/reference/chats/update-version#usage)

-------------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.chats.updateVersion()
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/chats/update-version#api-signature)

-----------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/chats/update-version#request)

#### [Path Parameters](https://v0.app/docs/api/platform/reference/chats/update-version#path-parameters)

chatId: string

The unique identifier of the chat containing the version to update. Provided as a path parameter.

versionId: string

The unique identifier of the version (block) to update. Provided as a path parameter.

#### [Body](https://v0.app/docs/api/platform/reference/chats/update-version#body)

files: object\[\]

Array of files to update with their new content

name: string

The full file path including extension (e.g., "components/test.tsx")

content: string

The new content for the file

locked?: boolean

Whether to lock or unlock the file to prevent AI from overwriting it during generation

### [Response](https://v0.app/docs/api/platform/reference/chats/update-version#response)

id: string

A unique identifier for the version.

object: 'version'

Fixed value identifying this object as a version.

status: 'pending' | 'completed' | 'failed'

The current status of the version generation process.

demoUrl?: string

Optional URL for previewing the generated output.

screenshotUrl?: string

URL to retrieve a screenshot of this version.

createdAt: string

The date and time when the version was created, in ISO 8601 format.

updatedAt?: string

The date and time when the version was last updated, in ISO 8601 format.

files: object\[\]

A list of files that were generated or included in this version.

object: 'file'

Fixed value identifying this object as a file.

name: string

The name of the file, including its extension.

content: string

The full contents of the file as a raw string.

locked: boolean

Whether the file is locked to prevent AI from overwriting it during new version generation.

[Get Chat Version\
\
Retrieves detailed information about a specific version of a chat, including all files with their content and lock status.](https://v0.app/docs/api/platform/reference/chats/get-version)
[Resume Message\
\
Resumes processing of a previously interrupted or incomplete message in a chat. Useful for continuing generation when a message was paused or stopped.](https://v0.app/docs/api/platform/reference/chats/resume)

---

# Delete Hook | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   [Find Hooks](https://v0.app/docs/api/platform/reference/hooks/find)
    
*   [Create Hook](https://v0.app/docs/api/platform/reference/hooks/create)
    
*   [Get Hook](https://v0.app/docs/api/platform/reference/hooks/get-by-id)
    
*   [Update Hook](https://v0.app/docs/api/platform/reference/hooks/update)
    
*   [Delete Hook](https://v0.app/docs/api/platform/reference/hooks/delete)
    

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Hooks

Delete Hook
===========

Copy page

Deletes a webhook based on its ID. This action is irreversible.

DELETE/v1/hooks/{hookId}

[Usage](https://v0.app/docs/api/platform/reference/hooks/delete#usage)

-----------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.hooks.delete({
      hookId: '123',
    })
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/hooks/delete#api-signature)

---------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/hooks/delete#request)

#### [Path Parameters](https://v0.app/docs/api/platform/reference/hooks/delete#path-parameters)

hookId: string

The ID of the webhook to delete. Provided as a path parameter.

### [Response](https://v0.app/docs/api/platform/reference/hooks/delete#response)

id: string

object: 'hook'

deleted: 'true'

[Update Hook\
\
Updates the configuration of an existing webhook, including its name, event subscriptions, or target URL.](https://v0.app/docs/api/platform/reference/hooks/update)
[Find Rate Limit\
\
Retrieves rate limit information for a given scope. Useful for monitoring usage limits and avoiding throttling.](https://v0.app/docs/api/platform/reference/rate-limits/find)

---

# Account | v0 Docs

Getting Started

*   [What is v0?](https://v0.app/docs/introduction)
    
*   [Agentic Features](https://v0.app/docs/agentic-features)
    
*   [Vercel Integration](https://v0.app/docs/vercel-integration)
    
*   [Quickstart](https://v0.app/docs/quickstart)
    
*   [FAQs](https://v0.app/docs/faqs)
    

Prompt

*   [Text Prompting](https://v0.app/docs/text-prompting)
    
*   [Screenshots and Files](https://v0.app/docs/screenshots)
    
*   [Figma](https://v0.app/docs/figma)
    

Iterate

*   [Code editing](https://v0.app/docs/code-editing)
    
*   [Design mode](https://v0.app/docs/design-mode)
    
*   [Design systems](https://v0.app/docs/design-systems)
    
*   [Images and videos](https://v0.app/docs/images-and-videos)
    
*   [Versions](https://v0.app/docs/versions)
    

Integrate

*   [AI models](https://v0.app/docs/ai-models)
    
*   [Databases](https://v0.app/docs/databases)
    
*   [External APIs](https://v0.app/docs/external-apis)
    
*   [GitHub](https://v0.app/docs/github)
    
*   [MCP Integrations](https://v0.app/docs/MCP)
    

Ship

*   [Deployments](https://v0.app/docs/deployments)
    
*   [Custom domain](https://v0.app/docs/custom-domains)
    
*   [Sharing](https://v0.app/docs/sharing)
    
*   [Templates](https://v0.app/docs/templates)
    

Manage

*   [Account](https://v0.app/docs/account)
    
*   [Community](https://v0.app/docs/community)
    
*   [Enterprise](https://v0.app/docs/enterprise)
    
*   [Instructions](https://v0.app/docs/instructions)
    
*   [Projects](https://v0.app/docs/projects)
    
*   [Pricing](https://v0.app/docs/pricing)
    
*   [Teams](https://v0.app/docs/teams)
    
*   [Security](https://v0.app/docs/security)
    

Embed

*   [Cline](https://v0.app/docs/cline)
    
*   [Cursor](https://v0.app/docs/cursor)
    
*   [OpenAI Codex](https://v0.app/docs/openai-codex)
    
*   [Zed](https://v0.app/docs/zed)
    

Guides

*   [Full-stack apps](https://v0.app/docs/full-stack-apps)
    
*   [Prototyping](https://v0.app/docs/prototyping)
    
*   [PRD design](https://v0.app/docs/prd-design)
    

Menu

Account
=======

Copy page

Manage your account and billing information.

You can manage your account from the settings page. To access this, click your avatar in the top right corner of the interface and select **Settings**.

[Billing](https://v0.app/docs/account#billing)

-----------------------------------------------

You can view your billing information in the settings. This includes your current plan, payment methods, and invoices. Viewing invoices will take you to your Vercel dashboard.

[Learn more about pricing](https://v0.app/docs/pricing)

[Cancelling your subscription](https://v0.app/docs/account#cancelling-your-subscription)

-----------------------------------------------------------------------------------------

You can cancel your subscription at any time. To do this:

1.  Ensure you have selected the scope whose subscription you want to cancel using the dropdown located at the top left of the page
2.  Click your avatar in the top right corner of the interface
3.  Click on **Settings**
4.  Click on **Billing**
5.  In the **Current Plan** section, click on **Cancel Plan**

This will move your account to the free plan at the end of your current billing period.

[Account recovery](https://v0.app/docs/account#account-recovery)

-----------------------------------------------------------------

Once a account or team has been confirmed for deletion, the deletion process cannot be stopped nor the account recovered. If you wish to reuse , you will need to wait 7 days to sign up with the same email address.

For chats, once a chat is deleted, it will be stored in your [chat archive](https://v0.app/chat/archive)
. Chats will exist in your archive for 30 days, during which they can be restored before being permanently deleted.

[Templates\
\
Share your v0 creations with the community by publishing them as templates. Templates appear in your public profile and can be forked by other users.](https://v0.app/docs/templates)
[Community\
\
Manage your shared community projects.](https://v0.app/docs/community)

---

# Find Vercel Projects | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   Deployments

*   Integrations

*   [Create Vercel Project](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.create)
    
*   [Find Vercel Projects](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.find)
    

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Integrations

Find Vercel Projects
====================

Copy page

Retrieves a list of Vercel projects linked to your integration. Useful for associating chats, deployments, or hooks with specific Vercel projects.

GET/v1/integrations/vercel/projects

[Usage](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.find#usage)

---------------------------------------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.integrations.vercel.projects.find()
    
    console.log(result)

### [Response](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.find#response)

object: 'list'

data: object\[\]

id?: string

A unique identifier for the linked Vercel project.

object?: 'vercel\_project'

Fixed value identifying this object as a Vercel project.

name?: string

The name of the Vercel project.

[Create Vercel Project\
\
Links a Vercel project to an existing v0 project. Enables Vercel-related features and deployment integration within the v0 workspace.](https://v0.app/docs/api/platform/reference/integrations/integrations.vercel.projects.create)
[Find Hooks\
\
Retrieves a list of existing hooks in your workspace. Useful for managing active webhooks tied to chat events or deployments.](https://v0.app/docs/api/platform/reference/hooks/find)

---

# @v0-sdk/ai-tools | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/Packages

@v0-sdk/ai-tools
================

Copy page

AI SDK tools for the v0 Platform API

AI SDK tools that enable autonomous agents to interact with the v0 Platform API. Build intelligent workflows that can create projects, manage chats, handle deployments, and more.

[Installation](https://v0.app/docs/api/platform/packages/ai-tools#installation)

--------------------------------------------------------------------------------

    npm install @v0-sdk/ai-tools ai
    # or
    pnpm add @v0-sdk/ai-tools ai
    # or
    yarn add @v0-sdk/ai-tools ai

[Quick Start](https://v0.app/docs/api/platform/packages/ai-tools#quick-start)

------------------------------------------------------------------------------

    import { generateText } from 'ai'
    import { v0Tools } from '@v0-sdk/ai-tools'
    
    const result = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: 'Create a new React todo app project',
      tools: v0Tools({
        apiKey: process.env.V0_API_KEY,
      }),
    })
    
    console.log(result.text)

[Tool Categories](https://v0.app/docs/api/platform/packages/ai-tools#tool-categories)

--------------------------------------------------------------------------------------

### [All Tools (High Context)](https://v0.app/docs/api/platform/packages/ai-tools#all-tools-high-context)

Use all available tools for maximum capability:

    import { v0Tools } from '@v0-sdk/ai-tools'
    
    const tools = v0Tools({
      apiKey: process.env.V0_API_KEY,
    })
    
    const result = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: 'Build a complete web app with deployment',
      tools,
    })

⚠️ **Note**: Includes 20+ tools which adds significant context to AI calls.

### [Selective Tools (Recommended)](https://v0.app/docs/api/platform/packages/ai-tools#selective-tools-recommended)

Choose specific tool categories for better performance:

    import { v0ToolsByCategory } from '@v0-sdk/ai-tools'
    
    const tools = v0ToolsByCategory({
      apiKey: process.env.V0_API_KEY,
    })
    
    const result = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: 'Create a new project and start a chat',
      tools: {
        ...tools.project, // Project management tools
        ...tools.chat, // Chat tools
      },
    })

[Available Tool Categories](https://v0.app/docs/api/platform/packages/ai-tools#available-tool-categories)

----------------------------------------------------------------------------------------------------------

### [Chat Tools](https://v0.app/docs/api/platform/packages/ai-tools#chat-tools)

    const result = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: 'Create a chat about building a landing page',
      tools: tools.chat,
    })

**Available tools:**

*   `createChat` - Create new chats
*   `sendMessage` - Send messages to chats
*   `getChat` - Retrieve chat details
*   `findChats` - List user chats
*   `deleteChat` - Remove chats

### [Project Tools](https://v0.app/docs/api/platform/packages/ai-tools#project-tools)

    const result = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: 'Create a new project called "My Portfolio"',
      tools: tools.project,
    })

**Available tools:**

*   `createProject` - Create new projects
*   `getProject` - Get project details
*   `findProjects` - List projects
*   `updateProject` - Modify projects
*   `deleteProject` - Remove projects

### [Deployment Tools](https://v0.app/docs/api/platform/packages/ai-tools#deployment-tools)

    const result = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: 'Deploy the project and check its status',
      tools: tools.deployment,
    })

**Available tools:**

*   `createDeployment` - Deploy projects
*   `getDeployment` - Check deployment status
*   `findDeployments` - List deployments
*   `getDeploymentLogs` - View deployment logs
*   `getDeploymentErrors` - Check for errors

### [User Tools](https://v0.app/docs/api/platform/packages/ai-tools#user-tools)

    const result = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: 'Check my account information and billing status',
      tools: tools.user,
    })

**Available tools:**

*   `getUser` - Get user information
*   `getUserBilling` - Check billing details
*   `getUserPlan` - View subscription plan
*   `getUserScopes` - Check permissions

### [Hook Tools](https://v0.app/docs/api/platform/packages/ai-tools#hook-tools)

    const result = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: 'Set up a webhook for deployment notifications',
      tools: tools.hook,
    })

**Available tools:**

*   `createHook` - Create webhooks
*   `getHook` - Get webhook details
*   `findHooks` - List webhooks
*   `updateHook` - Modify webhooks
*   `deleteHook` - Remove webhooks

[Agent Patterns](https://v0.app/docs/api/platform/packages/ai-tools#agent-patterns)

------------------------------------------------------------------------------------

### [Multi-Step Agent](https://v0.app/docs/api/platform/packages/ai-tools#multi-step-agent)

    import { generateText, stopWhen, stepCountIs } from 'ai'
    
    const result = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: 'Build and deploy a complete todo app',
      tools: {
        ...tools.project,
        ...tools.chat,
        ...tools.deployment,
      },
      stopWhen: stepCountIs(5), // Limit execution steps
    })

### [Sequential Processing](https://v0.app/docs/api/platform/packages/ai-tools#sequential-processing)

    // Step 1: Create project
    const projectResult = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: 'Create a new project for a todo app',
      tools: tools.project,
    })
    
    // Step 2: Start development chat
    const chatResult = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: `Create a chat for project ${projectResult.toolResults[0].result.id}`,
      tools: tools.chat,
    })
    
    // Step 3: Deploy when ready
    const deployResult = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: 'Deploy the completed project',
      tools: tools.deployment,
    })

### [Routing Agent](https://v0.app/docs/api/platform/packages/ai-tools#routing-agent)

    import { generateText } from 'ai'
    
    const routingResult = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: userRequest,
      tools: {
        routeToProject: tool({
          description: 'Route to project management',
          parameters: z.object({
            action: z.string(),
          }),
        }),
        routeToChat: tool({
          description: 'Route to chat management',
          parameters: z.object({
            action: z.string(),
          }),
        }),
      },
    })
    
    // Use appropriate tools based on routing
    const tools =
      routingResult.toolResults[0].toolName === 'routeToProject'
        ? tools.project
        : tools.chat

### [Parallel Processing](https://v0.app/docs/api/platform/packages/ai-tools#parallel-processing)

    const [projectResult, userResult] = await Promise.all([\
      generateText({\
        model: openai('gpt-4o-mini'),\
        prompt: 'Analyze my projects',\
        tools: tools.project,\
      }),\
      generateText({\
        model: openai('gpt-4o-mini'),\
        prompt: 'Check my account status',\
        tools: tools.user,\
      }),\
    ])

[Configuration](https://v0.app/docs/api/platform/packages/ai-tools#configuration)

----------------------------------------------------------------------------------

### [Environment Variables](https://v0.app/docs/api/platform/packages/ai-tools#environment-variables)

    V0_API_KEY=your_v0_api_key_here
    AI_GATEWAY_API_KEY=your_ai_gateway_api_key_here

### [Custom Configuration](https://v0.app/docs/api/platform/packages/ai-tools#custom-configuration)

    const tools = v0ToolsByCategory({
      apiKey: process.env.V0_API_KEY,
      baseURL: 'https://api.v0.dev/v1', // Optional
      timeout: 30000, // Optional
    })

[Error Handling](https://v0.app/docs/api/platform/packages/ai-tools#error-handling)

------------------------------------------------------------------------------------

    try {
      const result = await generateText({
        model: openai('gpt-4o-mini'),
        prompt: 'Create a project',
        tools: tools.project,
      })
    } catch (error) {
      if (error.name === 'V0Error') {
        console.error('v0 API error:', error.message)
      } else if (error.name === 'AIError') {
        console.error('AI SDK error:', error.message)
      } else {
        console.error('Unexpected error:', error)
      }
    }

[Best Practices](https://v0.app/docs/api/platform/packages/ai-tools#best-practices)

------------------------------------------------------------------------------------

1.  **Use selective tools** - Only include categories you need
2.  **Set step limits** - Use `stopWhen` to control execution
3.  **Handle errors** - Wrap calls in try-catch blocks
4.  **Monitor usage** - Track API calls and costs
5.  **Test incrementally** - Start with simple workflows

[Requirements](https://v0.app/docs/api/platform/packages/ai-tools#requirements)

--------------------------------------------------------------------------------

*   Node.js 22+
*   AI SDK 5.0+
*   v0 API key from [v0.dev](https://v0.dev/chat/settings/keys)
    

[Links](https://v0.app/docs/api/platform/packages/ai-tools#links)

------------------------------------------------------------------

*   [GitHub Repository](https://github.com/vercel/v0-sdk/tree/main/packages/ai-tools)
    
*   [npm Package](https://www.npmjs.com/package/@v0-sdk/ai-tools)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    

[@v0-sdk/react\
\
Headless React components for rendering v0 Platform API content](https://v0.app/docs/api/platform/packages/react)
[Create Project\
\
Creates a new v0 project with an optional description, icon, environment variables, and instructions. Projects help organize chats and manage context.](https://v0.app/docs/api/platform/reference/projects/create)

---

# create-v0-sdk-app | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/Packages

create-v0-sdk-app
=================

Copy page

Create v0 SDK-powered apps with one command

A command-line tool for quickly scaffolding new applications powered by the v0 SDK. Get started with pre-built templates and examples.

[Installation](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#installation)

-----------------------------------------------------------------------------------------

No installation required! Use with `npx`:

    npx create-v0-sdk-app@latest my-app

Or install globally:

    npm install -g create-v0-sdk-app
    create-v0-sdk-app my-app

[Usage](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#usage)

---------------------------------------------------------------------------

### [Interactive Mode](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#interactive-mode)

    npx create-v0-sdk-app@latest

The CLI will prompt you for:

*   **Project name**: Your app's directory name
*   **Template**: Choose from available templates
*   **Package manager**: npm, pnpm, or yarn

### [Direct Usage](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#direct-usage)

    npx create-v0-sdk-app@latest my-app --template v0-clone

[Available Templates](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#available-templates)

-------------------------------------------------------------------------------------------------------

### [v0 Clone](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#v0-clone)

A full-featured replica of v0.dev with authentication and multi-tenant support.

    npx create-v0-sdk-app@latest my-app --template v0-clone

**Features:**

*   User authentication (NextAuth.js)
*   Multi-tenant architecture
*   PostgreSQL database with Drizzle ORM
*   Real-time streaming
*   Rate limiting

### [Classic v0](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#classic-v0)

The iconic v0.dev interface with three-generation workflow.

    npx create-v0-sdk-app@latest my-app --template classic-v0

**Features:**

*   Classic v0 UI/UX
*   Multiple generations (A, B, C)
*   shadcn/ui components
*   Next.js 15 with App Router

### [AI Tools Example](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#ai-tools-example)

Demonstrates AI SDK integration with v0 tools.

    npx create-v0-sdk-app@latest my-app --template ai-tools-example

**Features:**

*   AI SDK integration
*   v0 tools for autonomous agents
*   Multiple agent patterns
*   TypeScript examples

[Command Options](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#command-options)

-----------------------------------------------------------------------------------------------

    create-v0-sdk-app [project-name] [options]

### [Options](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#options)

*   `--template ` - Specify template (v0-clone, classic-v0, ai-tools-example)
*   `--package-manager ` - Choose package manager (npm, pnpm, yarn)
*   `--help` - Show help information
*   `--version` - Show version number

[Examples](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#examples)

---------------------------------------------------------------------------------

### [Create a v0 clone](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#create-a-v0-clone)

    npx create-v0-sdk-app@latest my-v0-clone --template v0-clone
    cd my-v0-clone

Set up environment variables:

    cp .env.example .env
    # Edit .env with your API keys

Install dependencies and start:

    pnpm install
    pnpm db:migrate  # For v0-clone template
    pnpm dev

### [Create a classic v0 interface](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#create-a-classic-v0-interface)

    npx create-v0-sdk-app@latest my-classic-app --template classic-v0
    cd my-classic-app
    pnpm install
    pnpm dev

[Post-Creation Steps](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#post-creation-steps)

-------------------------------------------------------------------------------------------------------

After creating your app:

1.  **Set up environment variables**:
    
        cp .env.example .env
        # Add your V0_API_KEY
    
2.  **Install dependencies**:
    
        pnpm install
    
3.  **Database setup** (for v0-clone template):
    
        pnpm db:migrate
    
4.  **Start development server**:
    
        pnpm dev
    

[Template Structure](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#template-structure)

-----------------------------------------------------------------------------------------------------

Each template includes:

*   **Complete source code** - Ready-to-run application
*   **Documentation** - Setup and usage instructions
*   **Environment examples** - `.env.example` files
*   **Package configuration** - Optimized `package.json`
*   **TypeScript config** - Proper TypeScript setup

[Customization](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#customization)

-------------------------------------------------------------------------------------------

After creation, you can:

*   **Modify components** - All source code is yours to customize
*   **Add features** - Extend with additional v0 SDK capabilities
*   **Change styling** - Update themes and design systems
*   **Deploy** - Ready for deployment to Vercel, Netlify, etc.

[Requirements](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#requirements)

-----------------------------------------------------------------------------------------

*   Node.js 22+
*   pnpm 9+ (recommended)
*   v0 API key from [v0.dev](https://v0.dev/chat/settings/keys)
    

[Links](https://v0.app/docs/api/platform/packages/create-v0-sdk-app#links)

---------------------------------------------------------------------------

*   [GitHub Repository](https://github.com/vercel/v0-sdk/tree/main/packages/create-v0-sdk-app)
    
*   [npm Package](https://www.npmjs.com/package/create-v0-sdk-app)
    
*   [Template Examples](https://v0.app/docs/api/platform/examples)
    

[v0-sdk\
\
TypeScript SDK for the v0 Platform API](https://v0.app/docs/api/platform/packages/v0-sdk)
[@v0-sdk/react\
\
Headless React components for rendering v0 Platform API content](https://v0.app/docs/api/platform/packages/react)

---

# v0-sdk | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/Packages

v0-sdk
======

Copy page

TypeScript SDK for the v0 Platform API

The core TypeScript SDK for interacting with the v0 Platform API. Provides type-safe methods for creating chats, managing projects, handling deployments, and more.

[Installation](https://v0.app/docs/api/platform/packages/v0-sdk#installation)

------------------------------------------------------------------------------

    npm install v0-sdk
    # or
    pnpm add v0-sdk
    # or
    yarn add v0-sdk

[Quick Start](https://v0.app/docs/api/platform/packages/v0-sdk#quick-start)

----------------------------------------------------------------------------

    import { V0 } from 'v0-sdk'
    
    const v0 = new V0({
      apiKey: process.env.V0_API_KEY,
    })
    
    // Create a new chat
    const chat = await v0.chats.create({
      message: 'Create a todo app with React',
    })
    
    console.log(chat.id)

[Features](https://v0.app/docs/api/platform/packages/v0-sdk#features)

----------------------------------------------------------------------

*   **Type-safe API**: Full TypeScript support with comprehensive type definitions
*   **Complete Coverage**: Access all v0 Platform API endpoints
*   **Modern Architecture**: Built with modern JavaScript/TypeScript patterns
*   **Error Handling**: Comprehensive error handling and validation
*   **Streaming Support**: Real-time streaming for chat responses

[Core APIs](https://v0.app/docs/api/platform/packages/v0-sdk#core-apis)

------------------------------------------------------------------------

### [Chats](https://v0.app/docs/api/platform/packages/v0-sdk#chats)

    // Create a chat
    const chat = await v0.chats.create({
      message: 'Build a landing page',
    })
    
    // Send a message
    const response = await v0.chats.sendMessage(chat.id, {
      message: 'Add a contact form',
    })
    
    // Get chat history
    const chatData = await v0.chats.getById(chat.id)

### [Projects](https://v0.app/docs/api/platform/packages/v0-sdk#projects)

    // Create a project
    const project = await v0.projects.create({
      name: 'My App',
    })
    
    // Get project details
    const projectData = await v0.projects.getById(project.id)
    
    // List all projects
    const projects = await v0.projects.find()

### [Deployments](https://v0.app/docs/api/platform/packages/v0-sdk#deployments)

    // Create a deployment
    const deployment = await v0.deployments.create({
      projectId: project.id,
      chatId: chat.id,
      versionId: chat.latestVersion.id,
    })
    
    // Get deployment status
    const deploymentData = await v0.deployments.getById(deployment.id)
    
    // Get deployment logs
    const logs = await v0.deployments.findLogs(deployment.id)

### [User & Account](https://v0.app/docs/api/platform/packages/v0-sdk#user--account)

    // Get user information
    const user = await v0.user.get()
    
    // Get billing information
    const billing = await v0.user.getBilling()
    
    // Get current plan
    const plan = await v0.user.getPlan()

[Configuration](https://v0.app/docs/api/platform/packages/v0-sdk#configuration)

--------------------------------------------------------------------------------

### [Environment Variables](https://v0.app/docs/api/platform/packages/v0-sdk#environment-variables)

    V0_API_KEY=your_api_key_here
    V0_API_URL=https://api.v0.dev/v1  # Optional, defaults to production

### [Client Options](https://v0.app/docs/api/platform/packages/v0-sdk#client-options)

    const v0 = new V0({
      apiKey: 'your-api-key',
      baseURL: 'https://api.v0.dev/v1', // Optional
      timeout: 30000, // Optional, in milliseconds
      maxRetries: 3, // Optional
    })

[Error Handling](https://v0.app/docs/api/platform/packages/v0-sdk#error-handling)

----------------------------------------------------------------------------------

    import { V0Error } from 'v0-sdk'
    
    try {
      const chat = await v0.chats.create({
        message: 'Create an app',
      })
    } catch (error) {
      if (error instanceof V0Error) {
        console.error('API Error:', error.message)
        console.error('Status:', error.status)
        console.error('Code:', error.code)
      } else {
        console.error('Unexpected error:', error)
      }
    }

[Requirements](https://v0.app/docs/api/platform/packages/v0-sdk#requirements)

------------------------------------------------------------------------------

*   Node.js 22+
*   TypeScript 5.0+ (for TypeScript projects)

[Links](https://v0.app/docs/api/platform/packages/v0-sdk#links)

----------------------------------------------------------------

*   [GitHub Repository](https://github.com/vercel/v0-sdk)
    
*   [npm Package](https://www.npmjs.com/package/v0-sdk)
    
*   [API Reference](https://v0.app/docs/api/platform/reference)
    

[AI Tools\
\
Integrate v0 Platform API with AI SDK to build autonomous agents and intelligent workflows](https://v0.app/docs/api/platform/adapters/ai-tools)
[create-v0-sdk-app\
\
Create v0 SDK-powered apps with one command](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)

---

# Update Hook | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   [Find Hooks](https://v0.app/docs/api/platform/reference/hooks/find)
    
*   [Create Hook](https://v0.app/docs/api/platform/reference/hooks/create)
    
*   [Get Hook](https://v0.app/docs/api/platform/reference/hooks/get-by-id)
    
*   [Update Hook](https://v0.app/docs/api/platform/reference/hooks/update)
    
*   [Delete Hook](https://v0.app/docs/api/platform/reference/hooks/delete)
    

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Hooks

Update Hook
===========

Copy page

Updates the configuration of an existing webhook, including its name, event subscriptions, or target URL.

PATCH/v1/hooks/{hookId}

[Usage](https://v0.app/docs/api/platform/reference/hooks/update#usage)

-----------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.hooks.update({
      hookId: '123',
      name: 'My Updated Hook',
      events: ['chat.created', 'message.created'],
    })
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/hooks/update#api-signature)

---------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/hooks/update#request)

#### [Path Parameters](https://v0.app/docs/api/platform/reference/hooks/update#path-parameters)

hookId: string

The ID of the webhook to update. Provided as a path parameter.

#### [Body](https://v0.app/docs/api/platform/reference/hooks/update#body)

name?: string

A new name for the hook.

events?: 'chat.created' | 'chat.updated' | 'chat.deleted' | 'message.created' | 'message.updated' | 'message.deleted' | 'message.finished'\[\]

Updated list of event types to subscribe to.

url?: string

A new URL to send webhook payloads to.

### [Response](https://v0.app/docs/api/platform/reference/hooks/update#response)

id: string

A unique identifier for the webhook.

object: 'hook'

Fixed value identifying this object as a webhook.

name: string

A user-defined name to label the webhook.

events: 'chat.created' | 'chat.updated' | 'chat.deleted' | 'message.created' | 'message.updated' | 'message.deleted' | 'message.finished'\[\]

List of event types this webhook is subscribed to.

chatId?: string

Optional ID of the chat that this webhook is scoped to.

url: string

Target URL that receives event payloads for this webhook.

[Get Hook\
\
Retrieves the details of a specific webhook using its ID.](https://v0.app/docs/api/platform/reference/hooks/get-by-id)
[Delete Hook\
\
Deletes a webhook based on its ID. This action is irreversible.](https://v0.app/docs/api/platform/reference/hooks/delete)

---

# Assign Project to Chat | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   [Create Project](https://v0.app/docs/api/platform/reference/projects/create)
    
*   [Find Projects](https://v0.app/docs/api/platform/reference/projects/find)
    
*   [Get Project by ID](https://v0.app/docs/api/platform/reference/projects/get-by-id)
    
*   [Get Project by Chat ID](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)
    
*   [Update Project](https://v0.app/docs/api/platform/reference/projects/update)
    
*   [Assign Project to Chat](https://v0.app/docs/api/platform/reference/projects/assign)
    
*   [Create Environment Variables](https://v0.app/docs/api/platform/reference/projects/create-env-vars)
    
*   [Delete Project](https://v0.app/docs/api/platform/reference/projects/delete)
    
*   [Delete Environment Variables](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)
    
*   [Find Environment Variables](https://v0.app/docs/api/platform/reference/projects/find-env-vars)
    
*   [Get Environment Variable](https://v0.app/docs/api/platform/reference/projects/get-env-var)
    
*   [Update Environment Variables](https://v0.app/docs/api/platform/reference/projects/update-env-vars)
    

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Projects

Assign Project to Chat
======================

Copy page

Links an existing v0 project to a specific chat. Helps group conversations under a shared project context.

POST/v1/projects/{projectId}/assign

[Usage](https://v0.app/docs/api/platform/reference/projects/assign#usage)

--------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.projects.assign({
      projectId: '123',
      chatId: '123',
    })
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/projects/assign#api-signature)

------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/projects/assign#request)

#### [Path Parameters](https://v0.app/docs/api/platform/reference/projects/assign#path-parameters)

projectId: string

The ID of the project to assign.

#### [Body](https://v0.app/docs/api/platform/reference/projects/assign#body)

chatId: string

The ID of the chat to assign the project to.

### [Response](https://v0.app/docs/api/platform/reference/projects/assign#response)

object: 'project'

id: string

assigned: 'true'

[Update Project\
\
Updates the metadata of an existing project using its \`projectId\`. Supports changes to the project name and privacy setting.](https://v0.app/docs/api/platform/reference/projects/update)
[Create Environment Variables\
\
Creates new environment variables for a given project. This endpoint will fail if any of the specified environment variable keys already exist, unless upsert is set to true.](https://v0.app/docs/api/platform/reference/projects/create-env-vars)

---

# Delete Project | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   [Create Project](https://v0.app/docs/api/platform/reference/projects/create)
    
*   [Find Projects](https://v0.app/docs/api/platform/reference/projects/find)
    
*   [Get Project by ID](https://v0.app/docs/api/platform/reference/projects/get-by-id)
    
*   [Get Project by Chat ID](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)
    
*   [Update Project](https://v0.app/docs/api/platform/reference/projects/update)
    
*   [Assign Project to Chat](https://v0.app/docs/api/platform/reference/projects/assign)
    
*   [Create Environment Variables](https://v0.app/docs/api/platform/reference/projects/create-env-vars)
    
*   [Delete Project](https://v0.app/docs/api/platform/reference/projects/delete)
    
*   [Delete Environment Variables](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)
    
*   [Find Environment Variables](https://v0.app/docs/api/platform/reference/projects/find-env-vars)
    
*   [Get Environment Variable](https://v0.app/docs/api/platform/reference/projects/get-env-var)
    
*   [Update Environment Variables](https://v0.app/docs/api/platform/reference/projects/update-env-vars)
    

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Projects

Delete Project
==============

Copy page

Deletes a specific project based on the provided projectId. This operation marks the project as deleted and is irreversible.

DELETE/v1/projects/{projectId}

[Usage](https://v0.app/docs/api/platform/reference/projects/delete#usage)

--------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.projects.delete({
      projectId: 'abcd1234',
    })
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/projects/delete#api-signature)

------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/projects/delete#request)

#### [Path Parameters](https://v0.app/docs/api/platform/reference/projects/delete#path-parameters)

projectId: string

The unique identifier of the project to delete. This must be passed as a path parameter in the URL.

### [Response](https://v0.app/docs/api/platform/reference/projects/delete#response)

id: string

The unique identifier of the deleted project.

object: 'project'

Fixed value identifying this object as a project.

deleted: 'true'

Confirmation that the project has been deleted.

[Create Environment Variables\
\
Creates new environment variables for a given project. This endpoint will fail if any of the specified environment variable keys already exist, unless upsert is set to true.](https://v0.app/docs/api/platform/reference/projects/create-env-vars)
[Delete Environment Variables\
\
Deletes multiple environment variables for a given project by their IDs.](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)

---

# Delete Environment Variables | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   [Create Project](https://v0.app/docs/api/platform/reference/projects/create)
    
*   [Find Projects](https://v0.app/docs/api/platform/reference/projects/find)
    
*   [Get Project by ID](https://v0.app/docs/api/platform/reference/projects/get-by-id)
    
*   [Get Project by Chat ID](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)
    
*   [Update Project](https://v0.app/docs/api/platform/reference/projects/update)
    
*   [Assign Project to Chat](https://v0.app/docs/api/platform/reference/projects/assign)
    
*   [Create Environment Variables](https://v0.app/docs/api/platform/reference/projects/create-env-vars)
    
*   [Delete Project](https://v0.app/docs/api/platform/reference/projects/delete)
    
*   [Delete Environment Variables](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)
    
*   [Find Environment Variables](https://v0.app/docs/api/platform/reference/projects/find-env-vars)
    
*   [Get Environment Variable](https://v0.app/docs/api/platform/reference/projects/get-env-var)
    
*   [Update Environment Variables](https://v0.app/docs/api/platform/reference/projects/update-env-vars)
    

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Projects

Delete Environment Variables
============================

Copy page

Deletes multiple environment variables for a given project by their IDs.

POST/v1/projects/{projectId}/env-vars/delete

[Usage](https://v0.app/docs/api/platform/reference/projects/delete-env-vars#usage)

-----------------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.projects.deleteEnvVars({
      projectId: 'project_abc123',
      environmentVariableIds: ['env_def456', 'env_ghi789'],
    })
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/projects/delete-env-vars#api-signature)

---------------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/projects/delete-env-vars#request)

#### [Path Parameters](https://v0.app/docs/api/platform/reference/projects/delete-env-vars#path-parameters)

projectId: string

The unique identifier of the project whose environment variables should be deleted.

#### [Body](https://v0.app/docs/api/platform/reference/projects/delete-env-vars#body)

environmentVariableIds: string\[\]

An array of environment variable IDs to delete.

### [Response](https://v0.app/docs/api/platform/reference/projects/delete-env-vars#response)

object: 'list'

data: object\[\]

id: string

object: 'environment\_variable'

deleted: 'true'

[Delete Project\
\
Deletes a specific project based on the provided projectId. This operation marks the project as deleted and is irreversible.](https://v0.app/docs/api/platform/reference/projects/delete)
[Find Environment Variables\
\
Retrieves all environment variables for a given project.](https://v0.app/docs/api/platform/reference/projects/find-env-vars)

---

# Create Environment Variables | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   [Create Project](https://v0.app/docs/api/platform/reference/projects/create)
    
*   [Find Projects](https://v0.app/docs/api/platform/reference/projects/find)
    
*   [Get Project by ID](https://v0.app/docs/api/platform/reference/projects/get-by-id)
    
*   [Get Project by Chat ID](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)
    
*   [Update Project](https://v0.app/docs/api/platform/reference/projects/update)
    
*   [Assign Project to Chat](https://v0.app/docs/api/platform/reference/projects/assign)
    
*   [Create Environment Variables](https://v0.app/docs/api/platform/reference/projects/create-env-vars)
    
*   [Delete Project](https://v0.app/docs/api/platform/reference/projects/delete)
    
*   [Delete Environment Variables](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)
    
*   [Find Environment Variables](https://v0.app/docs/api/platform/reference/projects/find-env-vars)
    
*   [Get Environment Variable](https://v0.app/docs/api/platform/reference/projects/get-env-var)
    
*   [Update Environment Variables](https://v0.app/docs/api/platform/reference/projects/update-env-vars)
    

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Projects

Create Environment Variables
============================

Copy page

Creates new environment variables for a given project. This endpoint will fail if any of the specified environment variable keys already exist, unless upsert is set to true.

POST/v1/projects/{projectId}/env-vars

[Usage](https://v0.app/docs/api/platform/reference/projects/create-env-vars#usage)

-----------------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    // Create new environment variables (will fail if keys already exist)
    const result = await v0.projects.createEnvVars({
      projectId: 'project_abc123',
      environmentVariables: [\
        {\
          key: 'DATABASE_URL',\
          value: 'postgresql://user:pass@host:5432/db',\
        },\
        {\
          key: 'API_SECRET_KEY',\
          value: 'sk_1234567890abcdef',\
        },\
      ],
    })
    
    console.log(result)
    
    // Upsert environment variables (will overwrite existing values)
    const upsertResult = await v0.projects.createEnvVars({
      projectId: 'project_abc123',
      upsert: true,
      environmentVariables: [\
        {\
          key: 'DATABASE_URL',\
          value: 'postgresql://newuser:newpass@newhost:5432/newdb',\
        },\
      ],
    })
    
    console.log(upsertResult)

[API Signature](https://v0.app/docs/api/platform/reference/projects/create-env-vars#api-signature)

---------------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/projects/create-env-vars#request)

#### [Path Parameters](https://v0.app/docs/api/platform/reference/projects/create-env-vars#path-parameters)

projectId: string

The unique identifier of the project where environment variables should be created.

#### [Query Parameters](https://v0.app/docs/api/platform/reference/projects/create-env-vars#query-parameters)

decrypted?: 'true' | 'false'

Whether to return decrypted values. Defaults to false (encrypted).

#### [Body](https://v0.app/docs/api/platform/reference/projects/create-env-vars#body)

environmentVariables: object\[\]

An array of environment variables to create with key and value fields.

key: string

The name of the environment variable.

value: string

The value of the environment variable.

upsert?: boolean

Whether to overwrite existing environment variables with the same keys. Defaults to false.

### [Response](https://v0.app/docs/api/platform/reference/projects/create-env-vars#response)

object: 'list'

data: object\[\]

id?: string

A unique identifier for the environment variable.

object?: 'environment\_variable'

The object type.

key?: string

The name of the environment variable.

value?: string

The value of the environment variable.

decrypted?: boolean

Whether the value is decrypted or encrypted.

createdAt?: number

The timestamp when the environment variable was created.

updatedAt?: number

The timestamp when the environment variable was last updated.

[Assign Project to Chat\
\
Links an existing v0 project to a specific chat. Helps group conversations under a shared project context.](https://v0.app/docs/api/platform/reference/projects/assign)
[Delete Project\
\
Deletes a specific project based on the provided projectId. This operation marks the project as deleted and is irreversible.](https://v0.app/docs/api/platform/reference/projects/delete)

---

# Find Projects | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   [Create Project](https://v0.app/docs/api/platform/reference/projects/create)
    
*   [Find Projects](https://v0.app/docs/api/platform/reference/projects/find)
    
*   [Get Project by ID](https://v0.app/docs/api/platform/reference/projects/get-by-id)
    
*   [Get Project by Chat ID](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)
    
*   [Update Project](https://v0.app/docs/api/platform/reference/projects/update)
    
*   [Assign Project to Chat](https://v0.app/docs/api/platform/reference/projects/assign)
    
*   [Create Environment Variables](https://v0.app/docs/api/platform/reference/projects/create-env-vars)
    
*   [Delete Project](https://v0.app/docs/api/platform/reference/projects/delete)
    
*   [Delete Environment Variables](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)
    
*   [Find Environment Variables](https://v0.app/docs/api/platform/reference/projects/find-env-vars)
    
*   [Get Environment Variable](https://v0.app/docs/api/platform/reference/projects/get-env-var)
    
*   [Update Environment Variables](https://v0.app/docs/api/platform/reference/projects/update-env-vars)
    

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Projects

Find Projects
=============

Copy page

Returns a list of all v0 projects in your workspace. Useful for browsing or managing projects across different chats or use cases.

GET/v1/projects

[Usage](https://v0.app/docs/api/platform/reference/projects/find#usage)

------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.projects.find()
    
    console.log(result)

### [Response](https://v0.app/docs/api/platform/reference/projects/find#response)

object: 'list'

data: object\[\]

id?: string

A unique identifier for the project.

object?: 'project'

Fixed value identifying this object as a project.

name?: string

The name of the project as defined by the user.

privacy?: 'private' | 'team'

The privacy setting for the project - either private or team.

vercelProjectId?: string

Optional ID of the linked Vercel project, if connected.

createdAt?: string

The ISO timestamp representing when the project was created.

updatedAt?: string

The ISO timestamp of the most recent update, if available.

apiUrl?: string

The API endpoint URL for accessing this project programmatically.

webUrl?: string

The web URL where the project can be viewed or managed.

[Create Project\
\
Creates a new v0 project with an optional description, icon, environment variables, and instructions. Projects help organize chats and manage context.](https://v0.app/docs/api/platform/reference/projects/create)
[Get Project by ID\
\
Retrieves the details of a specific v0 project by its ID.](https://v0.app/docs/api/platform/reference/projects/get-by-id)

---

# Find Environment Variables | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   [Create Project](https://v0.app/docs/api/platform/reference/projects/create)
    
*   [Find Projects](https://v0.app/docs/api/platform/reference/projects/find)
    
*   [Get Project by ID](https://v0.app/docs/api/platform/reference/projects/get-by-id)
    
*   [Get Project by Chat ID](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)
    
*   [Update Project](https://v0.app/docs/api/platform/reference/projects/update)
    
*   [Assign Project to Chat](https://v0.app/docs/api/platform/reference/projects/assign)
    
*   [Create Environment Variables](https://v0.app/docs/api/platform/reference/projects/create-env-vars)
    
*   [Delete Project](https://v0.app/docs/api/platform/reference/projects/delete)
    
*   [Delete Environment Variables](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)
    
*   [Find Environment Variables](https://v0.app/docs/api/platform/reference/projects/find-env-vars)
    
*   [Get Environment Variable](https://v0.app/docs/api/platform/reference/projects/get-env-var)
    
*   [Update Environment Variables](https://v0.app/docs/api/platform/reference/projects/update-env-vars)
    

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Projects

Find Environment Variables
==========================

Copy page

Retrieves all environment variables for a given project.

GET/v1/projects/{projectId}/env-vars

[Usage](https://v0.app/docs/api/platform/reference/projects/find-env-vars#usage)

---------------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.projects.findEnvVars({
      projectId: 'project_abc123',
      decrypted: 'false',
    })
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/projects/find-env-vars#api-signature)

-------------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/projects/find-env-vars#request)

#### [Path Parameters](https://v0.app/docs/api/platform/reference/projects/find-env-vars#path-parameters)

projectId: string

The unique identifier of the project whose environment variables should be retrieved.

#### [Query Parameters](https://v0.app/docs/api/platform/reference/projects/find-env-vars#query-parameters)

decrypted?: 'true' | 'false'

Whether to return decrypted values. Defaults to false (encrypted).

### [Response](https://v0.app/docs/api/platform/reference/projects/find-env-vars#response)

object: 'list'

data: object\[\]

id?: string

A unique identifier for the environment variable.

object?: 'environment\_variable'

The object type.

key?: string

The name of the environment variable.

value?: string

The value of the environment variable.

decrypted?: boolean

Whether the value is decrypted or encrypted.

createdAt?: number

The timestamp when the environment variable was created.

updatedAt?: number

The timestamp when the environment variable was last updated.

[Delete Environment Variables\
\
Deletes multiple environment variables for a given project by their IDs.](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)
[Get Environment Variable\
\
Retrieves a specific environment variable for a given project by its ID, including its value.](https://v0.app/docs/api/platform/reference/projects/get-env-var)

---

# Get Plan | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   [Get User](https://v0.app/docs/api/platform/reference/user/get)
    
*   [Get Billing](https://v0.app/docs/api/platform/reference/user/get-billing)
    
*   [Get Plan](https://v0.app/docs/api/platform/reference/user/get-plan)
    
*   [Get User Scopes](https://v0.app/docs/api/platform/reference/user/get-scopes)
    

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/User

Get Plan
========

Copy page

Returns the current subscription plan for the authenticated user, including tier details and feature limits.

GET/v1/user/plan

[Usage](https://v0.app/docs/api/platform/reference/user/get-plan#usage)

------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.user.getPlan()
    
    console.log(result)

### [Response](https://v0.app/docs/api/platform/reference/user/get-plan#response)

object: 'plan'

plan: string

billingCycle: object

start: number

end: number

balance: object

remaining: number

total: number

[Get Billing\
\
Fetches billing usage and quota information for the authenticated user. Can be scoped to a specific context (e.g. project or namespace).](https://v0.app/docs/api/platform/reference/user/get-billing)
[Get User Scopes\
\
Retrieves all accessible scopes for the authenticated user, such as personal workspaces or shared teams.](https://v0.app/docs/api/platform/reference/user/get-scopes)

---

# Get Billing | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   [Get User](https://v0.app/docs/api/platform/reference/user/get)
    
*   [Get Billing](https://v0.app/docs/api/platform/reference/user/get-billing)
    
*   [Get Plan](https://v0.app/docs/api/platform/reference/user/get-plan)
    
*   [Get User Scopes](https://v0.app/docs/api/platform/reference/user/get-scopes)
    

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/User

Get Billing
===========

Copy page

Fetches billing usage and quota information for the authenticated user. Can be scoped to a specific context (e.g. project or namespace).

GET/v1/user/billing

[Usage](https://v0.app/docs/api/platform/reference/user/get-billing#usage)

---------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.user.getBilling()
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/user/get-billing#api-signature)

-------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/user/get-billing#request)

#### [Query Parameters](https://v0.app/docs/api/platform/reference/user/get-billing#query-parameters)

scope?: string

Filters billing data by a specific scope, such as a project ID or slug.

### [Response](https://v0.app/docs/api/platform/reference/user/get-billing#response)

billingType?: 'legacy'

data?: object

remaining?: number

reset?: number

limit: number

[Get User\
\
Retrieves information about the authenticated user, including their ID, name, email, and account metadata.](https://v0.app/docs/api/platform/reference/user/get)
[Get Plan\
\
Returns the current subscription plan for the authenticated user, including tier details and feature limits.](https://v0.app/docs/api/platform/reference/user/get-plan)

---

# Find Rate Limit | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   [Find Rate Limit](https://v0.app/docs/api/platform/reference/rate-limits/find)
    

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Rate limits

Find Rate Limit
===============

Copy page

Retrieves rate limit information for a given scope. Useful for monitoring usage limits and avoiding throttling.

GET/v1/rate-limits

[Usage](https://v0.app/docs/api/platform/reference/rate-limits/find#usage)

---------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.rateLimits.find()
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/rate-limits/find#api-signature)

-------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/rate-limits/find#request)

#### [Query Parameters](https://v0.app/docs/api/platform/reference/rate-limits/find#query-parameters)

scope?: string

The context or namespace to check rate limits for (e.g., a project slug or feature area).

### [Response](https://v0.app/docs/api/platform/reference/rate-limits/find#response)

remaining?: number

reset?: number

limit: number

[Delete Hook\
\
Deletes a webhook based on its ID. This action is irreversible.](https://v0.app/docs/api/platform/reference/hooks/delete)
[Get User\
\
Retrieves information about the authenticated user, including their ID, name, email, and account metadata.](https://v0.app/docs/api/platform/reference/user/get)

---

# Get Usage Report | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Reports

Get Usage Report
================

Copy page

Retrieves detailed usage events for the authenticated user or team, including costs, event types, models used, and metadata. Shows the same data as displayed in the usage dashboard. Can be filtered by chatId to show usage for a specific chat, or by userId to show usage for a specific user.

GET/v1/reports/usage

[Usage](https://v0.app/docs/api/platform/reference/reports/get-usage#usage)

----------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.reports.getUsage()
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/reports/get-usage#api-signature)

--------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/reports/get-usage#request)

#### [Query Parameters](https://v0.app/docs/api/platform/reference/reports/get-usage#query-parameters)

startDate?: string

Query parameter "startDate"

endDate?: string

Query parameter "endDate"

chatId?: string

Query parameter "chatId"

messageId?: string

Query parameter "messageId"

userId?: string

Query parameter "userId"

limit?: number

Query parameter "limit"

cursor?: string

Base64 encoded cursor containing pagination data

### [Response](https://v0.app/docs/api/platform/reference/reports/get-usage#response)

object: 'list'

data: object\[\]

id: string

object: 'usage\_event'

type?: 'image\_generation' | 'message' | 'manual\_debit' | 'api\_request' | 'inline-edit' | 'buy-template' | 'reverse\_template\_sale' | 'refund\_template\_purchase'

promptCost?: string

completionCost?: string

totalCost: string

chatId?: string

messageId?: string

userId?: string

Deprecated - use user object instead

user?: object

createdAt: string

The ISO timestamp representing when the usage event was created.

pagination: object

hasMore: boolean

nextCursor?: string

nextUrl?: string

meta: object

totalCount: number

[Get User Scopes\
\
Retrieves all accessible scopes for the authenticated user, such as personal workspaces or shared teams.](https://v0.app/docs/api/platform/reference/user/get-scopes)

---

# Create Project | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   [Create Project](https://v0.app/docs/api/platform/reference/projects/create)
    
*   [Find Projects](https://v0.app/docs/api/platform/reference/projects/find)
    
*   [Get Project by ID](https://v0.app/docs/api/platform/reference/projects/get-by-id)
    
*   [Get Project by Chat ID](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)
    
*   [Update Project](https://v0.app/docs/api/platform/reference/projects/update)
    
*   [Assign Project to Chat](https://v0.app/docs/api/platform/reference/projects/assign)
    
*   [Create Environment Variables](https://v0.app/docs/api/platform/reference/projects/create-env-vars)
    
*   [Delete Project](https://v0.app/docs/api/platform/reference/projects/delete)
    
*   [Delete Environment Variables](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)
    
*   [Find Environment Variables](https://v0.app/docs/api/platform/reference/projects/find-env-vars)
    
*   [Get Environment Variable](https://v0.app/docs/api/platform/reference/projects/get-env-var)
    
*   [Update Environment Variables](https://v0.app/docs/api/platform/reference/projects/update-env-vars)
    

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Projects

Create Project
==============

Copy page

Creates a new v0 project with an optional description, icon, environment variables, and instructions. Projects help organize chats and manage context.

POST/v1/projects

[Usage](https://v0.app/docs/api/platform/reference/projects/create#usage)

--------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.projects.create({
      name: 'My Project',
    })
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/projects/create#api-signature)

------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/projects/create#request)

#### [Body](https://v0.app/docs/api/platform/reference/projects/create#body)

name: string

The name of the project.

description?: string

A brief summary of the project’s purpose.

icon?: string

An icon identifier to visually represent the project.

environmentVariables?: object\[\]

A list of key-value pairs used to define runtime variables for the project.

key: string

value: string

instructions?: string

Guidance or goals that provide context for the model when working within the project.

vercelProjectId?: string

The ID of an existing Vercel project to link to. If not provided, a new Vercel project will be created.

privacy?: 'private' | 'team'

The privacy setting for the project. For user accounts, this is always "private". For team/enterprise accounts, this can be either "private" or "team".

### [Response](https://v0.app/docs/api/platform/reference/projects/create#response)

id: string

A unique identifier for the project.

object: 'project'

Fixed value identifying this object as a project.

name: string

The name of the project as defined by the user.

privacy: 'private' | 'team'

The privacy setting for the project - either private or team.

vercelProjectId?: string

Optional ID of the linked Vercel project, if connected.

createdAt: string

The ISO timestamp representing when the project was created.

updatedAt?: string

The ISO timestamp of the most recent update, if available.

apiUrl: string

The API endpoint URL for accessing this project programmatically.

webUrl: string

The web URL where the project can be viewed or managed.

description?: string

The description of the project.

instructions?: string

The instructions for the project.

chats: object\[\]

List of all chats that are associated with this project.

id: string

A unique identifier for the chat.

object: 'chat'

Fixed value identifying this object as a chat.

shareable: boolean

Indicates whether the chat can be shared via public link.

privacy: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted'

Defines the visibility of the chat—private, team-only, or public.

name?: string

An optional name assigned to the chat by the user.

title?: string

deprecated

Deprecated title field preserved for backward compatibility.

createdAt: string

The ISO timestamp representing when the chat was created.

updatedAt?: string

The ISO timestamp of the last update to the chat.

favorite: boolean

Indicates whether the chat is marked as a favorite.

authorId: string

The ID of the user who created the chat.

projectId?: string

Optional ID of the v0 project associated with this chat.

webUrl: string

Web URL to view this chat in the browser.

apiUrl: string

API URL to access this chat via the API.

latestVersion?: object

The most recent generated version of the chat, if available.

id: string

A unique identifier for the version.

object: 'version'

Fixed value identifying this object as a version.

status: 'pending' | 'completed' | 'failed'

The current status of the version generation process.

demoUrl?: string

Optional URL for previewing the generated output.

screenshotUrl?: string

URL to retrieve a screenshot of this version.

createdAt: string

The date and time when the version was created, in ISO 8601 format.

updatedAt?: string

The date and time when the version was last updated, in ISO 8601 format.

[@v0-sdk/ai-tools\
\
AI SDK tools for the v0 Platform API](https://v0.app/docs/api/platform/packages/ai-tools)
[Find Projects\
\
Returns a list of all v0 projects in your workspace. Useful for browsing or managing projects across different chats or use cases.](https://v0.app/docs/api/platform/reference/projects/find)

---

# Get User | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   [Get User](https://v0.app/docs/api/platform/reference/user/get)
    
*   [Get Billing](https://v0.app/docs/api/platform/reference/user/get-billing)
    
*   [Get Plan](https://v0.app/docs/api/platform/reference/user/get-plan)
    
*   [Get User Scopes](https://v0.app/docs/api/platform/reference/user/get-scopes)
    

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/User

Get User
========

Copy page

Retrieves information about the authenticated user, including their ID, name, email, and account metadata.

GET/v1/user

[Usage](https://v0.app/docs/api/platform/reference/user/get#usage)

-------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.user.get()
    
    console.log(result)

### [Response](https://v0.app/docs/api/platform/reference/user/get#response)

id: string

A unique identifier for the user.

object: 'user'

Fixed value identifying this object as a user.

name?: string

Optional full name of the user.

email: string

The user's email address.

avatar: string

URL to the user's avatar image.

createdAt: string

The ISO timestamp representing when the user was created.

updatedAt?: string

The ISO timestamp of the last update to the user.

[Find Rate Limit\
\
Retrieves rate limit information for a given scope. Useful for monitoring usage limits and avoiding throttling.](https://v0.app/docs/api/platform/reference/rate-limits/find)
[Get Billing\
\
Fetches billing usage and quota information for the authenticated user. Can be scoped to a specific context (e.g. project or namespace).](https://v0.app/docs/api/platform/reference/user/get-billing)

---

# Get Project by ID | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   [Create Project](https://v0.app/docs/api/platform/reference/projects/create)
    
*   [Find Projects](https://v0.app/docs/api/platform/reference/projects/find)
    
*   [Get Project by ID](https://v0.app/docs/api/platform/reference/projects/get-by-id)
    
*   [Get Project by Chat ID](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)
    
*   [Update Project](https://v0.app/docs/api/platform/reference/projects/update)
    
*   [Assign Project to Chat](https://v0.app/docs/api/platform/reference/projects/assign)
    
*   [Create Environment Variables](https://v0.app/docs/api/platform/reference/projects/create-env-vars)
    
*   [Delete Project](https://v0.app/docs/api/platform/reference/projects/delete)
    
*   [Delete Environment Variables](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)
    
*   [Find Environment Variables](https://v0.app/docs/api/platform/reference/projects/find-env-vars)
    
*   [Get Environment Variable](https://v0.app/docs/api/platform/reference/projects/get-env-var)
    
*   [Update Environment Variables](https://v0.app/docs/api/platform/reference/projects/update-env-vars)
    

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Projects

Get Project by ID
=================

Copy page

Retrieves the details of a specific v0 project by its ID.

GET/v1/projects/{projectId}

[Usage](https://v0.app/docs/api/platform/reference/projects/get-by-id#usage)

-----------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.projects.getById({
      projectId: '123',
    })
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/projects/get-by-id#api-signature)

---------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/projects/get-by-id#request)

#### [Path Parameters](https://v0.app/docs/api/platform/reference/projects/get-by-id#path-parameters)

projectId: string

The unique identifier of the project to retrieve.

### [Response](https://v0.app/docs/api/platform/reference/projects/get-by-id#response)

id: string

A unique identifier for the project.

object: 'project'

Fixed value identifying this object as a project.

name: string

The name of the project as defined by the user.

privacy: 'private' | 'team'

The privacy setting for the project - either private or team.

vercelProjectId?: string

Optional ID of the linked Vercel project, if connected.

createdAt: string

The ISO timestamp representing when the project was created.

updatedAt?: string

The ISO timestamp of the most recent update, if available.

apiUrl: string

The API endpoint URL for accessing this project programmatically.

webUrl: string

The web URL where the project can be viewed or managed.

description?: string

The description of the project.

instructions?: string

The instructions for the project.

chats: object\[\]

List of all chats that are associated with this project.

id: string

A unique identifier for the chat.

object: 'chat'

Fixed value identifying this object as a chat.

shareable: boolean

Indicates whether the chat can be shared via public link.

privacy: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted'

Defines the visibility of the chat—private, team-only, or public.

name?: string

An optional name assigned to the chat by the user.

title?: string

deprecated

Deprecated title field preserved for backward compatibility.

createdAt: string

The ISO timestamp representing when the chat was created.

updatedAt?: string

The ISO timestamp of the last update to the chat.

favorite: boolean

Indicates whether the chat is marked as a favorite.

authorId: string

The ID of the user who created the chat.

projectId?: string

Optional ID of the v0 project associated with this chat.

webUrl: string

Web URL to view this chat in the browser.

apiUrl: string

API URL to access this chat via the API.

latestVersion?: object

The most recent generated version of the chat, if available.

id: string

A unique identifier for the version.

object: 'version'

Fixed value identifying this object as a version.

status: 'pending' | 'completed' | 'failed'

The current status of the version generation process.

demoUrl?: string

Optional URL for previewing the generated output.

screenshotUrl?: string

URL to retrieve a screenshot of this version.

createdAt: string

The date and time when the version was created, in ISO 8601 format.

updatedAt?: string

The date and time when the version was last updated, in ISO 8601 format.

[Find Projects\
\
Returns a list of all v0 projects in your workspace. Useful for browsing or managing projects across different chats or use cases.](https://v0.app/docs/api/platform/reference/projects/find)
[Get Project by Chat ID\
\
Retrieves the v0 project associated with a given chat. Useful for determining the context or scope of a chat session.](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)

---

# Update Environment Variables | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   [Create Project](https://v0.app/docs/api/platform/reference/projects/create)
    
*   [Find Projects](https://v0.app/docs/api/platform/reference/projects/find)
    
*   [Get Project by ID](https://v0.app/docs/api/platform/reference/projects/get-by-id)
    
*   [Get Project by Chat ID](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)
    
*   [Update Project](https://v0.app/docs/api/platform/reference/projects/update)
    
*   [Assign Project to Chat](https://v0.app/docs/api/platform/reference/projects/assign)
    
*   [Create Environment Variables](https://v0.app/docs/api/platform/reference/projects/create-env-vars)
    
*   [Delete Project](https://v0.app/docs/api/platform/reference/projects/delete)
    
*   [Delete Environment Variables](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)
    
*   [Find Environment Variables](https://v0.app/docs/api/platform/reference/projects/find-env-vars)
    
*   [Get Environment Variable](https://v0.app/docs/api/platform/reference/projects/get-env-var)
    
*   [Update Environment Variables](https://v0.app/docs/api/platform/reference/projects/update-env-vars)
    

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Projects

Update Environment Variables
============================

Copy page

Updates multiple environment variables for a given project. Only the value of each environment variable can be updated.

PATCH/v1/projects/{projectId}/env-vars

[Usage](https://v0.app/docs/api/platform/reference/projects/update-env-vars#usage)

-----------------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.projects.updateEnvVars({
      projectId: 'project_abc123',
      environmentVariables: [\
        {\
          id: 'env_def456',\
          value: 'new_value_123',\
        },\
        {\
          id: 'env_ghi789',\
          value: 'updated_secret_key',\
        },\
      ],
    })
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/projects/update-env-vars#api-signature)

---------------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/projects/update-env-vars#request)

#### [Path Parameters](https://v0.app/docs/api/platform/reference/projects/update-env-vars#path-parameters)

projectId: string

The unique identifier of the project whose environment variables should be updated.

#### [Query Parameters](https://v0.app/docs/api/platform/reference/projects/update-env-vars#query-parameters)

decrypted?: 'true' | 'false'

Whether to return decrypted values. Defaults to false (encrypted).

#### [Body](https://v0.app/docs/api/platform/reference/projects/update-env-vars#body)

environmentVariables: object\[\]

An array of environment variables to update with id and value fields.

id: string

The unique identifier of the environment variable to update.

value: string

The new value of the environment variable.

### [Response](https://v0.app/docs/api/platform/reference/projects/update-env-vars#response)

object: 'list'

data: object\[\]

id?: string

A unique identifier for the environment variable.

object?: 'environment\_variable'

The object type.

key?: string

The name of the environment variable.

value?: string

The value of the environment variable.

decrypted?: boolean

Whether the value is decrypted or encrypted.

createdAt?: number

The timestamp when the environment variable was created.

updatedAt?: number

The timestamp when the environment variable was last updated.

[Get Environment Variable\
\
Retrieves a specific environment variable for a given project by its ID, including its value.](https://v0.app/docs/api/platform/reference/projects/get-env-var)
[Create Chat\
\
Creates a new chat using a user message, optional system context, and model configuration. Useful for prompting the model within the scope of a specific project.](https://v0.app/docs/api/platform/reference/chats/create)

---

# Get User Scopes | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   [Get User](https://v0.app/docs/api/platform/reference/user/get)
    
*   [Get Billing](https://v0.app/docs/api/platform/reference/user/get-billing)
    
*   [Get Plan](https://v0.app/docs/api/platform/reference/user/get-plan)
    
*   [Get User Scopes](https://v0.app/docs/api/platform/reference/user/get-scopes)
    

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/User

Get User Scopes
===============

Copy page

Retrieves all accessible scopes for the authenticated user, such as personal workspaces or shared teams.

GET/v1/user/scopes

[Usage](https://v0.app/docs/api/platform/reference/user/get-scopes#usage)

--------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.user.getScopes()
    
    console.log(result)

### [Response](https://v0.app/docs/api/platform/reference/user/get-scopes#response)

object: 'list'

data: object\[\]

id?: string

A unique identifier for the scope (e.g., user or team workspace).

object?: 'scope'

Fixed value identifying this object as a scope.

name?: string

An optional human-readable name for the scope.

[Get Plan\
\
Returns the current subscription plan for the authenticated user, including tier details and feature limits.](https://v0.app/docs/api/platform/reference/user/get-plan)
[Get Usage Report\
\
Retrieves detailed usage events for the authenticated user or team, including costs, event types, models used, and metadata. Shows the same data as displayed in the usage dashboard. Can be filtered by chatId to show usage for a specific chat, or by userId to show usage for a specific user.](https://v0.app/docs/api/platform/reference/reports/get-usage)

---

# Get Project by Chat ID | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   [Create Project](https://v0.app/docs/api/platform/reference/projects/create)
    
*   [Find Projects](https://v0.app/docs/api/platform/reference/projects/find)
    
*   [Get Project by ID](https://v0.app/docs/api/platform/reference/projects/get-by-id)
    
*   [Get Project by Chat ID](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)
    
*   [Update Project](https://v0.app/docs/api/platform/reference/projects/update)
    
*   [Assign Project to Chat](https://v0.app/docs/api/platform/reference/projects/assign)
    
*   [Create Environment Variables](https://v0.app/docs/api/platform/reference/projects/create-env-vars)
    
*   [Delete Project](https://v0.app/docs/api/platform/reference/projects/delete)
    
*   [Delete Environment Variables](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)
    
*   [Find Environment Variables](https://v0.app/docs/api/platform/reference/projects/find-env-vars)
    
*   [Get Environment Variable](https://v0.app/docs/api/platform/reference/projects/get-env-var)
    
*   [Update Environment Variables](https://v0.app/docs/api/platform/reference/projects/update-env-vars)
    

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Projects

Get Project by Chat ID
======================

Copy page

Retrieves the v0 project associated with a given chat. Useful for determining the context or scope of a chat session.

GET/v1/chats/{chatId}/project

[Usage](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id#usage)

----------------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.projects.getByChatId({
      chatId: '123',
    })
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id#api-signature)

--------------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id#request)

#### [Path Parameters](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id#path-parameters)

chatId: string

The ID of the chat to retrieve the associated project for.

### [Response](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id#response)

id: string

A unique identifier for the project.

object: 'project'

Fixed value identifying this object as a project.

name: string

The name of the project as defined by the user.

privacy: 'private' | 'team'

The privacy setting for the project - either private or team.

vercelProjectId?: string

Optional ID of the linked Vercel project, if connected.

createdAt: string

The ISO timestamp representing when the project was created.

updatedAt?: string

The ISO timestamp of the most recent update, if available.

apiUrl: string

The API endpoint URL for accessing this project programmatically.

webUrl: string

The web URL where the project can be viewed or managed.

description?: string

The description of the project.

instructions?: string

The instructions for the project.

chats: object\[\]

List of all chats that are associated with this project.

id: string

A unique identifier for the chat.

object: 'chat'

Fixed value identifying this object as a chat.

shareable: boolean

Indicates whether the chat can be shared via public link.

privacy: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted'

Defines the visibility of the chat—private, team-only, or public.

name?: string

An optional name assigned to the chat by the user.

title?: string

deprecated

Deprecated title field preserved for backward compatibility.

createdAt: string

The ISO timestamp representing when the chat was created.

updatedAt?: string

The ISO timestamp of the last update to the chat.

favorite: boolean

Indicates whether the chat is marked as a favorite.

authorId: string

The ID of the user who created the chat.

projectId?: string

Optional ID of the v0 project associated with this chat.

webUrl: string

Web URL to view this chat in the browser.

apiUrl: string

API URL to access this chat via the API.

latestVersion?: object

The most recent generated version of the chat, if available.

id: string

A unique identifier for the version.

object: 'version'

Fixed value identifying this object as a version.

status: 'pending' | 'completed' | 'failed'

The current status of the version generation process.

demoUrl?: string

Optional URL for previewing the generated output.

screenshotUrl?: string

URL to retrieve a screenshot of this version.

createdAt: string

The date and time when the version was created, in ISO 8601 format.

updatedAt?: string

The date and time when the version was last updated, in ISO 8601 format.

[Get Project by ID\
\
Retrieves the details of a specific v0 project by its ID.](https://v0.app/docs/api/platform/reference/projects/get-by-id)
[Update Project\
\
Updates the metadata of an existing project using its \`projectId\`. Supports changes to the project name and privacy setting.](https://v0.app/docs/api/platform/reference/projects/update)

---

# Update Project | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   [Create Project](https://v0.app/docs/api/platform/reference/projects/create)
    
*   [Find Projects](https://v0.app/docs/api/platform/reference/projects/find)
    
*   [Get Project by ID](https://v0.app/docs/api/platform/reference/projects/get-by-id)
    
*   [Get Project by Chat ID](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)
    
*   [Update Project](https://v0.app/docs/api/platform/reference/projects/update)
    
*   [Assign Project to Chat](https://v0.app/docs/api/platform/reference/projects/assign)
    
*   [Create Environment Variables](https://v0.app/docs/api/platform/reference/projects/create-env-vars)
    
*   [Delete Project](https://v0.app/docs/api/platform/reference/projects/delete)
    
*   [Delete Environment Variables](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)
    
*   [Find Environment Variables](https://v0.app/docs/api/platform/reference/projects/find-env-vars)
    
*   [Get Environment Variable](https://v0.app/docs/api/platform/reference/projects/get-env-var)
    
*   [Update Environment Variables](https://v0.app/docs/api/platform/reference/projects/update-env-vars)
    

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Projects

Update Project
==============

Copy page

Updates the metadata of an existing project using its \`projectId\`. Supports changes to the project name and privacy setting.

PATCH/v1/projects/{projectId}

[Usage](https://v0.app/docs/api/platform/reference/projects/update#usage)

--------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.projects.update()
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/projects/update#api-signature)

------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/projects/update#request)

#### [Path Parameters](https://v0.app/docs/api/platform/reference/projects/update#path-parameters)

projectId: string

The unique identifier of the project to update. Provided as a path parameter.

#### [Body](https://v0.app/docs/api/platform/reference/projects/update#body)

name?: string

A new name to assign to the project. Helps with identification and organization.

description?: string

A new description to assign to the project. Helps with identification and organization.

instructions?: string

Guidance or goals that provide context for the model when working within the project.

privacy?: 'private' | 'team'

The privacy setting for the project. For user accounts, this must be "private". For team/enterprise accounts, this can be either "private" or "team".

### [Response](https://v0.app/docs/api/platform/reference/projects/update#response)

id: string

A unique identifier for the project.

object: 'project'

Fixed value identifying this object as a project.

name: string

The name of the project as defined by the user.

privacy: 'private' | 'team'

The privacy setting for the project - either private or team.

vercelProjectId?: string

Optional ID of the linked Vercel project, if connected.

createdAt: string

The ISO timestamp representing when the project was created.

updatedAt?: string

The ISO timestamp of the most recent update, if available.

apiUrl: string

The API endpoint URL for accessing this project programmatically.

webUrl: string

The web URL where the project can be viewed or managed.

description?: string

The description of the project.

instructions?: string

The instructions for the project.

chats: object\[\]

List of all chats that are associated with this project.

id: string

A unique identifier for the chat.

object: 'chat'

Fixed value identifying this object as a chat.

shareable: boolean

Indicates whether the chat can be shared via public link.

privacy: 'public' | 'private' | 'team' | 'team-edit' | 'unlisted'

Defines the visibility of the chat—private, team-only, or public.

name?: string

An optional name assigned to the chat by the user.

title?: string

deprecated

Deprecated title field preserved for backward compatibility.

createdAt: string

The ISO timestamp representing when the chat was created.

updatedAt?: string

The ISO timestamp of the last update to the chat.

favorite: boolean

Indicates whether the chat is marked as a favorite.

authorId: string

The ID of the user who created the chat.

projectId?: string

Optional ID of the v0 project associated with this chat.

webUrl: string

Web URL to view this chat in the browser.

apiUrl: string

API URL to access this chat via the API.

latestVersion?: object

The most recent generated version of the chat, if available.

id: string

A unique identifier for the version.

object: 'version'

Fixed value identifying this object as a version.

status: 'pending' | 'completed' | 'failed'

The current status of the version generation process.

demoUrl?: string

Optional URL for previewing the generated output.

screenshotUrl?: string

URL to retrieve a screenshot of this version.

createdAt: string

The date and time when the version was created, in ISO 8601 format.

updatedAt?: string

The date and time when the version was last updated, in ISO 8601 format.

[Get Project by Chat ID\
\
Retrieves the v0 project associated with a given chat. Useful for determining the context or scope of a chat session.](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)
[Assign Project to Chat\
\
Links an existing v0 project to a specific chat. Helps group conversations under a shared project context.](https://v0.app/docs/api/platform/reference/projects/assign)

---

# Get Environment Variable | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   [Create Project](https://v0.app/docs/api/platform/reference/projects/create)
    
*   [Find Projects](https://v0.app/docs/api/platform/reference/projects/find)
    
*   [Get Project by ID](https://v0.app/docs/api/platform/reference/projects/get-by-id)
    
*   [Get Project by Chat ID](https://v0.app/docs/api/platform/reference/projects/get-by-chat-id)
    
*   [Update Project](https://v0.app/docs/api/platform/reference/projects/update)
    
*   [Assign Project to Chat](https://v0.app/docs/api/platform/reference/projects/assign)
    
*   [Create Environment Variables](https://v0.app/docs/api/platform/reference/projects/create-env-vars)
    
*   [Delete Project](https://v0.app/docs/api/platform/reference/projects/delete)
    
*   [Delete Environment Variables](https://v0.app/docs/api/platform/reference/projects/delete-env-vars)
    
*   [Find Environment Variables](https://v0.app/docs/api/platform/reference/projects/find-env-vars)
    
*   [Get Environment Variable](https://v0.app/docs/api/platform/reference/projects/get-env-var)
    
*   [Update Environment Variables](https://v0.app/docs/api/platform/reference/projects/update-env-vars)
    

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API/API Reference/Projects

Get Environment Variable
========================

Copy page

Retrieves a specific environment variable for a given project by its ID, including its value.

GET/v1/projects/{projectId}/env-vars/{environmentVariableId}

[Usage](https://v0.app/docs/api/platform/reference/projects/get-env-var#usage)

-------------------------------------------------------------------------------

TypeScript Example

TypeScriptcURL

    import { v0 } from 'v0-sdk'
    
    const result = await v0.projects.getEnvVar({
      projectId: 'project_abc123',
      environmentVariableId: 'env_def456',
      decrypted: 'true',
    })
    
    console.log(result)

[API Signature](https://v0.app/docs/api/platform/reference/projects/get-env-var#api-signature)

-----------------------------------------------------------------------------------------------

### [Request](https://v0.app/docs/api/platform/reference/projects/get-env-var#request)

#### [Path Parameters](https://v0.app/docs/api/platform/reference/projects/get-env-var#path-parameters)

projectId: string

The unique identifier of the project that owns the environment variable.

environmentVariableId: string

The unique identifier of the environment variable to retrieve.

#### [Query Parameters](https://v0.app/docs/api/platform/reference/projects/get-env-var#query-parameters)

decrypted?: 'true' | 'false'

Whether to return decrypted values. Defaults to false (encrypted).

### [Response](https://v0.app/docs/api/platform/reference/projects/get-env-var#response)

object: 'environment\_variable'

data: object

[Find Environment Variables\
\
Retrieves all environment variables for a given project.](https://v0.app/docs/api/platform/reference/projects/find-env-vars)
[Update Environment Variables\
\
Updates multiple environment variables for a given project. Only the value of each environment variable can be updated.](https://v0.app/docs/api/platform/reference/projects/update-env-vars)

---

# Overview | v0 Docs

*   [Overview](https://v0.app/docs/api)
    
*   [v0 Model API](https://v0.app/docs/api/model)
    

*   v0 Platform API

*   [Quickstart](https://v0.app/docs/api/platform/quickstart)
    
*   [Overview](https://v0.app/docs/api/platform/overview)
    

*   Guides

*   [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages)
    
*   [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code)
    
*   [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables)
    
*   [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes)
    

*   Examples

*   [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone)
    
*   [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0)
    
*   [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools)
    
*   [React Components Example](https://v0.app/docs/api/platform/examples/react-components)
    

*   Adapters

*   [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server)
    
*   [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools)
    

*   Packages

*   [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk)
    
*   [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app)
    
*   [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react)
    
*   [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools)
    

*   API Reference

*   Projects

*   Chats

*   Deployments

*   Integrations

*   Hooks

*   Rate limits

*   User

*   Reports

*   [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage)
    

Menu

v0 Platform API

Overview
========

Copy page

Core concepts, capabilities, and architecture

v0 turns your ideas into real web apps using natural language—describe what you want and v0's intelligent agent builds it for you with modern frontend tools. The v0 Platform API gives you programmatic access to all of v0's capabilities, letting you integrate v0's AI-powered code generation, chat interface, project management, and deployment features into your own applications and workflows.

[What can you build with the Platform API?](https://v0.app/docs/api/platform/overview#what-can-you-build-with-the-platform-api)

--------------------------------------------------------------------------------------------------------------------------------

With the v0 Platform API, you can create your own experiences around v0's core functionality:

*   **Custom chat interfaces** - Build your own UI for v0's AI-powered code generation
*   **Automated workflows** - Trigger code generation, iterate on projects, and deploy automatically
*   **Development tools** - Integrate v0 into IDEs, CI/CD pipelines, or internal tools
*   **Team dashboards** - Create custom project management and collaboration interfaces
*   **AI agents** - Build autonomous systems that use v0 to generate and deploy code
*   **Educational platforms** - Create coding tutorials and interactive learning experiences

[Core Concepts](https://v0.app/docs/api/platform/overview#core-concepts)

-------------------------------------------------------------------------

### [Projects](https://v0.app/docs/api/platform/overview#projects)

Projects are containers for your code and development work. They can be:

*   **Created from scratch** with AI assistance
*   **Imported from GitHub repositories**
*   **Initialized with existing files** you upload
*   **Built from community templates**

    // Create a new project
    const project = await v0.projects.create({
      name: 'My React App',
    })
    
    // Most common: Initialize from existing files
    const chat = await v0.chats.init({
      type: 'files',
      files: [\
        { name: 'src/App.tsx', content: appCode },\
        { name: 'package.json', content: packageJson },\
      ],
      projectId: project.id,
    })

### [Chats](https://v0.app/docs/api/platform/overview#chats)

Chats are AI-powered conversations that help you develop your projects:

*   **`v0.chats.create()`** - Start from scratch with AI code generation
*   **`v0.chats.init()`** - Start with existing files (fast, no tokens)

    // Start chat with existing code (recommended)
    const chat = await v0.chats.init({
      files: existingFiles,
      initialContext: 'Help me optimize this React component',
    })
    
    // Start chat from scratch with AI generation
    const chat = await v0.chats.create({
      initialMessage: 'Create a todo app with React and TypeScript',
    })

### [Messages](https://v0.app/docs/api/platform/overview#messages)

Messages flow through chats and can contain:

*   **Text content** with markdown formatting
*   **Code blocks** with syntax highlighting
*   **Component previews** with live rendering
*   **System notifications** and status updates

### [Deployments](https://v0.app/docs/api/platform/overview#deployments)

Deploy your projects to production with built-in hosting:

    const deployment = await v0.deployments.create({
      projectId: project.id,
      chatId: chat.id,
      versionId: chat.latestVersion.id,
    })

[API Architecture](https://v0.app/docs/api/platform/overview#api-architecture)

-------------------------------------------------------------------------------

### [Base URL](https://v0.app/docs/api/platform/overview#base-url)

All API requests are made to:

    https://api.v0.dev

### [RESTful Design](https://v0.app/docs/api/platform/overview#restful-design)

The API follows REST principles with predictable resource URLs:

    GET    https://api.v0.dev/v1/projects           # List projects
    POST   https://api.v0.dev/v1/projects           # Create project
    GET    https://api.v0.dev/v1/projects/:id       # Get project
    PUT    https://api.v0.dev/v1/projects/:id       # Update project
    DELETE https://api.v0.dev/v1/projects/:id       # Delete project
    
    POST   https://api.v0.dev/v1/chats              # Create/init chat
    GET    https://api.v0.dev/v1/chats/:id/messages # Get messages
    POST   https://api.v0.dev/v1/chats/:id/messages # Send message

### [Authentication](https://v0.app/docs/api/platform/overview#authentication)

All requests require API key authentication. The SDK provides two ways to authenticate:

#### [Option 1: Default Client (Recommended)](https://v0.app/docs/api/platform/overview#option-1-default-client-recommended)

The simplest approach uses the default `v0` client, which automatically reads from the `V0_API_KEY` environment variable:

    import { v0 } from 'v0-sdk'
    
    // Automatically uses process.env.V0_API_KEY
    const projects = await v0.projects.list()

Set your API key in your environment:

    # .env file or environment
    V0_API_KEY=your_api_key_here

#### [Option 2: Custom Client Configuration](https://v0.app/docs/api/platform/overview#option-2-custom-client-configuration)

Use `createClient()` when you need to:

*   Use a different environment variable name
*   Use multiple API keys in the same application
*   Customize the base URL or other settings

    import { createClient } from 'v0-sdk'
    
    // Custom API key
    const v0 = createClient({
      apiKey: process.env.CUSTOM_V0_KEY,
    })
    
    // Multiple clients for different accounts
    const personalV0 = createClient({
      apiKey: process.env.PERSONAL_V0_KEY,
    })
    
    const teamV0 = createClient({
      apiKey: process.env.TEAM_V0_KEY,
    })
    
    // Custom base URL (for enterprise)
    const enterpriseV0 = createClient({
      apiKey: process.env.V0_API_KEY,
      baseUrl: 'https://api.enterprise.v0.dev',
    })

Get your API key from [v0.dev/chat/settings/keys](https://v0.dev/chat/settings/keys)
.

### [Error Handling](https://v0.app/docs/api/platform/overview#error-handling)

Consistent error responses across all endpoints:

    {
      "error": {
        "code": "project_not_found",
        "type": "not_found_error",
        "message": "Project not found",
        "userMessage": "The project you're looking for doesn't exist."
      }
    }

[Key Capabilities](https://v0.app/docs/api/platform/overview#key-capabilities)

-------------------------------------------------------------------------------

### [1\. Code Generation & AI Chat](https://v0.app/docs/api/platform/overview#1-code-generation--ai-chat)

*   **Natural language** to code conversion
*   **Context-aware** suggestions and improvements
*   **Multi-turn conversations** for iterative development
*   **Framework-specific** optimizations (React, Next.js, Vue, etc.)

### [2\. Project Management](https://v0.app/docs/api/platform/overview#2-project-management)

*   **Version control** integration with Git
*   **File management** with conflict resolution
*   **Template system** for rapid project setup
*   **Workspace organization** for team collaboration

### [3\. Import & Export](https://v0.app/docs/api/platform/overview#3-import--export)

*   **GitHub integration** for repository imports
*   **File uploads** for existing codebases
*   **Template creation** from existing projects
*   **Export capabilities** for backup and migration

### [4\. Deployment & Hosting](https://v0.app/docs/api/platform/overview#4-deployment--hosting)

*   **One-click deployments** to v0's hosting platform
*   **Custom domains** and SSL certificates
*   **Environment management** (staging, production)
*   **Deployment logs** and monitoring

### [5\. Team Collaboration](https://v0.app/docs/api/platform/overview#5-team-collaboration)

*   **Shared projects** with permission management
*   **Real-time collaboration** on code and chats
*   **Activity feeds** and notifications
*   **Role-based access** control

[Integration Patterns](https://v0.app/docs/api/platform/overview#integration-patterns)

---------------------------------------------------------------------------------------

### [1\. Direct API Usage](https://v0.app/docs/api/platform/overview#1-direct-api-usage)

Use the core SDK for full control:

    import { v0 } from 'v0-sdk'
    // Or with custom configuration:
    // import { createClient } from 'v0-sdk'
    // const v0 = createClient({ apiKey: process.env.V0_API_KEY })
    
    // Create project and chat
    const project = await v0.projects.create({ name: 'My App' })
    const chat = await v0.chats.init({
      type: 'files',
      files: myFiles,
      projectId: project.id,
    })

### [2\. AI Agent Integration](https://v0.app/docs/api/platform/overview#2-ai-agent-integration)

Build autonomous agents with AI SDK:

    import { generateText } from 'ai'
    import { v0Tools } from '@v0-sdk/ai-tools'
    
    const result = await generateText({
      model: openai('gpt-4o-mini'),
      prompt: 'Create and deploy a React dashboard',
      tools: v0Tools({ apiKey: process.env.V0_API_KEY }),
    })

### [3\. Workflow Automation](https://v0.app/docs/api/platform/overview#3-workflow-automation)

Integrate with CI/CD and development tools:

    // GitHub Actions integration
    const project = await v0.projects.create({
      name: 'GitHub Project',
    })
    
    const chat = await v0.chats.init({
      type: 'repo',
      repo: {
        url: `https://github.com/${context.payload.repository.full_name}`,
      },
      projectId: project.id,
    })
    
    const deployment = await v0.deployments.create({
      projectId: project.id,
      chatId: chat.id,
      versionId: chat.latestVersion.id,
    })

### [4\. Custom Development Tools](https://v0.app/docs/api/platform/overview#4-custom-development-tools)

Build custom interfaces and experiences:

    // Custom project dashboard
    function ProjectDashboard({ projectId }) {
      const { data: project } = useProject(projectId)
      const { data: chats } = useProjectChats(projectId)
      const { data: deployments } = useProjectDeployments(projectId)
    
      return (
        
) } [Development Workflow](https://v0.app/docs/api/platform/overview#development-workflow) --------------------------------------------------------------------------------------- ### [Typical Development Flow](https://v0.app/docs/api/platform/overview#typical-development-flow) 1. **Initialize Project** * Import from GitHub or create from template * Set up project structure and dependencies 2. **Start Development Chat** * Use `init()` for existing code or `create()` for new features * Provide context about requirements and goals 3. **Iterative Development** * Chat with AI to generate and refine code * Review and modify generated components * Test and validate functionality 4. **Deploy and Monitor** * Deploy to staging for testing * Deploy to production when ready * Monitor performance and usage ### [Best Practices](https://v0.app/docs/api/platform/overview#best-practices) #### [Performance Optimization](https://v0.app/docs/api/platform/overview#performance-optimization) * **Use `init()` over `create()`** when you have existing files * **Batch operations** when possible to reduce API calls * **Cache responses** for frequently accessed data * **Use selective file imports** to minimize payload sizes #### [Cost Management](https://v0.app/docs/api/platform/overview#cost-management) * **Monitor token usage** for AI operations * **Use templates** to reduce generation needs * **Implement caching** for repeated operations * **Set reasonable timeouts** for long-running operations #### [Error Resilience](https://v0.app/docs/api/platform/overview#error-resilience) * **Implement retry logic** with exponential backoff * **Handle API errors** gracefully with proper error handling * **Validate inputs** before making API calls * **Use proper error boundaries** in React applications [Security & Privacy](https://v0.app/docs/api/platform/overview#security--privacy) ---------------------------------------------------------------------------------- ### [API Security](https://v0.app/docs/api/platform/overview#api-security) * **API keys** are scoped to your account and can be rotated * **HTTPS encryption** for all API communications * **Input validation** protects against malicious payloads ### [Data Privacy](https://v0.app/docs/api/platform/overview#data-privacy) * **Your code** remains private and is not used for training * **Project data** is encrypted at rest and in transit * **Access logs** are maintained for security auditing * **GDPR compliance** for European users ### [Best Practices](https://v0.app/docs/api/platform/overview#best-practices-1) * **Store API keys securely** using environment variables * **Use least-privilege access** with scoped permissions * **Rotate keys regularly** for enhanced security * **Monitor usage** for unusual activity patterns [Limits & Quotas](https://v0.app/docs/api/platform/overview#limits--quotas) ---------------------------------------------------------------------------- ### [API Limits](https://v0.app/docs/api/platform/overview#api-limits) | Resource | Limit | Notes | | --- | --- | --- | | Projects | 100 per account | Contact support for higher limits | | Chats | 1000 per project | Archived chats don't count | | Messages | 10,000 per chat | Older messages are automatically archived | | Files | 1000 per project | 3MB max file size | | Deployments | 50 per project | Active deployments only | ### [Usage Quotas](https://v0.app/docs/api/platform/overview#usage-quotas) | Operation | Quota | Reset Period | | --- | --- | --- | | API Requests | 10,000 | Daily | | Chat Messages | 1,000 | Daily | | Deployments | 100 | Daily | | File Uploads | 1GB | Daily | | GitHub Imports | 50 | Daily | [Getting Started](https://v0.app/docs/api/platform/overview#getting-started) ----------------------------------------------------------------------------- ### [1\. Get Your API Key](https://v0.app/docs/api/platform/overview#1-get-your-api-key) Visit [v0.dev/chat/settings/keys](https://v0.dev/chat/settings/keys) to generate your API key. ### [2\. Install the SDK](https://v0.app/docs/api/platform/overview#2-install-the-sdk) npm install v0-sdk # or pnpm add v0-sdk ### [3\. Make Your First Call](https://v0.app/docs/api/platform/overview#3-make-your-first-call) import { v0 } from 'v0-sdk' // List your projects const projects = await v0.projects.list() console.log('Your projects:', projects.data) ### [4\. Explore the Guides](https://v0.app/docs/api/platform/overview#4-explore-the-guides) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) - Import your codebase * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) - Build chat interfaces * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) - Handle concurrent editing ### [5\. Try the Examples](https://v0.app/docs/api/platform/overview#5-try-the-examples) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) - Recreate the v0.dev experience * [AI Tools](https://v0.app/docs/api/platform/examples/ai-tools) - Build autonomous agents * [React Components](https://v0.app/docs/api/platform/examples/react-components) - Component development workflow [Support & Resources](https://v0.app/docs/api/platform/overview#support--resources) ------------------------------------------------------------------------------------ ### [Documentation](https://v0.app/docs/api/platform/overview#documentation) * **[API Reference](https://v0.app/docs/api/platform/reference) ** - Complete endpoint documentation * **[SDK Packages](https://v0.app/docs/api/platform/packages) ** - Available SDKs and tools * **[Examples](https://v0.app/docs/api/platform/examples) ** - Working code examples ### [Community](https://v0.app/docs/api/platform/overview#community) * **[GitHub Discussions](https://github.com/vercel/v0-sdk/discussions) ** - Community support * **[Discord](https://discord.gg/v0-dev) ** - Real-time chat with other developers * **[Twitter](https://twitter.com/v0) ** - Latest updates and announcements ### [Enterprise](https://v0.app/docs/api/platform/overview#enterprise) * **Custom integrations** for enterprise workflows * **Dedicated support** and priority assistance * **On-premises deployment** options * **SLA guarantees** and priority support Contact [enterprise@v0.dev](mailto:enterprise@v0.dev) for enterprise inquiries. [What's Next?](https://v0.app/docs/api/platform/overview#whats-next) --------------------------------------------------------------------- Ready to start building with the v0 Platform API? Here are some suggested next steps: 1. **[Get Started with Quickstart](https://v0.app/docs/api/platform/quickstart) ** - 5-minute setup guide 2. **[Choose Your Integration Pattern](https://v0.app/docs/api/platform/examples) ** - Find the right example for your use case 3. **[Join the Community](https://github.com/vercel/v0-sdk/discussions) ** - Connect with other developers 4. **[Build Something Amazing](https://v0.dev/) ** - Start creating with v0 The v0 Platform API opens up endless possibilities for AI-powered development. Whether you're building custom tools, automating workflows, or creating entirely new development experiences, we can't wait to see what you build! [Quickstart\ \ Get started with the v0 Platform API in minutes](https://v0.app/docs/api/platform/quickstart) [Displaying Chat Messages\ \ Learn how to render and format chat messages from the v0 Platform API using @v0-sdk/react](https://v0.app/docs/api/platform/guides/displaying-chat-messages) --- # Displaying Chat Messages | v0 Docs * [Overview](https://v0.app/docs/api) * [v0 Model API](https://v0.app/docs/api/model) * v0 Platform API * [Quickstart](https://v0.app/docs/api/platform/quickstart) * [Overview](https://v0.app/docs/api/platform/overview) * Guides * [Displaying Chat Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages) * [Start from Existing Code](https://v0.app/docs/api/platform/guides/start-from-existing-code) * [Environment Variables](https://v0.app/docs/api/platform/guides/environment-variables) * [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) * Examples * [v0 Clone](https://v0.app/docs/api/platform/examples/v0-clone) * [Classic v0](https://v0.app/docs/api/platform/examples/classic-v0) * [AI Tools Example](https://v0.app/docs/api/platform/examples/ai-tools) * [React Components Example](https://v0.app/docs/api/platform/examples/react-components) * Adapters * [MCP Server](https://v0.app/docs/api/platform/adapters/mcp-server) * [AI Tools](https://v0.app/docs/api/platform/adapters/ai-tools) * Packages * [v0-sdk](https://v0.app/docs/api/platform/packages/v0-sdk) * [create-v0-sdk-app](https://v0.app/docs/api/platform/packages/create-v0-sdk-app) * [@v0-sdk/react](https://v0.app/docs/api/platform/packages/react) * [@v0-sdk/ai-tools](https://v0.app/docs/api/platform/packages/ai-tools) * API Reference * Projects * Chats * Deployments * Integrations * Hooks * Rate limits * User * Reports * [Get Usage Report](https://v0.app/docs/api/platform/reference/reports/get-usage) Menu v0 Platform API/Guides Displaying Chat Messages ======================== Copy page Learn how to render and format chat messages from the v0 Platform API using @v0-sdk/react Learn how to properly render chat messages from the v0 Platform API using the **@v0-sdk/react** headless React library. This guide covers handling different message types, implementing streaming updates, and customizing message rendering. [Overview](https://v0.app/docs/api/platform/guides/displaying-chat-messages#overview) -------------------------------------------------------------------------------------- The **@v0-sdk/react** library provides headless React components and hooks for rendering rich chat messages from the v0 Platform API. It handles complex message formats including: * **Text content** - Plain text and markdown with custom styling * **Code blocks** - Syntax-highlighted code snippets with copy functionality * **Code projects** - Multi-file code projects with collapsible sections * **Math expressions** - LaTeX math rendering (inline and block) * **Thinking sections** - AI reasoning process with animated indicators * **Task sections** - Task execution steps with status tracking * **Streaming content** - Real-time message updates with loading states [Installation](https://v0.app/docs/api/platform/guides/displaying-chat-messages#installation) ---------------------------------------------------------------------------------------------- First, install the required packages: npm install @v0-sdk/react v0-sdk # For math rendering support npm install katex Import the required CSS in your app: // In your layout or main CSS file import 'katex/dist/katex.min.css' [Quick Start](https://v0.app/docs/api/platform/guides/displaying-chat-messages#quick-start) -------------------------------------------------------------------------------------------- ### [Basic Message Component](https://v0.app/docs/api/platform/guides/displaying-chat-messages#basic-message-component) The simplest way to render a message is using the `Message` component: import { Message } from '@v0-sdk/react' function ChatMessage({ message }) { return ( ) } ### [Fetching and Parsing Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages#fetching-and-parsing-messages) First, retrieve messages from a chat and parse the content: import { v0 } from 'v0-sdk' // Get all messages from a chat using the default client const messages = await v0.chats.findMessages({ chatId: 'your-chat-id', }) // Parse the content for rendering const parsedMessages = messages.data.map((msg) => ({ ...msg, content: JSON.parse(msg.content), // Convert to MessageBinaryFormat })) If you need custom configuration (API key, base URL, etc.), use `createClient`: import { createClient } from 'v0-sdk' const client = createClient({ apiKey: process.env.V0_API_KEY, baseUrl: process.env.V0_API_URL, // optional custom base URL }) const messages = await client.chats.findMessages({ chatId: 'your-chat-id', }) ### [Message Binary Format](https://v0.app/docs/api/platform/guides/displaying-chat-messages#message-binary-format) The v0 Platform API returns messages in a special binary format that encodes rich content: type MessageBinaryFormat = [number, ...any[]][] // Example structure: [\ [0, [ // Type 0 = markdown/content data\ ['p', {}, 'Hello world'],\ ['h1', {}, 'Title'],\ ['Codeblock', { lang: 'tsx' }, 'const x = 1']\ ]],\ [1, { context: [...] }], // Type 1 = metadata\ [2, 'x = \\frac{-b}{2a}'], // Type 2 = inline math\ [3, 'e^{i\\pi} + 1 = 0'] // Type 3 = block math\ ] [Customizing Message Rendering](https://v0.app/docs/api/platform/guides/displaying-chat-messages#customizing-message-rendering) -------------------------------------------------------------------------------------------------------------------------------- ### [Using Custom Components](https://v0.app/docs/api/platform/guides/displaying-chat-messages#using-custom-components) The `Message` component accepts a `components` prop to customize how different elements are rendered: import { Message, CodeBlock, MathPart } from '@v0-sdk/react' function CustomChatMessage({ message }) { return ( ) } ### [Custom Code Block Component](https://v0.app/docs/api/platform/guides/displaying-chat-messages#custom-code-block-component) Create a custom code block with additional features: import { useState } from 'react' import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter' import { vscDarkPlus } from 'react-syntax-highlighter/dist/esm/styles/prism' function MyCustomCodeBlock({ language, code, className, }: { language: string code: string className?: string }) { const [copied, setCopied] = useState(false) const handleCopy = async () => { await navigator.clipboard.writeText(code) setCopied(true) setTimeout(() => setCopied(false), 2000) } return (
{language}
{code}
) } ### [Custom Math Component](https://v0.app/docs/api/platform/guides/displaying-chat-messages#custom-math-component) Customize math rendering with additional styling: import 'katex/dist/katex.min.css' function MyCustomMathRenderer({ content, inline = false, className, }: { content: string inline?: boolean className?: string }) { // Use KaTeX or your preferred math renderer const katex = require('katex') const html = katex.renderToString(content, { displayMode: !inline, throwOnError: false, }) return ( ) } [Complete Chat Interface](https://v0.app/docs/api/platform/guides/displaying-chat-messages#complete-chat-interface) -------------------------------------------------------------------------------------------------------------------- Here's a complete chat interface using @v0-sdk/react: import { Message } from '@v0-sdk/react' import { formatTime } from '@/lib/utils' function ChatInterface({ messages }) { return (
{messages.map((message) => ( ))}
) } function ChatMessage({ message }) { const isUser = message.role === 'user' return (
{/* Avatar */}
{isUser ? 'U' : 'AI'}
{/* Message bubble */}
{/* Timestamp */}
{formatTime(message.createdAt)}
{/* Message content */}
) } [Streaming Messages](https://v0.app/docs/api/platform/guides/displaying-chat-messages#streaming-messages) ---------------------------------------------------------------------------------------------------------- The `StreamingMessage` component handles real-time message updates from the v0 Platform API: import { useState } from 'react' import { v0 } from 'v0-sdk' import { StreamingMessage } from '@v0-sdk/react' function StreamingChatDemo() { const [stream, setStream] = useState | null>(null) const [isLoading, setIsLoading] = useState(false) const handleSendMessage = async (message: string) => { setIsLoading(true) try { // Create streaming response const response = await v0.chats.create({ message, responseMode: 'experimental_stream', // Enable streaming }) setStream(response) } catch (error) { console.error('Failed to send message:', error) } finally { setIsLoading(false) } } return (
{/* Chat messages */}
{/* Previous messages would go here */} {/* Streaming message */} {stream && (
AI
} errorComponent={(error) => (
Error: {error}
)} onComplete={(content) => { console.log('Streaming complete:', content) setStream(null) // Clear stream when done }} onChatData={(chatData) => { console.log('Chat metadata:', chatData) }} components={{ p: { className: 'mb-2 text-gray-900 last:mb-0' }, code: { className: 'bg-gray-200 text-gray-800 px-1 py-0.5 rounded text-sm', }, }} />
)}
{/* Message input */}
) } function TypingIndicator() { return (
AI is thinking...
) } function MessageInput({ onSend, isLoading }) { const [input, setInput] = useState('') const handleSubmit = (e) => { e.preventDefault() if (input.trim() && !isLoading) { onSend(input.trim()) setInput('') } } return (
setInput(e.target.value)} placeholder="Type your message..." disabled={isLoading} className="flex-1 px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50" />
) } ### [Headless Streaming Hook](https://v0.app/docs/api/platform/guides/displaying-chat-messages#headless-streaming-hook) For more control, use the headless `useStreamingMessageData` hook: import { useStreamingMessageData } from '@v0-sdk/react' function CustomStreamingMessage({ stream }) { const { content, isStreaming, error, chatData, messageData } = useStreamingMessageData({ stream, messageId: 'custom-stream', onChunk: (chunk) => console.log('New chunk:', chunk), onComplete: (finalContent) => console.log('Complete:', finalContent), onError: (error) => console.error('Stream error:', error), }) if (error) { return
Error: {error}
} if (isStreaming && content.length === 0) { return
Loading...
} // Render your custom UI with messageData return (
{messageData?.elements.map((element) => ( // Custom rendering logic based on element.type
{/* Custom element renderer */}
))} {isStreaming &&
}
) } [Best Practices](https://v0.app/docs/api/platform/guides/displaying-chat-messages#best-practices) -------------------------------------------------------------------------------------------------- ### [1\. Performance Optimization](https://v0.app/docs/api/platform/guides/displaying-chat-messages#1-performance-optimization) Use React.memo and proper key props for message lists: import React from 'react' import { Message } from '@v0-sdk/react' const ChatMessage = React.memo(({ message }) => { return (
) }) // Define components outside render to prevent re-creation const messageComponents = { p: { className: 'mb-2 text-gray-900' }, code: { className: 'bg-gray-100 px-1 py-0.5 rounded text-sm' }, // ... other components } function ChatList({ messages }) { return (
{messages.map((message) => ( ))}
) } ### [2\. Error Handling](https://v0.app/docs/api/platform/guides/displaying-chat-messages#2-error-handling) Wrap message rendering in error boundaries: import React from 'react' class MessageErrorBoundary extends React.Component { constructor(props) { super(props) this.state = { hasError: false, error: null } } static getDerivedStateFromError(error) { return { hasError: true, error } } componentDidCatch(error, errorInfo) { console.error('Message render error:', error, errorInfo) // Log to your error tracking service } render() { if (this.state.hasError) { return (

Failed to render message

The message content could not be displayed properly.

) } return this.props.children } } // Usage function SafeChatMessage({ message }) { return ( ) } ### [3\. Accessibility](https://v0.app/docs/api/platform/guides/displaying-chat-messages#3-accessibility) Ensure proper ARIA labels and keyboard navigation: function AccessibleChatMessage({ message, index, totalMessages }) { return (
{formatTime(message.createdAt)}
) } ### [4\. Theme Support](https://v0.app/docs/api/platform/guides/displaying-chat-messages#4-theme-support) Create reusable theme configurations: // themes.ts export const themes = { light: { p: { className: 'mb-2 text-gray-900' }, h1: { className: 'text-2xl font-bold text-gray-900 mb-4' }, code: { className: 'bg-gray-100 text-gray-800 px-1 py-0.5 rounded text-sm', }, a: { className: 'text-blue-600 hover:text-blue-800 underline' }, blockquote: { className: 'border-l-4 border-gray-300 pl-4 italic text-gray-600 my-4', }, }, dark: { p: { className: 'mb-2 text-gray-100' }, h1: { className: 'text-2xl font-bold text-gray-100 mb-4' }, code: { className: 'bg-gray-800 text-gray-200 px-1 py-0.5 rounded text-sm', }, a: { className: 'text-blue-400 hover:text-blue-300 underline' }, blockquote: { className: 'border-l-4 border-gray-600 pl-4 italic text-gray-300 my-4', }, }, } // Usage function ThemedMessage({ message, theme = 'light' }) { return ( ) } [Utilities](https://v0.app/docs/api/platform/guides/displaying-chat-messages#utilities) ---------------------------------------------------------------------------------------- ### [Time Formatting](https://v0.app/docs/api/platform/guides/displaying-chat-messages#time-formatting) function formatTime(timestamp: string): string { const date = new Date(timestamp) const now = new Date() const diffMs = now.getTime() - date.getTime() const diffMins = Math.floor(diffMs / (1000 * 60)) if (diffMins < 1) return 'Just now' if (diffMins < 60) return `${diffMins}m ago` if (diffMins < 1440) return `${Math.floor(diffMins / 60)}h ago` return date.toLocaleDateString() } ### [Message Processing](https://v0.app/docs/api/platform/guides/displaying-chat-messages#message-processing) import type { MessageBinaryFormat } from '@v0-sdk/react' // Helper to check if message content is empty function isMessageEmpty(content: MessageBinaryFormat): boolean { if (!Array.isArray(content) || content.length === 0) return true // Check if any content rows have actual data return !content.some(([type, data]) => { if (type === 0 && Array.isArray(data)) { return data.some((element) => { if (typeof element === 'string') return element.trim().length > 0 if (Array.isArray(element) && element.length > 2) { return element .slice(2) .some((child) => typeof child === 'string' ? child.trim().length > 0 : true, ) } return false }) } return type === 2 || type === 3 // Math content }) } // Helper to extract text content from message function extractTextContent(content: MessageBinaryFormat): string { if (!Array.isArray(content)) return '' const textParts: string[] = [] content.forEach(([type, data]) => { if (type === 0 && Array.isArray(data)) { data.forEach((element) => { if (typeof element === 'string') { textParts.push(element) } else if (Array.isArray(element) && element.length > 2) { element.slice(2).forEach((child) => { if (typeof child === 'string') { textParts.push(child) } }) } }) } else if (type === 2 || type === 3) { textParts.push(data) // Math content } }) return textParts.join(' ').trim() } // Helper to get message preview for notifications function getMessagePreview( content: MessageBinaryFormat, maxLength = 100, ): string { const text = extractTextContent(content) if (text.length <= maxLength) return text return text.slice(0, maxLength).trim() + '...' } ### [Custom Hook for Message Management](https://v0.app/docs/api/platform/guides/displaying-chat-messages#custom-hook-for-message-management) import { useState, useCallback } from 'react' import type { MessageBinaryFormat } from '@v0-sdk/react' interface ChatMessage { id: string role: 'user' | 'assistant' | 'system' content: MessageBinaryFormat createdAt: string } export function useMessages() { const [messages, setMessages] = useState([]) const addMessage = useCallback((message: ChatMessage) => { setMessages((prev) => [...prev, message]) }, []) const updateMessage = useCallback( (id: string, updates: Partial) => { setMessages((prev) => prev.map((msg) => (msg.id === id ? { ...msg, ...updates } : msg)), ) }, [], ) const removeMessage = useCallback((id: string) => { setMessages((prev) => prev.filter((msg) => msg.id !== id)) }, []) const clearMessages = useCallback(() => { setMessages([]) }, []) return { messages, addMessage, updateMessage, removeMessage, clearMessages, } } [Headless Architecture](https://v0.app/docs/api/platform/guides/displaying-chat-messages#headless-architecture) ---------------------------------------------------------------------------------------------------------------- The @v0-sdk/react library follows a headless architecture pattern, giving you complete control over styling and behavior: ### [Using Headless Hooks](https://v0.app/docs/api/platform/guides/displaying-chat-messages#using-headless-hooks) import { useMessage, useStreamingMessageData } from '@v0-sdk/react' function MyCustomRenderer({ message, stream }) { // For static messages const messageData = useMessage({ content: message.content, messageId: message.id, role: message.role, }) // For streaming messages const streamingData = useStreamingMessageData({ stream, messageId: 'streaming-msg', }) // Build your own UI using the processed data return (
{/* Your custom rendering logic */} {messageData.elements.map((element) => ( ))}
) } ### [Available Hooks](https://v0.app/docs/api/platform/guides/displaying-chat-messages#available-hooks) * **`useMessage`** - Process static message content into renderable data * **`useStreamingMessageData`** - Handle streaming messages with real-time updates * **`useCodeBlock`** - Process code block data for custom rendering * **`useMath`** - Process LaTeX math for custom rendering * **`useThinkingSection`** - Handle AI thinking sections * **`useTaskSection`** - Process task execution data [Next Steps](https://v0.app/docs/api/platform/guides/displaying-chat-messages#next-steps) ------------------------------------------------------------------------------------------ * Explore the [v0-sdk GitHub repository](https://github.com/vercel/v0-sdk) for more examples * Check out the [React Components Example](https://v0.app/docs/api/platform/examples/react-components) for a complete implementation * Learn about [Lock Files from AI Changes](https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes) to handle concurrent editing * Try different themes in the [v0-sdk-react-example](https://github.com/vercel/v0-sdk/tree/main/examples/v0-sdk-react-example) directory [Overview\ \ Core concepts, capabilities, and architecture](https://v0.app/docs/api/platform/overview) [Start from Existing Code\ \ Learn how to start v0 chats from existing codebases, repositories, and file structures](https://v0.app/docs/api/platform/guides/start-from-existing-code) --- # Cursor | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Cursor ====== Copy page Use v0 inside Cursor to build with natural language. You can use v0 inside Cursor by configuring it as a custom OpenAI-compatible provider. 1. **Install Cursor**: [https://cursor.com](https://cursor.com/) 2. Open **Cursor Settings** (`⌘+Shift+J` on macOS or `Ctrl+Shift+J` on Windows/Linux) 3. Go to the **Models** tab 4. Scroll down to **OpenAI API Key** 5. Paste in your [v0 API key](https://v0.app/chat/settings/keys) 6. Click **Override OpenAI Base URL** 7. Enter the v0 endpoint: `https://api.v0.dev/v1` 8. Click **Add Custom Model** 9. Add the v0 models you want to use: `v0-1.5-md` and/or `v0-1.5-lg` 10. Click **Save** 11. Click **Verify** to confirm the connection [Agent mode](https://v0.app/docs/cursor#agent-mode) ---------------------------------------------------- To use v0 models in Cursor's Agent Mode, follow these steps: 1. Open a new chat. * Mode: **Agent** * Model: Choose either `v0-1.5-md` or `v0-1.5-lg` from the available models. 2. Start chatting with your chosen v0 model. * _Confirm with:_ `who are you?` [Model Options](https://v0.app/docs/cursor#model-options) ---------------------------------------------------------- * **v0-1.5-md**: Medium-sized model, balanced performance and speed * **v0-1.5-lg**: Large model, enhanced capabilities for complex tasks By using our API, you agree to our [API Terms](https://vercel.com/legal/api-terms) . [Cline\ \ Use v0 inside Cline to plan, edit, and automate development tasks through natural language commands.](https://v0.app/docs/cline) [OpenAI Codex\ \ Use v0 inside OpenAI Codex to run prompts from the terminal.](https://v0.app/docs/openai-codex) --- # Community | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Community ========= Copy page Manage your shared community projects. [Sharing a project with the community](https://v0.app/docs/community#sharing-a-project-with-the-community) ----------------------------------------------------------------------------------------------------------- You can share your project with the community by clicking the **Settings** button in the top right corner of the project and selecting **Community**. [Updating a project](https://v0.app/docs/community#updating-a-project) ----------------------------------------------------------------------- Once you've published a project in the Vercel Community and want to update it with your latest changes. 1. **Open Your Community Project Link**: You can see your community projects [here](https://v0.app/community/submissions) . 2. **Click the "Chat" Icon**: This will open the original project in the v0 editor. ![Click Chat Icon](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fchat-icon.png&w=3840&q=75)![Click Chat Icon](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fchat-icon.png&w=3840&q=75) 3. **Click "+ New Project"**: You'll see this option in the breadcrumbs at the top. Click it to add the project to a new or existing project under your account. 4. **Open the Project Settings**: Click the gear icon in the top-right to access the **Project Settings**. 5. **Enable Community Sharing**: Go to the **Community** tab in the sidebar and make sure the "Share this project with Community" toggle is enabled. ![Publish to Community](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fpublish-to-community-example.png&w=3840&q=75)![Publish to Community](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fpublish-to-community-example.png&w=3840&q=75) 6. **Make Your Changes and Deploy to Vercel**: Update your project (dependencies, code, design, etc.) and deploy it to Vercel. This will automatically update the Community project with your latest changes. ![Enable Community Sharing](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fdeploy-example.png&w=3840&q=75)![Enable Community Sharing](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fdeploy-example.png&w=3840&q=75) If you have any issues or questions, feel free to reach out on our [community](https://community.vercel.com/c/v0/59) [Account\ \ Manage your account and billing information.](https://v0.app/docs/account) [Enterprise\ \ Learn how to manage v0 seats, access, and more in your Vercel Enterprise account.](https://v0.app/docs/enterprise) --- # Custom domain | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Custom domain ============= Copy page Add custom domains to your v0 deployments to give your applications a professional, branded URL. v0 provides all deployments with a unique `vercel.app` URL, but you can add custom domains to give your applications a professional, branded web address. Once you have a deployment available, you can add a custom domain directly from the v0 interface: [Step 1: Access the share menu](https://v0.app/docs/custom-domains#step-1-access-the-share-menu) ------------------------------------------------------------------------------------------------- 1. **Open your deployed chat** in v0 2. **Navigate to the share section** and open the **Publish** tab where your deployment is available 3. **Look for the "Add a domain" button** in the publish menu [Step 2: Choose your domain option](https://v0.app/docs/custom-domains#step-2-choose-your-domain-option) --------------------------------------------------------------------------------------------------------- When you click **Add a domain**, you'll have two main options: ### [Option A: Use an available `.vercel.app` domain](https://v0.app/docs/custom-domains#option-a-use-an-available-vercelapp-domain) * Select from available `.vercel.app` domains * These are free and instantly available * Perfect for testing and development * Automatically configured with HTTPS ### [Option B: Add your own custom domain](https://v0.app/docs/custom-domains#option-b-add-your-own-custom-domain) * Enter your own domain name (e.g., `myapp.com`) * Requires DNS configuration with your domain registrar * Provides professional branding * Full control over your domain [Configuring your own custom domain](https://v0.app/docs/custom-domains#configuring-your-own-custom-domain) ------------------------------------------------------------------------------------------------------------ If you choose to use your own domain, you'll need to configure it through the Vercel console: 1. **Click "View on Vercel"** from the Publish Menu 2. **Follow the detailed instructions** in the Vercel dashboard 3. **Configure DNS records** with your domain registrar For complete instructions on setting up custom domains, including DNS configuration and domain management, see the [Vercel documentation on adding domains](https://vercel.com/docs/domains/working-with-domains/add-a-domain) . [Next steps](https://v0.app/docs/custom-domains#next-steps) ------------------------------------------------------------ * [Learn about deployments](https://v0.app/docs/deployments) * [Explore Vercel's domain features](https://vercel.com/docs/domains) [Deployments\ \ Deploy your v0 projects to Vercel with one click and manage production deployments.](https://v0.app/docs/deployments) [Sharing\ \ Share your v0 chat with others to showcase your prompt history or to collaborate on generating components. This allows for seamless teamwork and feedback.](https://v0.app/docs/sharing) --- # Databases | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Databases ========= Copy page Build full-stack applications with v0's database integrations. When building applications, it can be useful to add data persistence to properly mock out more complex flows. v0 enables simple, one-click database integrations with popular providers, including [Upstash](https://upstash.com/) , [Neon](https://neon.com/) , [Supabase](https://supabase.com/) , and [Vercel Blob](https://vercel.com/docs/vercel-blob) . [Setting up a database](https://v0.app/docs/databases#setting-up-a-database) ----------------------------------------------------------------------------- You can connect a database to v0 from a chat thread or project. ### [From a project](https://v0.app/docs/databases#from-a-project) From the **Projects** view, go to **Project Settings → Integrations** to see available database options. * To reuse an existing database, click the arrow to select from previously created ones. * To add a new one, click **Create** to open the Marketplace and accept the provider's terms. Once connected, the database will appear under the **Integrations** tab. Future generations in this project can now use the connected database. ### [From a chat thread](https://v0.app/docs/databases#from-a-chat-thread) ![Database integration prompt from chat UI](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fchat-database.png&w=3840&q=75)![Database integration prompt from chat UI](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fchat-database.png&w=3840&q=75) You can also connect a database directly from chat. * Click the suggested action, or * Ask v0 to add a database integration. Either path opens the Marketplace with click-through terms for supported providers. ### [Managing integrations](https://v0.app/docs/databases#managing-integrations) Adding an integration provisions a new user account on that service and adds the necessary environment variables to your project. You can manage these integrations through the [Vercel Marketplace](https://vercel.com/vercel/~/integrations/marketplace) . When you add an integration requiring an environment variable outside of general setup, you will be prompted in the chat to add the necessary variables. You can also add your own environment variables anytime from the project settings sidebar. For SQL-based integrations, can generate and execute SQL. This lets you create, update, and drop tables. For [AI models](https://v0.app/docs/ai-models) , you can set spend limits, auto-top-ups, and other settings during setup. This allows you to control your usage and costs. [AI models\ \ Add AI functionality to your v0 projects by integrating AI models and platforms.](https://v0.app/docs/ai-models) [External APIs\ \ Build full-stack applications by calling external APIs with environment variables.](https://v0.app/docs/external-apis) --- # Cline | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Cline ===== Copy page Use v0 inside Cline to plan, edit, and automate development tasks through natural language commands. [Cline](https://cline.bot/) is an open-source AI coding assistant for Visual Studio Code that helps plan, edit, and automate development tasks through natural language commands. You can use v0 inside Cline by configuring it as an OpenAI-compatible API. 1. **Install Cline** via [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev) . 2. Open **Cline** and click model selector. 3. Under **API Provider**, select: `OpenAI Compatible` 4. Set the **Base URL**: `https://api.v0.dev/v1` 5. Paste in your [v0 API key](https://v0.dev/chat/settings/keys) 6. Set the **Model ID**: `v0-1.0-md` 7. Click **Verify** to confirm the connection. By using our API, you agree to our [API Terms](https://vercel.com/legal/api-terms) . [Security\ \ Learn about v0's security practices, threat modeling, and enterprise security features.](https://v0.app/docs/security) [Cursor\ \ Use v0 inside Cursor to build with natural language.](https://v0.app/docs/cursor) --- # Figma | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Figma ===== Copy page Turn your Figma files into high-fidelity UIs. v0's Figma integration bridges design and development by extracting visual and structural context directly from your Figma files. [How it works](https://v0.app/docs/figma#how-it-works) ------------------------------------------------------- ![Figma option under attachment icon](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fintegration.png&w=3840&q=75)![Figma option under attachment icon](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fintegration.png&w=3840&q=75) When you attach a Figma link using the attachment icon, v0 analyzes both the visual layout and underlying design tokens like color palettes and spacing. This usually results in higher fidelity prototypes than with [screenshots](https://v0.app/docs/screenshots) . ![Figma integration modal](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Ffigma-modal.png&w=3840&q=75)![Figma integration modal](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Ffigma-modal.png&w=3840&q=75) [Best practices](https://v0.app/docs/figma#best-practices) ----------------------------------------------------------- Break down complex designs into smaller, manageable components, just as you would for developer handoff. This improves accuracy and helps avoid sizing or layout issues. Larger designs can be imported too, but keep all elements within a single frame and structure them clearly. Too much content in one frame may reduce generation quality. We recommend separating frames in Figma for each part of the UI (e.g. navbars, sidebars, forms, custom components, or landing page sections) and using an iterative approach to build complex UIs. 1. Generate individual components first. 2. Test and refine them in isolation. 3. Reuse and compose them into full layouts (e.g. landing pages). 4. Provide prompts to guide how v0 should arrange and connect the UI components. The more you use v0 with your Figma designs, the better it gets at understanding your style preferences, like your favorite fonts and spacing. Over time, v0 learns and adapts to your design language. [Screenshots and Files\ \ Turn your mockups or wireframes into high-fidelity designs.](https://v0.app/docs/screenshots) [Code editing\ \ Edit v0's code output and target inline code generation.](https://v0.app/docs/code-editing) --- # Code editing | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Code editing ============ Copy page Edit v0's code output and target inline code generation. [Basic editing](https://v0.app/docs/code-editing#basic-editing) ---------------------------------------------------------------- ![Code editor window](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fcode-editor.png&w=3840&q=75)![Code editor window](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fcode-editor.png&w=3840&q=75) 1. **Switch to Code view**: Click the "Code" tab next to the preview to see the generated code 2. **Edit the code**: The code is highlighted and ready for editing - simply click and type to make changes 3. **Use find and replace**: Press `Cmd+F` (Mac) or `Ctrl+F` (Windows/Linux) to search for specific text 4. **Save your changes**: Click the save button or use `Cmd+S` / `Ctrl+S` to save your modifications [Inline code generation](https://v0.app/docs/code-editing#inline-code-generation) ---------------------------------------------------------------------------------- You can target any code in the editor and ask v0 to make changes to it. Press `Cmd+K` to open the inline code generation prompt. [Editor features](https://v0.app/docs/code-editing#editor-features) -------------------------------------------------------------------- ![Code with syntax highlighting and line numbers](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fsyntax-highlight.png&w=3840&q=75)![Code with syntax highlighting and line numbers](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fsyntax-highlight.png&w=3840&q=75) * **Syntax highlighting**: Code is properly highlighted based on the file type * **Line numbers**: Easily navigate through your code with line numbers * **Find and replace**: Quickly locate and modify specific code sections * **Auto-save**: Changes are automatically saved as you work [Tips](https://v0.app/docs/code-editing#tips) ---------------------------------------------- * Use the find feature to quickly locate specific functions or variables * The editor supports all standard keyboard shortcuts for editing * You can edit multiple files in a project by switching between them in the file tree [Figma\ \ Turn your Figma files into high-fidelity UIs.](https://v0.app/docs/figma) [Design mode\ \ Design mode is a new way to design your app.](https://v0.app/docs/design-mode) --- # Prototyping | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Prototyping =========== Copy page Accelerate your product development lifecycle with interactive prototypes. Product development today is often a relay race, each function passing the baton in turn. But at every handoff, something is lost: context, urgency, or clarity. v0 changes this by enabling early, continuous validation with interactive prototypes. [The standard product development process](https://v0.app/docs/prototyping#the-standard-product-development-process) --------------------------------------------------------------------------------------------------------------------- In most teams today, the path from idea to execution follows distinct, sequential phases with limited early validation. Prototypes are known to help test assumptions but are often delayed due to time and resource constraints. As a result: * **Founders** face long cycles before seeing a tangible version of their vision. It's hard to validate core hypotheses or show progress to stakeholders, leading to decisions based on plans rather than prototypes. * **Product Managers** write detailed specs from research but get little early feedback from users on the experience itself. * **Designers** translate specifications into static mockups. These look right but don't capture interactivity and may miss edge cases. * **Engineers** receive designs late, uncovering gaps during implementation. This often leads to rework and delays. This sequential process creates silos. Handoffs introduce friction, increasing the risk of misalignment between the original vision and final product, stretching timelines and raising costs. [Accelerating product development with v0](https://v0.app/docs/prototyping#accelerating-product-development-with-v0) --------------------------------------------------------------------------------------------------------------------- v0 reshapes product development by enabling early, continuous validation. Anyone can build interactive full stack apps, making the process faster and more collaborative: * **Founders** can prototype and test ideas early, validate product-market fit faster, and pitch with interactive demos. They can pivot based on real feedback without heavy upfront investment. * **Product Managers** explore problems and test assumptions using functional prototypes. These help align design and engineering early and ground specs in real user interactions. * **Designers** evolve prototypes or create new ones to test flows and UX. They get fast feedback and iterate before involving engineering. * **Engineers** engage earlier, with clear, interactive prototypes that reduce ambiguity and surface technical needs early, allowing them to build on a solid, validated base. With v0, teams work from shared, working prototypes rather than static docs. This breaks silos, smooths handoffs, and helps teams spot issues sooner, iterate faster, and ship products that match user needs, more quickly and efficiently. [Full-stack apps\ \ Build full-stack apps with v0.](https://v0.app/docs/full-stack-apps) [PRD design\ \ Create a Product Requirements Document (PRD) with v0.](https://v0.app/docs/prd-design) --- # Full-stack apps | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Full-stack apps =============== Copy page Build full-stack apps with v0. v0 can transform prototypes into full-stack applications. In a new chat or existing generation, ask v0 to implement features that require data persistence, API calls, or backend logic. v0 defaults to Next.js, which offers advantages like server actions and API routes for colocating frontend and backend code. While v0 can use other frameworks, Next.js provides the most reliable results. When building full-stack applications, v0 can: * Leverage [React Server Components](https://react.dev/reference/rsc/server-components) (RSCs) for improved performance and SEO * Create backend endpoints using Next.js App Router conventions * Connect to databases like [Supabase](https://supabase.com/) , [Neon](https://neon.com/) , and [Upstash](https://upstash.com/) without ORMs by default [Integrations](https://v0.app/docs/full-stack-apps#integrations) ----------------------------------------------------------------- Leveraging the [Vercel marketplace](https://vercel.com/marketplace) , v0 has access to a variety of integrations that enable it to add databases, queues, blob storage, AI models, and more through the integrations tab of the project settings. You can either prompt v0 to add integrations, add them manually, or v0 can prompt you to create the resource when necessary, depending on the feature you are building. ### [Supported integrations](https://v0.app/docs/full-stack-apps#supported-integrations) * [**Databases**](https://v0.app/docs/databases) : Supabase, Blob, Neon, Upstash. * [**AI**](https://v0.app/docs/ai-models) : Grok, Groq, fal, Deep Infra. [Environment variables](https://v0.app/docs/full-stack-apps#environment-variables) ----------------------------------------------------------------------------------- In each project, you can configure secure environment variables that v0 will have access to. These can be used for external integrations with LLM providers and APIs. Client-side environment variables must be prefixed with `NEXT_PUBLIC_` to be accessible in browser code. [Incremental development workflow](https://v0.app/docs/full-stack-apps#incremental-development-workflow) --------------------------------------------------------------------------------------------------------- When building full-stack applications, take an incremental approach with v0. ### [Start with UI](https://v0.app/docs/full-stack-apps#start-with-ui) Create your component layout and design: Create a modern task management dashboard with a sidebar, task list, and add task form [Open in](https://v0.app/?q=Create%20a%20modern%20task%20management%20dashboard%20with%20a%20sidebar%2C%20task%20list%2C%20and%20add%20task%20form) ### [Add data layer](https://v0.app/docs/full-stack-apps#add-data-layer) Prompt v0 to add database schema and API routes: "Add a Supabase database with tables for tasks, users, and projects. Include API routes for managing tasks." ### [Implement core features](https://v0.app/docs/full-stack-apps#implement-core-features) Add authentication, CRUD operations, or real-time updates: "Add user authentication so users can only see and manage their own tasks." ### [Enhance functionality](https://v0.app/docs/full-stack-apps#enhance-functionality) Build on existing features with detailed instructions: "Add the ability to edit and delete tasks, plus real-time updates when team members make changes." ### [Optimize and polish](https://v0.app/docs/full-stack-apps#optimize-and-polish) Add performance improvements and advanced features: "Add task filtering by status and due date, plus optimize with caching and image optimization." ### [Best practices](https://v0.app/docs/full-stack-apps#best-practices) * Duplicate existing generations to add logic instead of combining UI and logic in a single prompt * Use popular, well-documented libraries in your prompts * Provide detailed implementation instructions to avoid incorrect assumptions [Zed\ \ Use v0 inside Zed.](https://v0.app/docs/zed) [Prototyping\ \ Accelerate your product development lifecycle with interactive prototypes.](https://v0.app/docs/prototyping) --- # External APIs | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu External APIs ============= Copy page Build full-stack applications by calling external APIs with environment variables. You can call external services in your v0 prototypes by storing access keys as environment variables. This works for both third-party and your own APIs. [Adding API keys](https://v0.app/docs/external-apis#adding-api-keys) --------------------------------------------------------------------- 1. Click **Vars** on the chat sidebar 2. Click **Add** to create a new environment variable 3. Select the **environments** where the variable should be available 4. Enter the **Name** (e.g. `API_KEY`) and **Value** for your key 5. Click **Add Variables** to save ![Environment variables panel](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fenvvars.png&w=1200&q=75)![Environment variables panel](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fenvvars.png&w=1200&q=75) [Environments](https://v0.app/docs/external-apis#environments) --------------------------------------------------------------- When adding a variable, you can choose which environments it applies to: ![Add environment variables modal](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fenv-modal.png&w=1920&q=75)![Add environment variables modal](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fenv-modal.png&w=1920&q=75) This lets you use different API keys for testing vs production, or enable features only in certain environments. | Environment | Description | | --- | --- | | **Production** | Applied to your live, published app | | **Preview** | Applied to preview deployments (non-production branches) | | **Development** | Used when running your project locally | Environment variables are encrypted and stored securely on Vercel. Once added, you can instruct v0 to use them in your API calls. [Learn more about environment variables](https://vercel.com/docs/environment-variables) [Databases\ \ Build full-stack applications with v0's database integrations.](https://v0.app/docs/databases) [GitHub\ \ Connect your GitHub repositories to v0 to automatically create projects and track changes.](https://v0.app/docs/github) --- # Deployments | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Deployments =========== Copy page Deploy your v0 projects to Vercel with one click and manage production deployments. Deploy your v0 projects to Vercel with just a few clicks. v0 integrates seamlessly with Vercel's platform to provide enterprise-grade hosting, automatic deployments, and global CDN distribution. [Publishing to production](https://v0.app/docs/deployments#publishing-to-production) ------------------------------------------------------------------------------------- To deploy your v0 project to production: 1. **Open your chat** in v0 2. **Click "Share"** in the chat interface, and then the **Publish** tab 3. **Wait for deployment** - v0 will automatically build and deploy your code to Vercel's platform 4. **Get your production URL** - Your app will be live at a unique Vercel URL The "Publish" action creates a **Production deployment** of your application using Vercel's infrastructure. This deployment is optimized for performance and includes features like: * Global CDN distribution * Automatic HTTPS * Edge caching * Performance monitoring * Analytics integration [Project and URL management](https://v0.app/docs/deployments#project-and-url-management) ----------------------------------------------------------------------------------------- ### [One production URL per project](https://v0.app/docs/deployments#one-production-url-per-project) Each v0 project can have only **one production URL**. This means: * When you publish a chat for the first time, it gets the project's production URL * If you create a new chat in the same project and publish it, it will **replace** the previous deployment at the same URL * The production URL remains consistent for your project across all deployments ### [Managing multiple deployments](https://v0.app/docs/deployments#managing-multiple-deployments) If you want to maintain multiple versions of your application: * **Create separate projects** for different versions or features * **Use preview deployments** for testing before going live * **Leverage Vercel's branching strategy** for development workflows For more information on managing deployments with Git, see the [GitHub documentation on branching](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches) and [Vercel's preview deployments guide](https://vercel.com/docs/deployments/preview-deployments) . [Updating your deployment](https://v0.app/docs/deployments#updating-your-deployment) ------------------------------------------------------------------------------------- As you continue to iterate on your application: 1. **Make changes** to your code or chat with v0 2. **Visit the same publish card** in your project 3. **Click "Deploy Changes"** to update your production deployment 4. **Your app updates instantly** with zero downtime Each "Deploy Changes" action creates a new deployment that replaces the previous production version, ensuring your users always see the latest version of your application. [Advanced deployment settings](https://v0.app/docs/deployments#advanced-deployment-settings) --------------------------------------------------------------------------------------------- For fine-grained control over your deployment: 1. **Click "View on Vercel"** from your project's publish card 2. **Access the Vercel dashboard** for your deployment 3. **Configure advanced settings** including: ### [Environment variables](https://v0.app/docs/deployments#environment-variables) * Set production environment variables * Configure API keys and secrets * Manage different environments (production, preview, development) ### [Domain management](https://v0.app/docs/deployments#domain-management) * Add custom domains * Configure DNS settings * Set up domain redirects ### [Web analytics and speed insights](https://v0.app/docs/deployments#web-analytics-and-speed-insights) * Track page views and user interactions * Monitor Core Web Vitals and performance metrics ### [Deployment protection](https://v0.app/docs/deployments#deployment-protection) * Enable password protection for your deployment * Restrict access to specific users or teams * Set up deployment previews for testing ### [Monitoring and analytics](https://v0.app/docs/deployments#monitoring-and-analytics) * View deployment analytics * Monitor performance metrics * View error tracking For detailed information about Vercel project settings, see the [Vercel documentation on project configuration](https://vercel.com/docs/projects/project-configuration) . [Troubleshooting](https://v0.app/docs/deployments#troubleshooting) ------------------------------------------------------------------- ### [Common issues](https://v0.app/docs/deployments#common-issues) **Deployment fails:** * **Let v0 try to fix the error** - v0 can often automatically resolve deployment issues * **Go back one version** - If v0 can't fix it, revert to the previous working version * **Re-prompt to avoid the error** - Adjust your prompt to generate code that won't cause deployment issues [Next steps](https://v0.app/docs/deployments#next-steps) --------------------------------------------------------- * [Learn about custom domains](https://v0.app/docs/custom-domains) * [Explore Vercel's advanced features](https://vercel.com/docs) * [Set up monitoring and analytics](https://vercel.com/docs/analytics) * [Configure environment variables](https://vercel.com/docs/environment-variables) [MCP Integrations\ \ Connect and use MCP servers from the Vercel Marketplace directly in v0](https://v0.app/docs/MCP) [Custom domain\ \ Add custom domains to your v0 deployments to give your applications a professional, branded URL.](https://v0.app/docs/custom-domains) --- # Enterprise | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Enterprise ========== Copy page Learn how to manage v0 seats, access, and more in your Vercel Enterprise account. [Managing seats and access](https://v0.app/docs/enterprise#managing-seats-and-access) -------------------------------------------------------------------------------------- To manage v0 seats and grant access in your Vercel account, follow these steps. 1. Log in to your [v0 account](https://v0.app/) . 2. Select your team from the scope selector on the top-left corner. 3. Click on the scope selector again and select **Manage Members**. This navigates you to your Vercel team's members page. You can grant access to team members via an invite by clicking the three dots to the right of their role. ### [Assign or revoke access](https://v0.app/docs/enterprise#assign-or-revoke-access) * To assign access: Find the team member in the list and assign the desired v0 role. * To revoke access: Find the team member in the list and choose "No access". ### [Choosing the right role](https://v0.app/docs/enterprise#choosing-the-right-role) v0 has a role and access control system that is separate from your team roles in Vercel: * **v0 Builder**: v0 Creator access + can create deployments and manage integrations and environment variables. * **v0 Creator**: Can create chats + projects, add sources, and build in v0. * **v0 Viewer**: View-only access to collaborate on chats with other users. For Vercel team management: * **Viewer**: Assign the Viewer role with v0 access for most users. * **Owner**: Use the Owner role only for admins who need full control. [Activating your account](https://v0.app/docs/enterprise#activating-your-account) ---------------------------------------------------------------------------------- To use v0 with your Enterprise plan: Make sure you're logged into the correct Vercel account before accepting the invite. 1. Accept the invite. 2. Switch to your Enterprise team using on the v0 navigation bar. [Configuring single sign-on (SSO)](https://v0.app/docs/enterprise#configuring-single-sign-on-sso) -------------------------------------------------------------------------------------------------- Once v0 is enabled for your team, **admins** can manage access using [Directory Sync](https://vercel.com/docs/directory-sync) and [Access Groups](https://vercel.com/docs/rbac/access-groups) to provision v0 roles from your identity provider (IdP). 1. Go to `/~/settings/access-groups` to create or edit an **Access Group** with v0 enabled. 2. Map a **Directory Sync** group (e.g. from Okta SCIM) to the Access Group you created. 3. Everyone in the synced group will automatically receive the v0 access configured in that Access Group. ### [Configure Team Access and v0 roles in one Access Group](https://v0.app/docs/enterprise#configure-team-access-and-v0-roles-in-one-access-group) You can assign **Team roles**, **Team permissions**, **Project roles**, and **v0 roles** in the same **Access Group** so that a single **IdP group** grants both team and v0 permissions. Team access defined within an Access Group applies when the Access Group is managed via **Directory Sync**. 1. Create an Access Group in `/~/settings/access-groups`. Assign the Team role/permissions and v0 role(s). 2. Map your IdP group to this Access Group via Directory Sync. Members mapped to the group default to **Contributor** unless another mapping assigns a different Team role. 3. All members in the synced group will automatically receive the v0 access and team role configured in the Access Group. The **Owner** team role cannot be configured within an Access Group. To assign a v0 role in addition to the **Owner** team role, configure the following mappings: * Directory group A - map to Team role **Owner** via Directory Sync. * Directory group B - map to an Access Group that assigns the desired **v0 role**. [Learn more about v0's enterprise security features](https://v0.app/docs/security#enterprise-security-features) [Privacy settings](https://v0.app/docs/enterprise#privacy-settings) -------------------------------------------------------------------- ### [Chats](https://v0.app/docs/enterprise#chats) You can set chats to **Private**, **Team**, **Unlisted**, or **Public**. * **Private**: Only you can view the conversation and any generated content. * **Public**: Visible to others in your workspace. Use for collaboration or shared learning. * **Team / Unlisted**: Control access by choosing who can view or edit the chat. Use the sharing dialog to manage access levels for each chat. ### [Projects](https://v0.app/docs/enterprise#projects) Projects can also be **Private** or **Public**. * **Private**: Only visible to you. Code and UI generations stay hidden from others. Useful for sensitive or in-progress work. * **Public**: Visible to selected teammates or your entire organization. Useful for collaboration or shared learning. [Community\ \ Manage your shared community projects.](https://v0.app/docs/community) [Instructions\ \ Create and apply custom instructions to guide v0's responses](https://v0.app/docs/instructions) --- # PRD design | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu PRD design ========== Copy page Create a Product Requirements Document (PRD) with v0. A **Product Requirements Document (PRD)** outlines what you're building, who it's for, and how it should work. It bridges the gap between product ideas and technical implementation. v0 can help turn high-level product ideas into detailed technical specs. In addition to writing code, it supports technical planning by breaking down features, drafting API specs, and designing database schemas. [Getting started](https://v0.app/docs/prd-design#getting-started) ------------------------------------------------------------------ Start by providing clear project context: product type (web, mobile, API), key features, constraints, dependencies, and required integrations. You can include text, images, or code snippets. ### [Breaking down product features](https://v0.app/docs/prd-design#breaking-down-product-features) v0 can decompose product features into smaller, manageable technical components. ### [API specifications](https://v0.app/docs/prd-design#api-specifications) v0 can help design complete API specifications based on your product requirements, including: * Boilerplate code for Route handlers in Next.js. * Request formatting and requirements. ### [Database schema design](https://v0.app/docs/prd-design#database-schema-design) v0 can design high-level database schemas that align with your product requirements, usually generated in `mermaid` format as entity-relationship diagrams. [Best practices](https://v0.app/docs/prd-design#best-practices) ---------------------------------------------------------------- Use v0 as your AI collaborator to iteratively develop clear, detailed product requirements. Start broad, then refine through guided prompts. Here's a recommended workflow: 1. **Start with high-level requirements**: Outline the core product goals and functionality. 2. **Generate initial specs**: Ask v0 to draft the first version of the technical details. 3. **Review and refine**: Spot gaps, unclear areas, or missing edge cases. 4. **Prompt for updates**: Use feedback to guide v0 in refining the output. 5. **Finalize**: Consolidate the results into a complete, usable specification. [Validating results](https://v0.app/docs/prd-design#validating-results) ------------------------------------------------------------------------ Validate the outputs v0 generates to ensure they meet your project needs. You can also prompt v0 to review its own results against your requirements. Use the following criteria to guide validation: * **Completeness**: Do the technical specifications cover all the requirements outlined in the PRD? * **Feasibility**: Are the proposed solutions realistic given your technical and timeline constraints? * **Consistency**: Are the technical specifications aligned with each other and with existing systems or architecture? * **Clarity**: Are the instructions clear and easy for developers to follow? * **Testability**: Can each part of the implementation be tested effectively? [Prototyping\ \ Accelerate your product development lifecycle with interactive prototypes.](https://v0.app/docs/prototyping) --- # GitHub | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu GitHub ====== Copy page Connect your GitHub repositories to v0 to automatically create projects and track changes. v0 allows you to connect your projects with GitHub for: * **Version Control:** Track and revert code changes * **Collaboration:** Work on the same codebase together * **CI/CD:** Deploy automatically when pushing to Git * **Pull Requests:** Review changes before merging [Connecting to GitHub](https://v0.app/docs/github#connecting-to-github) ------------------------------------------------------------------------ You can connect GitHub to v0 from a chat thread or project. ### [From a project](https://v0.app/docs/github#from-a-project) ![GitHub integration prompt from chat UI](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fgithub-settings.png&w=3840&q=75)![GitHub integration prompt from chat UI](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fgithub-settings.png&w=3840&q=75) 1. Go to your **Project Settings** and click **Connect to GitHub**. This will open a modal. 2. Enter your repository name and complete the connection. ### [From a chat](https://v0.app/docs/github#from-a-chat) ![GitHub integration prompt from chat UI](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fchat-github.png&w=1920&q=75)![GitHub integration prompt from chat UI](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fchat-github.png&w=1920&q=75) 1. Click the **GitHub icon** in a chat thread to open the menu. 2. Choose your Git scope and enter the repository name. 3. Click **Create Repository** to link the chat. You'll now see the connected repo. To push changes, open the GitHub window and choose a branch. By default, v0 pushes to the `main` branch. You can select or create a different one. [External APIs\ \ Build full-stack applications by calling external APIs with environment variables.](https://v0.app/docs/external-apis) [MCP Integrations\ \ Connect and use MCP servers from the Vercel Marketplace directly in v0](https://v0.app/docs/MCP) --- # OpenAI Codex | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu OpenAI Codex ============ Copy page Use v0 inside OpenAI Codex to run prompts from the terminal. The Codex CLI lets you run prompts from the terminal using the `v0-1.5-md` model over the v0 API. [Prerequisites](https://v0.app/docs/openai-codex#prerequisites) ---------------------------------------------------------------- * You have Node.js installed. [Install Codex CLI](https://v0.app/docs/openai-codex#install-codex-cli) ------------------------------------------------------------------------ Install Codex globally: npm install -g @openai/codex [Set your API key](https://v0.app/docs/openai-codex#set-your-api-key) ---------------------------------------------------------------------- Set your v0 API key as an environment variable: export V0_API_KEY="your-api-key-here" You can add this line to your shell profile (e.g. `~/.zshrc` or `~/.bashrc`) for persistence. [Configure Codex](https://v0.app/docs/openai-codex#configure-codex) -------------------------------------------------------------------- Create a config file at `~/.codex/config.toml`: model_provider = "v0" model = "v0-1.5-md" [model_providers.v0] name = "v0" base_url = "https://api.v0.dev/v1" wire_api = "chat" env_key = "V0_API_KEY" Make sure the `env_key` matches the `V0_API_KEY` environment variable. [Run Codex](https://v0.app/docs/openai-codex#run-codex) -------------------------------------------------------- You can now run Codex using the `v0-1.5-md` model: codex This will open a prompt in your terminal where you can interact with the model. By using our API, you agree to our [API Terms](https://vercel.com/legal/api-terms) . [Cursor\ \ Use v0 inside Cursor to build with natural language.](https://v0.app/docs/cursor) [Zed\ \ Use v0 inside Zed.](https://v0.app/docs/zed) --- # Projects | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Projects ======== Copy page Projects in v0 provide a way to organize your work by grouping multiple chats into a single, cohesive unit. This allows you to apply custom instructions and settings across all chats within the project, streamlining your workflow. [Creating a project](https://v0.app/docs/projects#creating-a-project) ---------------------------------------------------------------------- To create a new project, follow these steps: 1. From the v0 sidebar, click on the project menu option. 2. Select "New Project" and provide a name for your project. You can now start new chats directly within this project. [Adding an existing chat to a project](https://v0.app/docs/projects#adding-an-existing-chat-to-a-project) ---------------------------------------------------------------------------------------------------------- If you have an existing chat that you'd like to add to a project, you can do so using the breadcrumbs at the top of the chat window. 1. Open the chat you want to add to a project. 2. Click on the breadcrumb navigation at the top of the page. 3. Select the project you want to move the chat to. [Project settings](https://v0.app/docs/projects#project-settings) ------------------------------------------------------------------ Each project has its own set of settings that allow you to customize its behavior and provide context for the AI. To access these settings, navigate to your project page and click on the settings icon. This is the central place to manage project-specific configurations that apply to all chats within it. ### [Overview](https://v0.app/docs/projects#overview) The overview tab provides a high-level summary of your project. Here, you can see the project's name, its connection status with your Vercel account, and whether it's linked to a GitHub repository. This is the main dashboard for your project's state, allowing you to quickly connect or disconnect services. ### [Integrations](https://v0.app/docs/projects#integrations) Connect your project to various third-party services to give your AI assistant access to external data and functionality. Available integrations include databases like Upstash for Redis and Neon for Serverless Postgres, backend services like Supabase, and AI model providers. This allows the AI to interact with these services directly, for example, to query a database or use a specific AI model for a task. ### [Environment variables](https://v0.app/docs/projects#environment-variables) Securely store sensitive information like API keys, tokens, and other credentials. These variables are encrypted and made available to the AI within the project's scope, so you don't have to expose them directly in your prompts. You can manage your variables from this tab, adding or removing them as needed. ### [Rules](https://v0.app/docs/projects#rules) The Rules section allows you to provide durable, project-level context to v0. Use this to tailor v0's responses to your specific project needs. * **Instructions**: Write detailed instructions, guidelines, or preferences for v0 to follow across all chats in the project. For example, you could specify "This project uses Next.js with the App Router and Tailwind CSS." * **Sources**: Upload files (like source code, design documents, or API specifications) that v0 can reference when generating responses. This ensures v0's output is tailored to your project's specific codebase and requirements. Rules are different from [Instructions](https://v0.app/docs/instructions) —Rules are project-specific context and guidelines, while Instructions are account-level and can be used across any project. [Project Errors](https://v0.app/docs/projects#project-errors) -------------------------------------------------------------- * **Syntax Errors**: Appear when there's invalid JavaScript/TypeScript syntax. Example: `Missing closing brackets, semicolons, or quotes`. The UI also has a **fix with v0** button where it displays the preview. * **Import Errors**: Occur when imports are incorrect or missing. Example: `Error: Cannot find module '@/components/ui/button'`. Solution: Ensure the path is correct and the component exists. * **Runtime Errors**: Happen during code execution. Often appear in the browser console or terminal. Example: `TypeError: Cannot read property 'x' of undefined`. ### [Community](https://v0.app/docs/projects#community) If you've built something you're proud of, you can opt-in to publish your project to the v0 Community. Once submitted and approved, it will be showcased in the gallery for other users to see and learn from. This is a great way to share your creations and get feedback from the community. [Instructions\ \ Create and apply custom instructions to guide v0's responses](https://v0.app/docs/instructions) [Pricing\ \ Understand the v0 plans, pricing, and usage limits.](https://v0.app/docs/pricing) --- # Instructions | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Instructions ============ Copy page Create and apply custom instructions to guide v0's responses Instructions are reusable prompts you can save to your account and apply on-demand when chatting with v0. Use them to customize v0's behavior for specific tasks or workflows. ![Instructions dialog in v0](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Finstructions.png&w=1920&q=75)![Instructions dialog in v0](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Finstructions.png&w=1920&q=75) [Built-in presets](https://v0.app/docs/instructions#built-in-presets) ---------------------------------------------------------------------- v0 includes two preset instructions: * **Be Concise** - v0 will provide shorter, more direct responses * **Plan Mode** - Before implementing any code changes, v0 creates a detailed plan outlining the approach, steps, and potential challenges, then asks for your approval before proceeding [Creating custom instructions](https://v0.app/docs/instructions#creating-custom-instructions) ---------------------------------------------------------------------------------------------- Create your own instructions for common workflows or preferences: 1. Click **Prompt Tools** in the prompt bar 2. Select **Instructions** 3. Click **New Instruction** 4. Add a **Title** (e.g., "Mobile first") 5. Add the **Instruction** content (e.g., "Always design for mobile screens first, then adapt the layout for larger screens") 6. Click **Add** Your instruction is now saved to your account and available across all your projects. [Applying instructions](https://v0.app/docs/instructions#applying-instructions) -------------------------------------------------------------------------------- ### [From the prompt bar menu](https://v0.app/docs/instructions#from-the-prompt-bar-menu) 1. Click **Prompt Tools** in the prompt bar 2. Select **Instructions** 3. Toggle the instructions you want to apply 4. Send your prompt ### [Using @ mentions](https://v0.app/docs/instructions#using--mentions) You can apply instructions directly in your prompt using the `@` syntax: @Plan Mode add animation support to this component v0 will apply the instruction to that specific message. [Instructions vs Rules](https://v0.app/docs/instructions#instructions-vs-rules) -------------------------------------------------------------------------------- | Feature | Instructions | Rules | | --- | --- | --- | | Scope | Account-level | Project-level | | Use case | Personal preferences | Project-specific context | * **Instructions** are saved to your v0 account and can be applied to any project when you need them * **Rules** are specific to a project and provide context and guidelines for that project [Learn more about project rules](https://v0.app/docs/projects#rules) [Enterprise\ \ Learn how to manage v0 seats, access, and more in your Vercel Enterprise account.](https://v0.app/docs/enterprise) [Projects\ \ Next Page](https://v0.app/docs/projects) --- # Screenshots and Files | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Screenshots and Files ===================== Copy page Turn your mockups or wireframes into high-fidelity designs. The v0 attachment feature allows users to upload or drag and drop files into the chat. v0 analyzes these files and generates code to replicate the design interface shown, making it useful for turning mockups into high-fidelity designs, and processing code or data. [How it works](https://v0.app/docs/screenshots#how-it-works) ------------------------------------------------------------- Upload a file by clicking the attachment icon or dragging the file into the chat. If it's a screenshot,v0 will analyze the layout, colors, and components in the image, then generate code that closely replicates the design. It also infers likely functionality based on visible UI elements. ![File option under attachment icon](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fscreenshot.png&w=3840&q=75)![File option under attachment icon](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fscreenshot.png&w=3840&q=75) [Best practices](https://v0.app/docs/screenshots#best-practices) ----------------------------------------------------------------- * Use high-resolution screenshots for better accuracy. * Include the full interface for more context, or crop tightly if focusing on a specific area. * Add instructions to help clarify behavior, flows, or edge cases. * Consider using a [Figma file](https://v0.app/docs/figma) for better results. v0 defaults to using [shadcn/ui](https://ui.shadcn.com/) components. While v0 has knowledge of other component libraries and frameworks, using **Next.js**, **Tailwind CSS**, and **shadcn/ui** will help it generate the better results. [Text Prompting\ \ Use text prompting to create initial UIs and ask technical questions with natural language.](https://v0.app/docs/text-prompting) [Figma\ \ Turn your Figma files into high-fidelity UIs.](https://v0.app/docs/figma) --- # Images and videos | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Images and videos ================= Copy page Add images and videos to your application by uploading them in the chat or copying and pasting them directly. You can enhance your v0 generations by adding images and videos to provide visual context or media assets for your application. v0 supports uploading files directly into the chat or copying and pasting images from your clipboard. [Uploading media files](https://v0.app/docs/images-and-videos#uploading-media-files) ------------------------------------------------------------------------------------- ### [Using the attachment button](https://v0.app/docs/images-and-videos#using-the-attachment-button) 1. Click the **attachment icon** in the chat input area 2. Select your image or video file from your device 3. The file will be uploaded and displayed in the chat 4. Add your prompt describing what you want to build with this media ### [Drag and drop](https://v0.app/docs/images-and-videos#drag-and-drop) You can also drag and drop media files directly into the chat area: 1. Select your image or video file from your file explorer 2. Drag it over the chat interface 3. Drop it when you see the upload indicator ### [Copy and paste](https://v0.app/docs/images-and-videos#copy-and-paste) For quick additions, you can copy images directly from other applications and paste them into the chat: 1. Copy an image from any application (browser, design tool, etc.) 2. Use `Cmd` + `V` (Mac) or `Ctrl` + `V` (Windows/Linux) to paste [Supported file types](https://v0.app/docs/images-and-videos#supported-file-types) ----------------------------------------------------------------------------------- ### [Images](https://v0.app/docs/images-and-videos#images) * **JPEG/JPG** - Best for photographs and complex images * **PNG** - Ideal for screenshots, graphics with transparency * **GIF** - Animated images and simple graphics * **WebP** - Modern web-optimized format * **SVG** - Vector graphics and icons ### [Videos](https://v0.app/docs/images-and-videos#videos) * **MP4** - Most common video format * **MOV** - Apple QuickTime format * **AVI** - Windows video format * **WebM** - Web-optimized video format [Use Cases](https://v0.app/docs/images-and-videos#use-cases) ------------------------------------------------------------- ### [Product galleries and catalogs](https://v0.app/docs/images-and-videos#product-galleries-and-catalogs) Add product images to create rich e-commerce experiences: Build a product catalog page that displays these product images in a responsive grid. [Open in](https://v0.app/?q=Build%20a%20product%20catalog%20page%20that%20displays%20these%20product%20images%20in%20a%20responsive%20grid.) ### [Media players and video content](https://v0.app/docs/images-and-videos#media-players-and-video-content) Include video files for media-rich applications: Create a video player component that can display this video with custom controls. [Open in](https://v0.app/?q=Create%20a%20video%20player%20component%20that%20can%20display%20this%20video%20with%20custom%20controls.) ### [User avatars and profiles](https://v0.app/docs/images-and-videos#user-avatars-and-profiles) Add user profile images and avatars: Build a user profile page that displays this avatar image and allows users to upload their own. [Open in](https://v0.app/?q=Build%20a%20user%20profile%20page%20that%20displays%20this%20avatar%20image%20and%20allows%20users%20to%20upload%20their%20own.) ### [Hero sections and banners](https://v0.app/docs/images-and-videos#hero-sections-and-banners) Incorporate images into landing pages and hero sections: Create a hero section using this background image with overlay text and call-to-action buttons. [Open in](https://v0.app/?q=Create%20a%20hero%20section%20using%20this%20background%20image%20with%20overlay%20text%20and%20call-to-action%20buttons.) [Limits](https://v0.app/docs/images-and-videos#limits) ------------------------------------------------------- File size limits vary depending on where you're uploading and your subscription tier: | Upload Type | Free Users | Premium/Team/Business/Enterprise Users | | --- | --- | --- | | Chat attachments | 5 MB | 20 MB | | Project rules | 10 MB | 50 MB | [Best practices](https://v0.app/docs/images-and-videos#best-practices) ----------------------------------------------------------------------- * Use **high-resolution images** (at least 1024px wide) for better display quality * Optimize images for web use to ensure fast loading times * Combine media with clear instructions to get better results [Troubleshooting](https://v0.app/docs/images-and-videos#troubleshooting) ------------------------------------------------------------------------- If you're having trouble uploading files: * Check that your file is under the size limit * Ensure the file format is supported * Try refreshing the page and uploading again If v0 isn't properly integrating your media: * Provide more specific instructions about how you want the media displayed * Specify the component type (gallery, player, background, etc.) * Include layout preferences (grid, carousel, single display) By leveraging images and videos in your v0 workflow, you can create rich, media-enhanced applications that provide engaging user experiences. [Design systems\ \ Create a custom registry to use your design system with v0 and Shadcn.](https://v0.app/docs/design-systems) [Versions\ \ Next Page](https://v0.app/docs/versions) --- # Sharing | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Sharing ======= Copy page Share your v0 chat with others to showcase your prompt history or to collaborate on generating components. This allows for seamless teamwork and feedback. [How to share a chat](https://v0.app/docs/sharing#how-to-share-a-chat) ----------------------------------------------------------------------- To share your chat, click on the **Share** button located at the top right of the chat interface. This will open the sharing configuration dialog. ![Share button](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fsharing.png&w=1920&q=75)![Share button](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fsharing.png&w=1920&q=75) From here, you can configure who has access to this chat. [Sharing options](https://v0.app/docs/sharing#sharing-options) --------------------------------------------------------------- When you decide to share your chat, you are presented with several options to control who has access. If you are on a Team or Enterprise plan, you can invite individual team members to view or interact with the chat. Additionally, you can set the visibility for the whole chat. * **Private**: This is the default setting. Only people you invite can access the chat. * **Everyone in the team**: If you are on a Team or Enterprise plan, you can share the chat with everyone in your Vercel team. * **Unlisted**: Anyone with the link can access the chat. It will not be indexed by search engines. * **Public**: Anyone can view the chat. It may be indexed by search engines and appear in public galleries. [Access permissions](https://v0.app/docs/sharing#access-permissions) --------------------------------------------------------------------- Once you've chosen your sharing option, you can configure the level of access others have. * **Can view**: Users with this permission can see the entire chat history but cannot make any changes. * **Can edit**: Users with this permission can actively participate in the chat, adding and editing prompts. This is ideal for direct collaboration. ### [Recommended collaboration workflow](https://v0.app/docs/sharing#recommended-collaboration-workflow) While direct edit access is available for close collaboration, we recommend a workflow that encourages individual exploration and preserves the integrity of the original chat. 1. **Share with "Can view" permissions**: Start by sharing your chat with "Can view" access. This allows your collaborators to see the full prompt history and the generated components without being able to make direct changes. 2. **Collaborators Duplicate the Chat**: Your collaborators can then "Duplicate" the chat. This creates a personal copy of the entire chat history in their own account. 3. **Iterate Independently**: In their duplicated version, they can experiment freely—modifying prompts, trying different generation settings, and exploring new ideas without affecting the original chat. This "View and Duplicate" workflow is the ideal way to collaborate on v0 projects. It prevents a "too many cooks in the kitchen" scenario, where multiple people editing the same chat can lead to a confusing or messy history. It empowers team members to build upon your work in a non-destructive way, with each person maintaining their own clear line of iteration. When a collaborator has a version they're happy with, they can share their duplicated chat back for review. [Custom domain\ \ Add custom domains to your v0 deployments to give your applications a professional, branded URL.](https://v0.app/docs/custom-domains) [Templates\ \ Share your v0 creations with the community by publishing them as templates. Templates appear in your public profile and can be forked by other users.](https://v0.app/docs/templates) --- # Design mode | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Design mode =========== Copy page Design mode is a new way to design your app. Design mode provides an intuitive, visual way to build and refine your app's user interface. It allows you to select any element on the page, inspect its properties, and make precise adjustments using either natural language prompts or a comprehensive design panel. ### [Enabling design mode](https://v0.app/docs/design-mode#enabling-design-mode) You can enable Design Mode in a couple of ways: * **Keyboard Shortcut**: Press `Option + D`. * **Using the UI**: Click on the **Design** tab at the top of the v0 interface. ![Design mode button](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fdesign-mode.png&w=1920&q=75)![Design mode button](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fdesign-mode.png&w=1920&q=75) Once enabled, your cursor will act as a selection tool, allowing you to highlight and select elements on the page. ### [Selecting elements](https://v0.app/docs/design-mode#selecting-elements) With Design Mode active, as you move your cursor over your application's preview, different elements will be highlighted. This allows you to pinpoint the exact component you wish to modify. Simply click on a highlighted element to select it. ![Selecting an element](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fdesign-element.png&w=3840&q=75)![Selecting an element](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fdesign-element.png&w=3840&q=75) ### [Modifying elements](https://v0.app/docs/design-mode#modifying-elements) Once an element is selected, you have two primary ways to modify it: #### [1\. Prompting (for complex changes)](https://v0.app/docs/design-mode#1-prompting-for-complex-changes) For more complex or structural changes, you can use the prompt input. Describe the changes you want to make in plain English. For example, "add a button next to this text" or "make this a three-column grid". This is the most powerful way to leverage v0's generative capabilities. ![Prompting v0 while in design mode](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fdesign-prompt.png&w=3840&q=75)![Prompting v0 while in design mode](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fdesign-prompt.png&w=3840&q=75) #### [2\. The design panel (for fine-tuning)](https://v0.app/docs/design-mode#2-the-design-panel-for-fine-tuning) For fine-grained visual adjustments, the Design Panel offers a suite of controls. This is ideal for tweaking styles to perfection. The panel includes controls for: ![Design mode enabled](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fcontrols.png&w=3840&q=75)![Design mode enabled](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fcontrols.png&w=3840&q=75) * **Typography**: Adjust font family, size, weight, line height, letter spacing, alignment, and text decoration. * **Color**: Change the text color. * **Background**: Set the background color. * **Layout**: Control margin and padding for all sides. * **Border**: Define border color, style, and width. * **Appearance**: Modify opacity and corner radius. * **Shadow**: Add or customize box shadows. * **Content**: Directly edit the text content of an element. ### [Key features and benefits](https://v0.app/docs/design-mode#key-features-and-benefits) * **Tailwind Native**: Design mode is built on top of Tailwind CSS. It seamlessly integrates with your existing `tailwind.config.js` file, pulling in your design tokens (colors, spacing, fonts, etc.) so you can stay on-brand. * **Free Visual Tweaks**: Making adjustments in the Design Panel does **not** consume any of your v0 tokens. Feel free to experiment and fine-tune your designs without worrying about usage limits. Prompt-based changes will still use tokens. ### [Saving your work](https://v0.app/docs/design-mode#saving-your-work) Once you are happy with your changes, click the save button at the bottom of the preview to commit your edits. ![Save button](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fdesign-save.png&w=3840&q=75)![Save button](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fdesign-save.png&w=3840&q=75) [Code editing\ \ Edit v0's code output and target inline code generation.](https://v0.app/docs/code-editing) [Design systems\ \ Create a custom registry to use your design system with v0 and Shadcn.](https://v0.app/docs/design-systems) --- # Versions | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Versions ======== Copy page Each time v0 updates a code block from a message, it creates a new version. Non-message actions (such as editing code or modifying files directly) do not generate new versions. ![Viewing a previous version of a generation in v0](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Flight%2Fversions.png&w=1920&q=75)![Viewing a previous version of a generation in v0](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fdark%2Fversions.png&w=1920&q=75) Restoring an old version creates a new, most recent version using the restored code to maintain a linear version history. When deploying, the latest version of the code is used. If you want to deploy a previous version, you can restore it and then deploy. Once more than one version has been created, you can switch between versions using the dropdown in the top-right corner of the interface. This dropdown shows how many versions have been created (for example, **v2**). You can also scroll through your chat with and click Restore next to any earlier generation. [Images and videos\ \ Add images and videos to your application by uploading them in the chat or copying and pasting them directly.](https://v0.app/docs/images-and-videos) [AI models\ \ Add AI functionality to your v0 projects by integrating AI models and platforms.](https://v0.app/docs/ai-models) --- # Design systems | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Design systems ============== Copy page Create a custom registry to use your design system with v0 and Shadcn. You can set up a custom design system to use with Tailwind and `shadcn/ui` for high-fidelity UIs that match your brand. [Tailwind config](https://v0.app/docs/design-systems#tailwind-config) ---------------------------------------------------------------------- v0 supports tailwind configs and `globals.css` files, you can use custom utility classes and CSS variables in your generations. [Shadcn components](https://v0.app/docs/design-systems#shadcn-components) -------------------------------------------------------------------------- v0 uses [Shadcn/ui](https://ui.shadcn.com/) as its default component system to generate high-quality, customizable UIs. `shadcn/ui` is not a component library but rather a toolkit for building one. Unlike traditional component libraries, `shadcn/ui` gives you direct access to the source code. This works well with AI generated code, as it allows you to customize the components to fit your design system. Although v0 defaults to `shadcn/ui`, it is still capable of generating code using other component libraries, styling tools, and even frameworks. [What is a registry?](https://v0.app/docs/design-systems#what-is-a-registry) ----------------------------------------------------------------------------- A registry is a distribution specification designed to pass context from your design system to AI Models. For example, the [Shadcn Registry](https://ui.shadcn.com/docs/registry) provides a structured way to share your components, blocks, and design tokens with v0. It lets v0 generate prototypes that match your design system, without manual overrides. [How to create a registry](https://v0.app/docs/design-systems#how-to-create-a-registry) ---------------------------------------------------------------------------------------- To get started, you can use [Vercel's Registry Starter Template](https://vercel.com/templates/next.js/shadcn-ui-registry-starter) , built with `shadcn/ui`. [Customizing the registry](https://v0.app/docs/design-systems#customizing-the-registry) ---------------------------------------------------------------------------------------- To customize the registry to match your design system, you must style the registry using your design systems tokens (e.g. colors, fonts, etc). The Registry Template assumes you follow the `shadcn/ui` CSS variables standard, which can be found in the [documentation](https://ui.shadcn.com/docs/theming#list-of-variables) . ### [Colors](https://v0.app/docs/design-systems#colors) You can overwrite the colors in the [`src/app/tokens.css`](https://github.com/vercel/registry-starter/blob/main/src/app/tokens.css) file with your custom theme ensuring all the variable names remain unchanged. You may choose from a few default themes on [`ui.shadcn.com/themes`](https://ui.shadcn.com/themes) or utilize free, third-party tools such as [`tweakcn.com`](https://tweakcn.com/) to design your own. ### [Fonts](https://v0.app/docs/design-systems#fonts) To update the font, modify [`src/app/layout.tsx`](https://github.com/vercel/registry-starter/blob/main/src/app/layout.tsx) and import your chosen font using `next/font/google`. `shadcn/ui` and Tailwind are preconfigured to use the `--font-sans`, `--font-mono`, and `--font-serif` variables. See the [Next.js documentation](https://nextjs.org/docs/app/getting-started/fonts) to learn more about custom fonts. You can also use `@font-face` to import custom fonts: @font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; src: url('https://fonts.gstatic.com/s/montserrat/v15/JTUSjIg1_i6t8kCHKm45xW5rygbi49c.woff2') format('woff2'), url('https://fonts.gstatic.com/s/montserrat/v15/JTUSjIg1_i6t8kCHKm45xW5rygbj49c.woff') format('woff'); } @font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700; src: url('https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_dJE3gnD-w.woff2') format('woff2'), url('https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_dJE3g3D_w.woff') format('woff'); } If you introduce new `*.css` files, ensure they are imported in all of the `layout.tsx` and any layout in your [`/src/v0/`](https://github.com/vercel/registry-starter/blob/main/src/v0) directory. ### [Custom components](https://v0.app/docs/design-systems#custom-components) The Registry template comes with all the default `shadcn/ui` [primitive UI components](https://ui.shadcn.com/docs/components) and some prebuilt, example components. v0 automatically uses `shadcn/ui` components in your generation, so there is no need to import the UI primitives into v0. If you customize the underlying `shadcn/ui` components in your registry, you may see unexpected v0 generations. v0 is specifically trained on the default implementations of the `shadcn/ui` components and may struggle with any customizations. To use custom UI primitives and components, you must follow a few steps to ensure it's properly added to your Registry. 1. Add the new UI primitive or component code to your registry source code. 2. Add a new `registry-item` in [`registry.json`](https://github.com/vercel/registry-starter/blob/main/registry.json) . If you want to ensure the Registry UI also gets updated, you must also add a new demo to [`src/app/demo/[name]/index.tsx`](https://github.com/vercel/registry-starter/blob/main/src/app/demo/%5Bname%5D/index.tsx) following the structure in [`{ui|components|blocks}/`](https://github.com/vercel/registry-starter/tree/main/src/app/demo/%5Bname%5D) directory. ### [Custom blocks](https://v0.app/docs/design-systems#custom-blocks) The Registry template comes with three example blocks: 1. A blank application 2. A dashboard application 3. A store application These application blocks serve as a good starting point for prototypes. Depending on your use case, you can create custom blocks to meet your team's needs. To add or edit existing blocks: 1. Open or create `src/app/demo/[name]/blocks` and modify its pages or components as you would in a standard Next.js app. * Sometimes the layout needed in the registry differs from the layout you want to include in the registry. In such cases, best practice is to create such collateral in [`/src/v0/`](https://github.com/vercel/registry-starter/blob/main/src/v0) to reference in your `registry.json` as shown in next step. 2. Add a new `registry-item` to the `registry.json` to represent your new block. Make sure the entry follows the `registry-item` [specification](https://ui.shadcn.com/docs/registry/registry-item-json) 1. Specify other registry dependencies by using the `registryDependencies` property * For example, a block might reference smaller, more specific UI primitives or components from your `registry.json`. 2. Include all relevant files in the `files` property * The `path` property points to the local file path of your component/page * The `target` property specifies where the file will be placed in v0 during the import 3. Deploy your updated registry. 4. Navigate to your Registry's `/registry/[name]` page to view your new block with an `Open in v0` button. [Deploying your registry](https://v0.app/docs/design-systems#deploying-your-registry) -------------------------------------------------------------------------------------- Before deploying it, the template contains a [`registry.json`](https://github.com/vercel/registry-starter/blob/main/registry.json) file which exposes the default components/blocks in the registry. The `baseUrl` and the full route dependency URLs must be replaced with your deployed URL. [Using a registry in v0](https://v0.app/docs/design-systems#using-a-registry-in-v0) ------------------------------------------------------------------------------------ To use your registry, you can open all UI primitives, components, and blocks using the `Open in v0` button. This will make an API call to [v0.app](https://v0.app/) with the necessary metadata, file content, and styles of the respective UI primitive, component, or block. This allows for v0 to have a starting point and context on your specific design system. [Integrating the registry with AI code editors](https://v0.app/docs/design-systems#integrating-the-registry-with-ai-code-editors) ---------------------------------------------------------------------------------------------------------------------------------- To integrate your Registry with AI code editors like Cursor and Windsurf, you can use the following MCP. { "mcpServers": { "shadcn": { "command": "npx", "args": ["-y", "shadcn@canary", "registry:mcp"], "env": { "REGISTRY_URL": "https://registry-starter.vercel.app/r/registry.json" } } } } Using a Registry with MCP allows your engineers and AI editors to have centralized, AI-native context on your design system and components. [Design mode\ \ Design mode is a new way to design your app.](https://v0.app/docs/design-mode) [Images and videos\ \ Add images and videos to your application by uploading them in the chat or copying and pasting them directly.](https://v0.app/docs/images-and-videos) --- # Zed | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Zed === Copy page Use v0 inside Zed. v0 integrates directly into [Zed](https://zed.dev/) , letting you generate full-stack applications from natural language and image input, without ever leaving your editor. To get started: 1. [Create a v0 API key](https://v0.app/chat/settings/keys) . 2. In Zed, open your settings and find the OpenAI configuration. 3. Replace the default API URL with the following: "language_models": { "openai": { "api_url": "https://api.v0.dev/v1", "version": "1" } } [OpenAI Codex\ \ Use v0 inside OpenAI Codex to run prompts from the terminal.](https://v0.app/docs/openai-codex) [Full-stack apps\ \ Build full-stack apps with v0.](https://v0.app/docs/full-stack-apps) --- # Vercel Integration | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Vercel Integration ================== Copy page How v0 and Vercel work in tandem. Vercel is a cloud platform that makes it easy to build, deploy, and scale modern web applications. Vercel enables you to deploy your v0 applications with a single click. [Learn more about Vercel](https://vercel.com/docs) [How do v0 and Vercel accounts differ?](https://v0.app/docs/vercel-integration#how-do-v0-and-vercel-accounts-differ) --------------------------------------------------------------------------------------------------------------------- They’re one and the same - v0 accounts are just Vercel accounts. Both share the concept of accounts and teams, where you use each through your account, and manage (and chats in v0's case) within the teams you are a member of. Where v0 differs is that you can also create chats and projects in your account rather than only within teams. This is your Personal scope, which has access to either the v0 Free or v0 Premium plans. Most of your account details can be managed from your [Vercel account settings](https://vercel.com/account/settings) (e.g. account email). Settings within v0 pertain almost exclusively to v0, with the exception of some, such as billing items (payment methods and invoices are shared with Vercel) and your [default team setting](https://v0.app/chat/settings/workspace) (for Personal v0 scopes), which is linked to its respective [Vercel setting](https://vercel.com/account/settings) . [What is a Vercel project, and how does v0 connect to it?](https://v0.app/docs/vercel-integration#what-is-a-vercel-project-and-how-does-v0-connect-to-it) ---------------------------------------------------------------------------------------------------------------------------------------------------------- Projects on Vercel represent applications that you have deployed to the Vercel platform. The first time you deploy a v0 chat, a corresponding Vercel project will be automatically created. v0 integrates with Vercel projects in several ways: * **Direct Deployment:** Click the "Publish" button in v0 to deploy your Code Project directly to Vercel. This creates a new Vercel project or updates an existing one. * **Environment Variables:** When you add Environment variables directly via v0’s Vars section or integrations (Supabase, Stripe, etc.) via the **Connect** section, the environment variables are automatically made available to your app both in the v0 editor and when deployed to Vercel. This works both ways - environment variables added to the Vercel project will also be available to the connected v0 chat. This means your app can use these integrations immediately while you're building and testing in v0, not just after deployment. The seamless experience lets you develop with live integrations right in the chat interface. * The v0 preview window can only access variables from the Development environment. * **GitHub Integration:** v0 can also connect to a GitHub repository, which is automatically linked to the corresponding Vercel project for automatic deployments on every commit. * All changes from v0 must be “Published”, as manual pushes from v0 do not trigger deployments. * **Domains:** Custom domains available to assign to your v0 application are also inherited from your Vercel project and team. [Do I need Vercel Pro to use v0?](https://v0.app/docs/vercel-integration#do-i-need-vercel-pro-to-use-v0) --------------------------------------------------------------------------------------------------------- No, Vercel Pro does not provide any additional v0 features. However, it does provide additional [Vercel role](https://vercel.com/docs/rbac/access-roles) options to your team members. This can provide greater control of their deployed v0 projects through the Vercel project dashboard. To cancel your Vercel Pro plan, you can choose to downgrade from your [team's billing settings](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fsettings%2Fbilling&title=) . Be aware that downgrading from Pro to Hobby will **kick all other members from the team**, regardless of their v0 access. After downgrading, they can be re-invited back as Viewers with the v0 Builder role, for no extra charge. [Managing v0 access and roles via your Vercel team](https://v0.app/docs/vercel-integration#managing-v0-access-and-roles-via-your-vercel-team) ---------------------------------------------------------------------------------------------------------------------------------------------- ### [v0 Team and Business plans](https://v0.app/docs/vercel-integration#v0-team-and-business-plans) * The only v0 role you can assign is v0 Builder, which provides full v0 functionality. * The [Vercel roles](https://vercel.com/docs/rbac/access-roles) you can assign are dependent on your Vercel plan * For example, if you are on v0 Team with a Vercel Hobby plan, you will have one Owner, but every other member may only be a Viewer with the v0 Builder role. * It is not possible to invite or change the roles of members to one that is not covered by your Vercel plan, even if you pair it with the v0 Builder role. ### [v0 Enterprise plans](https://v0.app/docs/vercel-integration#v0-enterprise-plans) * You have the option of assigning three different v0 roles; v0 Builder, v0 Creator, and v0 Viewer. These can be managed from your team’s [Vercel member settings](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fsettings%2Fmembers&title=) or [v0 member settings](https://v0.app/chat/settings/members) . * The [Vercel roles](https://vercel.com/docs/rbac/access-roles) you have available are still determined from your Vercel plan, which may be dependent on your contract. For clarification, you can contact your Account Executive. [Agentic Features\ \ v0's intelligent agent capabilities for web search, site inspection, and error fixing.](https://v0.app/docs/agentic-features) [Quickstart\ \ An overview of v0's features and workflows](https://v0.app/docs/quickstart) --- # Pricing | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Pricing ======= Copy page Understand the v0 plans, pricing, and usage limits. v0 offers 5 plans: * **Free**: No cost. For people looking to explore. * **Premium**: $20/month. For higher limits and power users. * **Team**: $30/user/month. For fast moving teams and collaboration. * **Business**: $100/user/month. For privacy consious teams. * **Enterprise**: For large companies that require additional security. [Plan comparison](https://v0.app/docs/pricing#plan-comparison) --------------------------------------------------------------- | **Feature** | **Free** | **Premium** | **Team** | **Business** | **Enterprise** | | --- | --- | --- | --- | --- | --- | | Price | $0/month | $20/month | $30/user/month | $100/user/month | Custom | | Monthly Credits | $5 | $20 | $30 per user | $30 per user | Custom | | Projects | 200 | Unlimited | Unlimited | Unlimited | Unlimited | | API Access | No | Yes | Yes | Yes | Yes | | Team Features | No | No | Yes | Yes | Advanced controls | | Users | 1 | 1 | Unlimited | Unlimited | Unlimited | | Shared Projects | No | No | Yes | Yes | Yes | | Shared Credits | No | No | Yes | Yes | Yes | | Access Controls | No | No | Basic | Basic | Advanced | | Centralized Billing | No | No | Yes | Yes | Yes | | Usage Analytics | Basic | Basic | Team-wide | Team-wide | Advanced | | Collaboration Tools | No | No | Yes | Yes | Yes | | Data Opt-out | No | No | No | Yes | Yes | [Choose your plan →](https://v0.app/pricing) [How do credits work?](https://v0.app/docs/pricing#how-do-credits-work) ------------------------------------------------------------------------ Credits function like a prepaid balance: * Each plan includes a monthly credit allowance. * Generations draw from your credit balance. * When credits are used up, generation pauses. * You can buy more credits any time (Premium and Team only) * Credits reset monthly on your billing date. [What are tokens?](https://v0.app/docs/pricing#what-are-tokens) ---------------------------------------------------------------- Tokens are the units used to measure how much text is processed: * **Input tokens** come from your prompt or uploaded content. * **Output tokens** are what v0 generates in response. Each time you use v0, your input and the generated output are split into tokens and counted. Token usage varies based on the length of your input and the size of the output. Longer prompts or more detailed responses will use more tokens. v0 also includes all relevant context like chat history, source files, and Vercel-specific knowledge when generating responses. This context is counted as input, and higher-quality responses may use more tokens as a result. [Credit to token conversion](https://v0.app/docs/pricing#credit-to-token-conversion) ------------------------------------------------------------------------------------- The number of tokens per credit used depends on the model. This table shows how much each model costs per million tokens: | **Model** | **Input Cost (per 1M tokens)** | **Output Cost (per 1M tokens)** | | --- | --- | --- | | v0-1.5-md | $1.50 | $7.50 | | v0-1.5-lg | $7.50 | $37.50 | | API v0-1.0-md | $3.00 | $15.00 | [Monitoring your usage](https://v0.app/docs/pricing#monitoring-your-usage) --------------------------------------------------------------------------- You can monitor your usage under [**Billing**](https://v0.app/chat/settings/billing) in your v0 dashboard: * **Plan Summary**: Your current plan, credit allowance, and payment method. * **Credit balance**: Your remaining credit balance for the month. If you're on a paid plan, it also shows your additional purchased credits. * **Payment**: Current payment method and update settings. * **Invoices**: Links to your v0 invoices on the Vercel dashboard. * **Usage Events**: A detailed log of your real-time activity, each message shows the date, cost, credit source, and model used. [Technical limits](https://v0.app/docs/pricing#technical-limits) ----------------------------------------------------------------- | **Resource** | **Limit** | **Description** | | --- | --- | --- | | Context window | 128,000 tokens | Max combined size of input: context (e.g. chat history) and prompt. | | Image inputs | ~1,000 tokens each | Each image is counted as roughly 1,000 tokens of input. | | Output size | 32,000 tokens | Max size of a single response generated by v0. | [Credit purchase options](https://v0.app/docs/pricing#credit-purchase-options) ------------------------------------------------------------------------------- Enterprise and a team or business plan can purchase additional credits: | Price | Best for | | --- | --- | | $10 | Occasional users | | $50 | Regular users | | $100 | Power users | | $500 | Teams | [Best practices](https://v0.app/docs/pricing#best-practices) ------------------------------------------------------------- * Break large projects into smaller components. * Use server components for better performance. * Be specific in your prompts to reduce iterations. * Monitor your credit usage regularly. * Purchase credits in bulk for better value. [Projects\ \ Previous Page](https://v0.app/docs/projects) [Teams\ \ Collaborate with your team on projects with shared resources.](https://v0.app/docs/teams) --- # Teams | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Teams ===== Copy page Collaborate with your team on projects with shared resources. v0 makes it easy for teams to collaborate on projects, share resources, and manage workflows in one place. Collaboration features like [team templates](https://v0.app/docs/teams#team-templates) are available on [Team and Enterprise plans](https://v0.app/docs/pricing#plan-comparison) . [Setting up your team](https://v0.app/docs/teams#setting-up-your-team) ----------------------------------------------------------------------- ### [1\. Upgrade to a Team plan](https://v0.app/docs/teams#1-upgrade-to-a-team-plan) Go to [v0.app/pricing](https://v0.app/pricing) and select the Team plan. During checkout you can: * Link your Vercel account * Name your team * Invite team members by email Your v0 Team will be linked to your Vercel account, and you can manage members and billing from your Vercel account settings. ### [2\. Add team members](https://v0.app/docs/teams#2-add-team-members) You can invite team members in several ways: * **During checkout**: Add member emails when upgrading to a Team plan * **After upgrade**: Click **Manage Members** in the confirmation modal * **From Vercel**: Go to `https://vercel.com/[your-team]/~/settings/members` to invite by email or share an invite link ### [3\. Share projects with team members](https://v0.app/docs/teams#3-share-projects-with-team-members) Once your team is set up, you can [share projects](https://v0.app/docs/teams#sharing-projects) with your team members. [Features](https://v0.app/docs/teams#features) ----------------------------------------------- ### [Team access](https://v0.app/docs/teams#team-access) On **v0 Team plans**, all team members have **Builder** access. This means every member can: * Create and edit chats and projects * Create deployments and manage integrations * Access shared team projects and templates For advanced role-based access control (RBAC) with differentiated roles like Builder, Creator, and Viewer, see [Enterprise](https://v0.app/docs/enterprise) . ### [Sharing Projects](https://v0.app/docs/teams#sharing-projects) You can control who has access to your chats and projects using the Share dialog. #### [Visibility options](https://v0.app/docs/teams#visibility-options) | Option | Description | | --- | --- | | Only people with access | Private - only you and invited users can access | | Everyone at \[team-name\] | All members of your team can access | | Anyone with the link | Unlisted - anyone with the URL can access | | Anyone on the web | Public - discoverable and accessible by anyone | #### [Inviting team members](https://v0.app/docs/teams#inviting-team-members) 1. Click **Share** in the top-right corner 2. Click on **Invite Users** 3. Search for team members by name or email 4. Choose permission level: **Can View** or **Can Edit** 5. Click **Invite** ### [Team Templates](https://v0.app/docs/teams#team-templates) Team templates allow you to create and share reusable UI components and project starters within your organization. Unlike public templates, team templates are only visible to members of your team. #### [Creating Team Templates](https://v0.app/docs/teams#creating-team-templates) You can publish a template under the Publish menu by selecting "Create Template". When you publish a template as a team member, you can choose to make it: * **Public:** Visible to all v0 users * **Team-only:** Restricted to your team members Team templates are created from your projects and can include: * Complete project starters * Reusable UI components * Design patterns and layouts * Pre-configured settings and environment variables #### [Accessing Team Templates](https://v0.app/docs/teams#accessing-team-templates) Team members can access team templates in several places: * **Homepage:** Featured team templates appear on the homepage * **Templates Page:** Visit `/templates/team` to browse all team templates * **Template Browser:** Filter by team templates when searching Team templates show up alongside your personal templates and help maintain consistency across team projects. #### [Benefits](https://v0.app/docs/teams#benefits) * **Consistency:** Ensure all team members use approved design patterns * **Efficiency:** Jumpstart new projects with pre-built components * **Knowledge Sharing:** Distribute best practices across the team * **Version Control:** Update templates and all team members get access to the latest version ### [Collaboration](https://v0.app/docs/teams#collaboration) | Feature | Description | Availability | | --- | --- | --- | | Shared Chat History | Access conversation context across team | Team and Enterprise | | Version History | Track changes and revert when needed | Team and Enterprise | | Team Templates | Create and share reusable templates | Team and Enterprise | | Role-based Access | Assign Builder, Creator, or Viewer roles | Enterprise only | | Approval Workflows | Request and manage reviews | Enterprise only | | Live Collaboration | Work on projects simultaneously | Enterprise only | ### [Enterprise](https://v0.app/docs/teams#enterprise) Enterprise plans include advanced features: * **Role-based access control**: Assign v0 Builder, Creator, or Viewer roles to team members * **Free Viewer seats**: Viewers don't count toward your paid seats * **SAML SSO** for secure access * **Audit logs** for compliance * **Dedicated support** channels See the [Enterprise documentation](https://v0.app/docs/enterprise) for more details. ### [Credits](https://v0.app/docs/teams#credits) Each team member receives their own monthly credits: * Each seat includes $30 in monthly credits * Credits are individual per user * Track usage with team-wide analytics * Credits reset monthly on your billing date ### [Integration with Vercel](https://v0.app/docs/teams#integration-with-vercel) Team plans integrate with Vercel for: * Unified team management across platforms * Seamless deployment from v0 to Vercel * Shared environment variables and secrets * Consistent access controls [Best Practices](https://v0.app/docs/teams#best-practices) ----------------------------------------------------------- Here are some best practices for team collaboration: * **Standardize naming conventions:** Use consistent project naming, create folder structures for organization, and tag projects by department or purpose. * **Create component libraries:** Document usage guidelines and maintain version control. * **Build a team template library:** Create team templates for common UI patterns, project starters, and reusable components to ensure consistency and speed up development. * **Establish workflows:** Define approval processes and set up review cycles. * **Monitor usage:** Track credit consumption by project and identify high-usage patterns. [Transferring chats](https://v0.app/docs/teams#transferring-chats) ------------------------------------------------------------------- You can transfer chats between any of your v0 teams, and your personal account. This can be done either directly from a chat with the **Transfer Chat** option, or from your [v0 workspace settings](https://v0.app/chat/settings/workspace) by choosing **Transfer Data**. Transferring from your workspace settings allows you to transfer multiple chats at once. [Team settings](https://v0.app/docs/teams#team-settings) --------------------------------------------------------- To access team settings, first make sure you have the correct team selected in the navigation bar, then go to [**Settings → Workspace**](https://v0.app/chat/settings/workspace) . ### [Members](https://v0.app/docs/teams#members) View and manage your [team members](https://v0.app/chat/settings/members) . On Team plans, all members have the **Builder** role. ### [Usage](https://v0.app/docs/teams#usage) Track credit [usage](https://v0.app/chat/settings/usage) across your team: * View usage by user, date, and event type * Filter by time period (1d, 7d, 30d, 90d) * Download usage reports ### [Integrations](https://v0.app/docs/teams#integrations) Connect external services to your team workspace: * **Figma**: Paste Figma links directly into v0 * **Snowflake**: Connect your Snowflake account for data access ### [API Keys](https://v0.app/docs/teams#api-keys) Manage API keys for programmatic access to v0. [Pricing\ \ Understand the v0 plans, pricing, and usage limits.](https://v0.app/docs/pricing) [Security\ \ Learn about v0's security practices, threat modeling, and enterprise security features.](https://v0.app/docs/security) --- # Security | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Security ======== Copy page Learn about v0's security practices, threat modeling, and enterprise security features. v0 is built with security as a fundamental principle, implementing multiple layers of protection to ensure your code and data remain secure throughout the development process. [General security approach](https://v0.app/docs/security#general-security-approach) ------------------------------------------------------------------------------------ ### [Threat model and code validation](https://v0.app/docs/security#threat-model-and-code-validation) From a threat model perspective, v0 doesn't take LLM-generated code for granted. We consider all code potentially incorrect or adversarial, implementing robust validation and security measures: * **Code Analysis**: All generated code undergoes security analysis before execution * **Sandboxed Execution**: Code runs in isolated environments to prevent system access * **Input Validation**: Comprehensive validation of all user inputs and generated content * **Adversarial Testing**: Regular security testing against potential attack vectors ### [Environment variable security](https://v0.app/docs/security#environment-variable-security) v0 leverages Next.js's strong distinction between server-side and client-side environment variables: * **Server-side tokens**: Environment variables without the `NEXT_PUBLIC_` prefix remain secure on the server * **Client-side tokens**: Only variables prefixed with `NEXT_PUBLIC_` are exposed to the browser * **Automatic Analysis**: v0 analyzes `NEXT_PUBLIC_` usage and warns users about potential security risks * **Smart Refactoring**: The AI can move code to Route Handlers, Server Actions, or other server-side contexts to improve security ### [Code execution security](https://v0.app/docs/security#code-execution-security) When v0 deploys to Vercel, server-side code becomes secure Functions that run in isolated sandboxes: * **Isolated Execution**: Each function runs in its own secure container * **Encrypted Environment**: Environment variables are stored in Vercel's built-in secure vault * **Network Isolation**: Functions have controlled network access * **Resource Limits**: Memory and execution time limits prevent resource exhaustion attacks [Enterprise security features](https://v0.app/docs/security#enterprise-security-features) ------------------------------------------------------------------------------------------ Enterprise plans include advanced security features designed for organizations with strict compliance and security requirements. ### [Data privacy and training](https://v0.app/docs/security#data-privacy-and-training) * **Opt-out of Data Training**: Enterprise customers can opt out of having their content used for model training * **Data Isolation**: Enterprise data is processed on separate infrastructure * **No Cross-contamination**: Your data never influences models used by other customers ### [Access control](https://v0.app/docs/security#access-control) * **Single Sign-On (SSO)**: SAML-based SSO integration with your existing identity provider * **Role-based Access Control**: Granular permissions for different team members * **Audit Logs**: Comprehensive logging of all user actions for compliance * **Session Management**: Advanced session controls and timeout policies ### [Team Security](https://v0.app/docs/security#team-security) Enterprise teams benefit from enhanced collaboration security: * **Private Workspaces**: Isolated environments for sensitive projects * **Approval Workflows**: Request and manage reviews before deployment * **Version Control**: Track all changes with detailed history * **Secure Sharing**: Control who can access and modify shared projects For more information about team collaboration features, see our [Teams documentation](https://v0.app/docs/teams) . ### [Compliance and certifications](https://v0.app/docs/security#compliance-and-certifications) * **SOC 2 Type 2**: v0 is included in Vercel's SOC 2 Type 2 attestation for Security, Confidentiality, and Availability * **GDPR Compliance**: Full compliance with European data protection regulations * **Enterprise Support**: Dedicated support channels for security-related inquiries [Best practices](https://v0.app/docs/security#best-practices) -------------------------------------------------------------- ### [Environment variables](https://v0.app/docs/security#environment-variables) * Never expose sensitive tokens with `NEXT_PUBLIC_` prefix * Use Vercel's environment variable management for production deployments * Regularly rotate API keys and secrets * Use different keys for development and production environments ### [Team collaboration](https://v0.app/docs/security#team-collaboration) * Set appropriate access levels for team members * Use private workspaces for sensitive projects * Enable audit logging for compliance requirements * Regularly review team member permissions [Security reporting](https://v0.app/docs/security#security-reporting) ---------------------------------------------------------------------- If you discover a security vulnerability in v0, please report it to our security team at [security@vercel.com](mailto:security@vercel.com) . We take all security reports seriously and will respond promptly. For more information about Vercel's security practices, visit [security.vercel.com](https://security.vercel.com/) . [Teams\ \ Collaborate with your team on projects with shared resources.](https://v0.app/docs/teams) [Cline\ \ Use v0 inside Cline to plan, edit, and automate development tasks through natural language commands.](https://v0.app/docs/cline) --- # FAQs | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu FAQs ==== Copy page Common questions about what v0 is, how it works, and how to build with it. [About v0](https://v0.app/docs/faqs#about-v0) ---------------------------------------------- ### [What is v0?](https://v0.app/docs/faqs#what-is-v0) v0 is an AI-powered development platform that turns ideas into production-ready, full-stack web apps. Through a conversational chat interface, it generates sophisticated UIs and backend logic from natural language, taking you from prompt to production in minutes. v0 empowers anyone to build functional web applications faster without writing code manually. It supports popular frontend frameworks and UI libraries, with best-in-class expertise in Next.js, React, Tailwind CSS, shadcn/ui, and the AI SDK. The code generated is ready to deploy on Vercel's globally scalable infrastructure. [How does v0 work?](https://v0.app/docs/faqs#how-does-v0-work) --------------------------------------------------------------- v0 supports the full development lifecycle from idea to production. Check out the [Quickstart](https://v0.app/docs/quickstart) guide to start building on v0. * **Prompt**: Describe what you want, upload screenshots or mockups, or import Figma designs. v0 transforms any input into working code. * **Iterate**: Add features, adjust visuals in Design Mode, edit code, or apply your design system for consistent branding. * **Integrate**: Connect databases, AI models, external APIs, and GitHub to build full data-driven applications. * **Ship**: Publish with one click on Vercel, add domains, and share with your team. * **Manage**: Collaborate in shared workspaces with permissions, security controls, and usage insights. * **Embed**: Use v0 in your existing development environment through integrations with Cline, Cursor, and Zed, or the v0 Model API. ### [Who can use v0?](https://v0.app/docs/faqs#who-can-use-v0) Anyone with an idea. v0 removes technical barriers and enables a new class of creators who build and collaborate without writing code. * **Founders** ship MVPs quickly and iterate with speed. * **Product managers** prototype without waiting on design queues. * **Designers** test real interactions early. * **Engineers** skip boilerplate code and develop faster. * **Sales engineers** produce custom demos instantly. * **Marketers** launch pages independently. ### [Do I need coding knowledge?](https://v0.app/docs/faqs#do-i-need-coding-knowledge) No coding experience is required. Describe what you want using natural language and v0 will handle the technical implementation. ### [Do I need to write prompts in English?](https://v0.app/docs/faqs#do-i-need-to-write-prompts-in-english) No. You can write prompts in your preferred language and v0 will translate them into code. ### [Why should I choose v0?](https://v0.app/docs/faqs#why-should-i-choose-v0) v0's deep integration with the Vercel ecosystem powers the complete workflow from prompt to production. * **vs. General LLMs:** v0 generates interactive UIs and deployable full-stack apps, not isolated code snippets. * **vs. AI-Augmented IDEs:** v0 provides a collaborative, conversational environment where PMs, designers, engineers, and other professionals can build together across the full product development cycle. * **vs. Code Generation Products:** v0 delivers best-in-class Next.js expertise backed by Vercel's enterprise infrastructure and security, unlike standalone tools without proven production infrastructure. * **vs. AI-Powered Design Tools:** v0 generates production-ready code with backend logic and deployment, not prototype only designs. [Building with v0](https://v0.app/docs/faqs#building-with-v0) -------------------------------------------------------------- ### [What can I build with v0?](https://v0.app/docs/faqs#what-can-i-build-with-v0) You can build anything, from simple components to full-stack applications. For example: * Landing pages * Dashboards * E-commerce sites * Data visualization tools * Internal tools * Mobile-responsive apps [Explore what our community is building](https://v0.app/community) ### [Can v0 build full-stack or complex applications?](https://v0.app/docs/faqs#can-v0-build-full-stack-or-complex-applications) Yes. v0 handles everything from simple components to full-stack apps with authentication, databases, and external API integrations. ### [Can I use my own designs?](https://v0.app/docs/faqs#can-i-use-my-own-designs) Yes. Upload screenshots, mockups, or Figma designs. v0 converts them into working applications with pixel-perfect accuracy. [Learn more about Figma](https://v0.app/docs/figma) ### [What happened to the model switcher / GPT-5?](https://v0.app/docs/faqs#what-happened-to-the-model-switcher--gpt-5) We received feedback that users were confused by which model to choose for different scenarios. v0 now intelligently decides what model(s) to use for your query. ### [Can v0 integrate with existing projects?](https://v0.app/docs/faqs#can-v0-integrate-with-existing-projects) Yes. You can export v0-generated components into your existing codebases. ### [Can I use v0 offline?](https://v0.app/docs/faqs#can-i-use-v0-offline) No. v0 requires an internet connection to process prompts and generate code. ### [Is my code secure?](https://v0.app/docs/faqs#is-my-code-secure) Yes. v0 follows secure coding best practices, and deployed apps benefit from Vercel's enterprise-grade infrastructure. ### [How much does v0 cost?](https://v0.app/docs/faqs#how-much-does-v0-cost) v0 offers 5 plans: * **Free**: No cost. Limited generations, For people looking to explore. * **Premium**: $20/month. For higher limits and power users. * **Team**: $30/user/month. For fast moving teams and collaboration. * **Business**: $100/user/month. For privacy consious teams. * **Enterprise**: For large companies that require additional security. See the [pricing page](https://v0.app/docs/pricing) for more information. [Editing and Collaborating](https://v0.app/docs/faqs#editing-and-collaborating) -------------------------------------------------------------------------------- ### [Can I edit the generated code?](https://v0.app/docs/faqs#can-i-edit-the-generated-code) Yes. Export the code to work locally or edit directly in v0. The bi-directional [Git integration](https://v0.app/docs/github) allows seamless syncing between local development and v0. ### [Can teams collaborate in v0?](https://v0.app/docs/faqs#can-teams-collaborate-in-v0) Yes. Team plans enable multiple users to work on projects together. Share projects, iterate on designs, and deploy from a shared workspace. [Deploying and infrastructure](https://v0.app/docs/faqs#deploying-and-infrastructure) -------------------------------------------------------------------------------------- ### [How do I deploy my application?](https://v0.app/docs/faqs#how-do-i-deploy-my-application) Click the **Share** button in v0 and navigate to the **Publish** tab. Your application goes live on [Vercel's platform](https://vercel.com/) , no set up or configuration needed. ### [What is Vercel's relationship with v0?](https://v0.app/docs/faqs#what-is-vercels-relationship-with-v0) Vercel created v0 and provides the underlying infrastructure. The deep integration enables one-click deployment to enterprise grade infrastructure, with SOC 2 Type 2 compliance, strong security, and global scalability. v0's code is optimized for the Vercel platform, ensuring a smooth path from idea to production. [Learn more about Vercel](https://vercel.com/) ### [Do I need a new v0 account if I already have a Vercel account?](https://v0.app/docs/faqs#do-i-need-a-new-v0-account-if-i-already-have-a-vercel-account) No. Your Vercel account will give you access to v0. Just go to [v0.app](http://v0.app/) and log in! [Training data](https://v0.app/docs/faqs#training-data) -------------------------------------------------------- ### [What data was v0 trained on?](https://v0.app/docs/faqs#what-data-was-v0-trained-on) Vercel uses a combination of public and private data sets to provide v0. v0 was trained on a large corpus of data from various sources, including third parties listed in Vercel's [AI Policy](https://v0.app/policy) . The data sets primarily cover areas related to web development, particularly with React, Next.js, and modern web technologies. ### [Will my generations be used for training?](https://v0.app/docs/faqs#will-my-generations-be-used-for-training) v0 may use user-generated prompts and/or content as inputs to models and learning systems from third-party providers to improve our products. Using this data gives v0 the ability to provide more accurate and relevant recommendations to our users. Content of v0 Enterprise customers is not used for training. Further, customer data or code of customers using Vercel's platform services is not used to train, improve, or fine tune the models used by v0. ### [Can I access my data?](https://v0.app/docs/faqs#can-i-access-my-data) The ability to download your usage data is not currently supported. ### [Is v0 trained on customer data from Vercel's platform services, like the DX Platform?](https://v0.app/docs/faqs#is-v0-trained-on-customer-data-from-vercels-platform-services-like-the-dx-platform) No data related to your usage of Vercel's platform, Vercel CLI, or Vercel's deployment services is or will be used to train v0. Please refer to Vercel's [AI Policy](https://v0.app/policy) for more information. ### [Can I see a history of all my chats?](https://v0.app/docs/faqs#can-i-see-a-history-of-all-my-chats) Yes, you can view your chat history at [v0.app/chat/history](http://v0.app/chat/history) ### [Can we request deletion of data?](https://v0.app/docs/faqs#can-we-request-deletion-of-data) Yes, please [contact us](mailto:privacy@vercel.com?Subject=Please%20delete%20my%20v0%20data) to request deletion of v0 outputs. Please note that if any or your inputs and outputs were used to train existing v0 models, those models will not be updated. If you prefer for all of your content to not be used for training, please contact us to upgrade to a v0 Enterprise plan. To request deletion of your personal data under data protection regulations, please see Vercel's [Privacy Notice](https://vercel.com/legal/privacy-policy#eea-and-uk) . ### [Can I use output from v0 for commercial uses?](https://v0.app/docs/faqs#can-i-use-output-from-v0-for-commercial-uses) Vercel doesn't own the code generated based on your queries and prompts. However, output that you receive may be the same or similar to other users' output or third party's IP, be incomplete or contain bugs, or be inappropriate for your use. You are responsible for evaluating any content you generate through v0 and making your own determination about its suitability for commercial or other purposes. ### [Is v0 compliant?](https://v0.app/docs/faqs#is-v0-compliant) Vercel has a SOC 2 Type 2 attestation for Security, Confidentiality, and Availability. v0 is included in the scope of Vercel's SOC 2 report. More information is available at [security.vercel.com](https://security.vercel.com/) . [What if I need help?](https://v0.app/docs/faqs#what-if-i-need-help) --------------------------------------------------------------------- If you run into issues or have further questions, you can: * Browse the documentation (you are here). * Join the discussion in the [community forum](https://community.vercel.com/tag/v0) . * Contact support at [vercel.com/help](https://vercel.com/help) . [Quickstart\ \ An overview of v0's features and workflows](https://v0.app/docs/quickstart) [Text Prompting\ \ Use text prompting to create initial UIs and ask technical questions with natural language.](https://v0.app/docs/text-prompting) --- # Text Prompting | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Text Prompting ============== Copy page Use text prompting to create initial UIs and ask technical questions with natural language. Start simple. Plan your project. Provide context. Specify and make v0 clarify. Iterate. [Basic Examples](https://v0.app/docs/text-prompting#basic-examples) -------------------------------------------------------------------- Start with simple, descriptive prompts. For example: * "A dashboard with a login page and user profile view" * "A landing page for a mobile app with a hero section, features grid, and pricing table" * "An internal tool to manage customer support tickets" * "A product feedback form that writes to a database" [AI prompt enhancement](https://v0.app/docs/text-prompting#ai-prompt-enhancement) ---------------------------------------------------------------------------------- After writing a simple prompt, v0 may offer to enhance it with more details. Select the enhancement option to get a comprehensive specification that improves your results. This feature is particularly useful when you're not sure about all the technical details. For example: * **Original:** "Make a todo app." * **Enhanced:** "Create a modern todo application with add/edit/delete tasks, completion tracking, filtering, localStorage persistence, and responsive design." [Development Workflow](https://v0.app/docs/text-prompting#development-workflow) -------------------------------------------------------------------------------- ### [Simple Projects (Direct Implementation)](https://v0.app/docs/text-prompting#simple-projects-direct-implementation) For straightforward applications with clear requirements, start directly with implementation. This approach works well for single-purpose tools, landing pages, or simple CRUD applications. Build a task management app using Next.js 14 with App Router, TypeScript, and Tailwind CSS [Open in](https://v0.app/?q=Build%20a%20task%20management%20app%20using%20Next.js%2014%20with%20App%20Router%2C%20TypeScript%2C%20and%20Tailwind%20CSS) Create a contact form with validation and email integration [Open in](https://v0.app/?q=Create%20a%20contact%20form%20with%20validation%20and%20email%20integration) ### [Complex projects (planning first)](https://v0.app/docs/text-prompting#complex-projects-planning-first) For multi-feature applications, enterprise tools, or systems with multiple user roles, start with planning. This helps ensure you don't miss critical requirements and creates a roadmap for development. #### [1\. Requirements gathering](https://v0.app/docs/text-prompting#1-requirements-gathering) Define what you're building and who will use it: Create a PRD for a restaurant reservation system [Open in](https://v0.app/?q=Create%20a%20PRD%20for%20a%20restaurant%20reservation%20system) Generate user personas for a fitness tracking app [Open in](https://v0.app/?q=Generate%20user%20personas%20for%20a%20fitness%20tracking%20app) #### [2\. Implementation](https://v0.app/docs/text-prompting#2-implementation) Build the core functionality based on your requirements: "Build the MVP based on the PRD, starting with core features." #### [3\. Iteration](https://v0.app/docs/text-prompting#3-iteration) Add features and refinements based on your initial implementation: "Add search functionality and pagination to the task list." "Implement real-time updates using WebSockets." [Best Practices](https://v0.app/docs/text-prompting#best-practices) -------------------------------------------------------------------- ### [Be Specific](https://v0.app/docs/text-prompting#be-specific) The more specific your prompt, the better the results. Include details about functionality, design preferences, and technical requirements. **Instead of:** `"Make a website"` **Try:** Create a portfolio website for a freelance designer with hero section, projects showcase, contact form, and responsive design [Open in](https://v0.app/?q=Create%20a%20portfolio%20website%20for%20a%20freelance%20designer%20with%20hero%20section%2C%20projects%20showcase%2C%20contact%20form%2C%20and%20responsive%20design) ### [Break down complex tasks](https://v0.app/docs/text-prompting#break-down-complex-tasks) Large, complex applications are better built incrementally. This approach reduces errors, allows for testing at each stage, and makes debugging easier. **Too Complex:** Create a full e-commerce platform with authentication, catalog, cart, payments, orders, admin dashboard, and analytics [Open in](https://v0.app/?q=Create%20a%20full%20e-commerce%20platform%20with%20authentication%2C%20catalog%2C%20cart%2C%20payments%2C%20orders%2C%20admin%20dashboard%2C%20and%20analytics) **Better Approach:** Start with a product catalogue page showing products in a grid layout [Open in](https://v0.app/?q=Start%20with%20a%20product%20catalogue%20page%20showing%20products%20in%20a%20grid%20layout) Then follow up: Add a shopping cart with localStorage persistence [Open in](https://v0.app/?q=Add%20a%20shopping%20cart%20with%20localStorage%20persistence) ### [Include technical details](https://v0.app/docs/text-prompting#include-technical-details) Specify your preferred technologies, frameworks, and integrations. This helps v0 generate code that matches your existing stack or preferences. Build a real-time chat app using: - Next.js 14 with App Router - Socket.io for messaging - MongoDB for storage - NextAuth.js for authentication [Open in](https://v0.app/?q=Build%20a%20real-time%20chat%20app%20using%3A%20-%20Next.js%2014%20with%20App%20Router%20-%20Socket.io%20for%20messaging%20-%20MongoDB%20for%20storage%20-%20NextAuth.js%20for%20authentication) ### [Specify UI/UX preferences](https://v0.app/docs/text-prompting#specify-uiux-preferences) Include design preferences to get results that match your vision. Consider factors like color schemes, layout preferences, and user experience requirements. Design a minimal, dark-mode interface with mobile-first responsive layout [Open in](https://v0.app/?q=Design%20a%20minimal%2C%20dark-mode%20interface%20with%20mobile-first%20responsive%20layout) ### [Include error handling](https://v0.app/docs/text-prompting#include-error-handling) Robust applications need proper error handling. Specify how you want to handle common failure scenarios to ensure a good user experience. Add comprehensive error handling for network failures, invalid input, and empty states [Open in](https://v0.app/?q=Add%20comprehensive%20error%20handling%20for%20network%20failures%2C%20invalid%20input%2C%20and%20empty%20states) Implement loading states and user-friendly error messages [Open in](https://v0.app/?q=Implement%20loading%20states%20and%20user-friendly%20error%20messages) [Advanced techniques](https://v0.app/docs/text-prompting#advanced-techniques) ------------------------------------------------------------------------------ ### [Ask v0 to plan](https://v0.app/docs/text-prompting#ask-v0-to-plan) When you're unsure how to approach a complex project, let v0 help you break it down. This is especially useful for projects with multiple stakeholders or complex business logic. Break down the development of a social media dashboard into smaller steps [Open in](https://v0.app/?q=Break%20down%20the%20development%20of%20a%20social%20media%20dashboard%20into%20smaller%20steps) ### [Component-first development](https://v0.app/docs/text-prompting#component-first-development) Build your application piece by piece, starting with individual components. This approach gives you more control over each part and makes debugging easier. Create a header component with navigation and logo [Open in](https://v0.app/?q=Create%20a%20header%20component%20with%20navigation%20and%20logo) Then: "Add a hero section below the header" ### [Progressive enhancement](https://v0.app/docs/text-prompting#progressive-enhancement) Start with core functionality and gradually add features. This approach ensures your application works at every stage and helps you prioritize features based on user feedback. 1. **Core Features:** `"Create a basic todo list with add/delete"` 2. **Data Persistence:** `"Add localStorage to save todos"` 3. **User Experience:** `"Add completion checkboxes and filtering"` ### [Prompt templates](https://v0.app/docs/text-prompting#prompt-templates) Use these templates as starting points for common development patterns. Customize them based on your specific requirements. #### [CRUD operations](https://v0.app/docs/text-prompting#crud-operations) Create a resource management interface with list view, add/edit forms, delete confirmation, and search/pagination [Open in](https://v0.app/?q=Create%20a%20resource%20management%20interface%20with%20list%20view%2C%20add%2Fedit%20forms%2C%20delete%20confirmation%2C%20and%20search%2Fpagination) #### [Authentication](https://v0.app/docs/text-prompting#authentication) Implement \[auth method\] with login/register forms, password reset, session management, and protected routes [Open in](https://v0.app/?q=Implement%20%5Bauth%20method%5D%20with%20login%2Fregister%20forms%2C%20password%20reset%2C%20session%20management%2C%20and%20protected%20routes) #### [Dashboards](https://v0.app/docs/text-prompting#dashboards) Build a dashboard widget showing \[metric\] with current value, trend indicator, comparison data, and interactive chart [Open in](https://v0.app/?q=Build%20a%20dashboard%20widget%20showing%20%5Bmetric%5D%20with%20current%20value%2C%20trend%20indicator%2C%20comparison%20data%2C%20and%20interactive%20chart) [Complete example workflow](https://v0.app/docs/text-prompting#complete-example-workflow) ------------------------------------------------------------------------------------------ Here's how to build a customer support ticket system from start to finish. This example shows the progression from planning to a fully functional application: ### [1\. Planning](https://v0.app/docs/text-prompting#1-planning) Create a PRD for a customer support ticket system with agent dashboard and customer portal [Open in](https://v0.app/?q=Create%20a%20PRD%20for%20a%20customer%20support%20ticket%20system%20with%20agent%20dashboard%20and%20customer%20portal) ### [2\. Core implementation](https://v0.app/docs/text-prompting#2-core-implementation) Build the ticket creation form with priority levels, categories, and file uploads [Open in](https://v0.app/?q=Build%20the%20ticket%20creation%20form%20with%20priority%20levels%2C%20categories%2C%20and%20file%20uploads) ### [3\. Agent features](https://v0.app/docs/text-prompting#3-agent-features) Add the agent dashboard with ticket list, status updates, and response interface [Open in](https://v0.app/?q=Add%20the%20agent%20dashboard%20with%20ticket%20list%2C%20status%20updates%2C%20and%20response%20interface) ### [4\. Enhancements](https://v0.app/docs/text-prompting#4-enhancements) Implement real-time notifications and email alerts for ticket updates [Open in](https://v0.app/?q=Implement%20real-time%20notifications%20and%20email%20alerts%20for%20ticket%20updates) [Technical questions](https://v0.app/docs/text-prompting#technical-questions) ------------------------------------------------------------------------------ v0 is trained on the latest Vercel ecosystem documentation and can answer questions about: * **[Next.js](https://nextjs.org/) ** - React framework for production * **[Svelte](https://svelte.dev/) ** - Cybernetically enhanced web apps * **[Turborepo](https://turbo.build/repo) ** - High-performance build system * **[AI SDK](https://sdk.vercel.ai/) ** - AI-powered applications * **[Vercel](https://vercel.com/) ** - Cloud platform for frontend developers ### [Example queries](https://v0.app/docs/text-prompting#example-queries) Use v0 to get specific answers about implementation details, best practices, and troubleshooting: * "How do I implement server-side rendering in Next.js 14?" * "What's the best way to handle authentication in SvelteKit?" * "How can I optimize my Turborepo build performance?" [Next steps](https://v0.app/docs/text-prompting#next-steps) ------------------------------------------------------------ Once you've generated your initial application: * **[Design Mode](https://v0.app/docs/design-mode) ** - Refine the visual design and layout * **[Code Editing](https://v0.app/docs/code-editing) ** - Make direct code changes * **[Deployment](https://v0.app/docs/deployments) ** - Deploy your application to Vercel [FAQs\ \ Common questions about what v0 is, how it works, and how to build with it.](https://v0.app/docs/faqs) [Screenshots and Files\ \ Turn your mockups or wireframes into high-fidelity designs.](https://v0.app/docs/screenshots) --- # Templates | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Templates ========= Copy page Share your v0 creations with the community by publishing them as templates. Templates appear in your public profile and can be forked by other users. A template is a v0 chat published for others to fork and use. When you publish, it appears in the [v0 Templates gallery](https://v0.app/templates) . ![v0 Templates gallery](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Ftemplates.png&w=3840&q=75) [Publishing a template](https://v0.app/docs/templates#publishing-a-template) ----------------------------------------------------------------------------- To publish a template from an existing chat: 1. Click the **Publish** button in the top right corner of your chat 2. Click **Publish as Template** 3. Fill in the template details and click **Publish Template** ![Publishing a template flow](https://v0.app/docs-static/_next/image?url=https%3A%2F%2F4nwqv0zkit3b9v6h.public.blob.vercel-storage.com%2Fpublish.gif&w=1920&q=75) ### [Template details](https://v0.app/docs/templates#template-details) When submitting a template, you'll need to provide: * **Custom Thumbnail**: A 1920x1080 image that represents your template. This is the first thing users see when browsing templates. * **Template Name**: A clear, descriptive name for your template. * **Description**: Explain what your template does and what makes it useful. * **Category**: Select the most relevant category (e.g., Landing Pages, Dashboards, E-commerce, AI, Components, etc.) * **Tags**: Add up to 10 tags to help users find your template. * **Visibility**: Control who can see your template. "Everyone on v0" makes it publicly discoverable. [Updating a template](https://v0.app/docs/templates#updating-a-template) ------------------------------------------------------------------------- If you've already published a chat as a template and made improvements, go to **Publish as Template** again. You'll see a **Publish Changes** button that updates your existing template while keeping the same URL. [Discovering templates](https://v0.app/docs/templates#discovering-templates) ----------------------------------------------------------------------------- All published templates are listed in the [v0 Templates gallery](https://v0.app/templates) , organized by categories. Users can browse, filter, and search for templates. Popular templates are featured based on forks and likes. Your templates also appear in the **Showcase** section of your public profile at `v0.app/@username`. [Featured templates](https://v0.app/docs/templates#featured-templates) ----------------------------------------------------------------------- The best templates are selected and highlighted on the [v0 homepage](https://v0.app/) . Getting featured gives your template maximum visibility across the platform. Our team reviews templates daily to ensure quality and safety. We check that templates: * Don't contain malicious code or harmful content * Are original work and not duplicated from other templates * Provide genuine value to the community [Best practices for templates](https://v0.app/docs/templates#best-practices-for-templates) ------------------------------------------------------------------------------------------- To create templates that others will find valuable: * **Design matters**: Most users choose templates based on how they look. A polished UI/UX and a clear thumbnail will make your template stand out. * **Use descriptive names**: Make it clear what the template does immediately. * **Write helpful descriptions**: Explain the use case, features, and any setup required. * **Document external APIs**: If your template uses non-native integrations, add modals or instructions on how to obtain those API keys. * **Add a README**: Include a `readme.md` with information about the project and suggestions for customization. * **Build modular code**: Structure your code to be maintainable so users who fork your template can easily scale it. * **Choose accurate categories and tags**: Help users find your template through search. * **Share on X**: Post your template and tag [@v0](https://x.com/v0) ! We often share community templates to help you reach a wider audience. [Browse the templates gallery](https://v0.app/templates) [Sharing\ \ Share your v0 chat with others to showcase your prompt history or to collaborate on generating components. This allows for seamless teamwork and feedback.](https://v0.app/docs/sharing) [Account\ \ Manage your account and billing information.](https://v0.app/docs/account) --- # Quickstart | v0 Docs Getting Started * [What is v0?](https://v0.app/docs/introduction) * [Agentic Features](https://v0.app/docs/agentic-features) * [Vercel Integration](https://v0.app/docs/vercel-integration) * [Quickstart](https://v0.app/docs/quickstart) * [FAQs](https://v0.app/docs/faqs) Prompt * [Text Prompting](https://v0.app/docs/text-prompting) * [Screenshots and Files](https://v0.app/docs/screenshots) * [Figma](https://v0.app/docs/figma) Iterate * [Code editing](https://v0.app/docs/code-editing) * [Design mode](https://v0.app/docs/design-mode) * [Design systems](https://v0.app/docs/design-systems) * [Images and videos](https://v0.app/docs/images-and-videos) * [Versions](https://v0.app/docs/versions) Integrate * [AI models](https://v0.app/docs/ai-models) * [Databases](https://v0.app/docs/databases) * [External APIs](https://v0.app/docs/external-apis) * [GitHub](https://v0.app/docs/github) * [MCP Integrations](https://v0.app/docs/MCP) Ship * [Deployments](https://v0.app/docs/deployments) * [Custom domain](https://v0.app/docs/custom-domains) * [Sharing](https://v0.app/docs/sharing) * [Templates](https://v0.app/docs/templates) Manage * [Account](https://v0.app/docs/account) * [Community](https://v0.app/docs/community) * [Enterprise](https://v0.app/docs/enterprise) * [Instructions](https://v0.app/docs/instructions) * [Projects](https://v0.app/docs/projects) * [Pricing](https://v0.app/docs/pricing) * [Teams](https://v0.app/docs/teams) * [Security](https://v0.app/docs/security) Embed * [Cline](https://v0.app/docs/cline) * [Cursor](https://v0.app/docs/cursor) * [OpenAI Codex](https://v0.app/docs/openai-codex) * [Zed](https://v0.app/docs/zed) Guides * [Full-stack apps](https://v0.app/docs/full-stack-apps) * [Prototyping](https://v0.app/docs/prototyping) * [PRD design](https://v0.app/docs/prd-design) Menu Quickstart ========== Copy page An overview of v0's features and workflows Welcome to v0! This guide will walk you through v0's main features and workflows. 1. **Visit [v0.app](https://v0.app/) ** and sign in 2. **Start a new chat** or create a project 3. **Describe your idea** in natural language 4. **Review the generated app** and iterate as needed [Prompt: Describe your idea](https://v0.app/docs/quickstart#prompt-describe-your-idea) --------------------------------------------------------------------------------------- Start by describing what you want to build in your preferred language. v0 will generate a working application based on your description. Try these simple prompts to get started: * **"A todo app with add, edit, and delete functionality"** * **"A landing page for a SaaS product with hero section and pricing"** * **"A dashboard showing user analytics with charts"** * **"A contact form that sends emails"** [Learn more about text prompting](https://v0.app/docs/text-prompting) [Iterate: Refine your application](https://v0.app/docs/quickstart#iterate-refine-your-application) --------------------------------------------------------------------------------------------------- Once v0 generates your initial application, you can iterate and improve it through conversation. ### [Edit the Code](https://v0.app/docs/quickstart#edit-the-code) 1. **Switch to Code view** by clicking the "Code" tab 2. **Make direct edits** to the generated code 3. **Ask for changes** in natural language: "Add a search bar to the product list" [Learn more about code editing](https://v0.app/docs/code-editing) ### [Design Mode](https://v0.app/docs/quickstart#design-mode) 1. **Switch to Design mode** to visually edit your UI 2. **Select elements** to modify their styles 3. **Preview changes** in real-time [Learn more about design mode](https://v0.app/docs/design-mode) [Integrate: Connect external services](https://v0.app/docs/quickstart#integrate-connect-external-services) ----------------------------------------------------------------------------------------------------------- Add real functionality to your application by integrating with databases, APIs, and external services. Open the **Connect** panel on the chat sidebar to browse and install integrations, or prompt v0 directly: "Connect a database to my app". ### [Databases](https://v0.app/docs/quickstart#databases) Install database integrations directly from the Connect panel: * **Neon** - Serverless PostgreSQL * **Supabase** - PostgreSQL with auth and realtime * **Upstash for Redis** - Serverless Redis * **Blob** - File storage [Learn more about database integrations](https://v0.app/docs/databases) ### [AI Models](https://v0.app/docs/quickstart#ai-models) v0 includes [Vercel AI Gateway](https://vercel.com/ai-gateway) integration, which automatically configures your API key using your Vercel account. This gives you access to hundreds of AI models through a single endpoint. Install AI providers from the Connect panel with one click: * **Groq** - Fast inference * **Grok** - xAI models * **fal** - Image generation * **Deep Infra** - Open source models You can also use other third-party providers like OpenAI or Anthropic by prompting v0 and adding your API keys in **Vars**. [Learn more about AI integrations](https://v0.app/docs/ai-models) ### [Payments](https://v0.app/docs/quickstart#payments) Add payment processing to your application: * **Stripe** - Accept payments and manage subscriptions ### [External APIs](https://v0.app/docs/quickstart#external-apis) 1. **Describe the integration**: "Connect to Twilio for SMS notifications" 2. **v0 will generate** the necessary API calls and error handling 3. **The integration wizard** will prompt you to add your API keys after generation 4. **To edit or add keys manually**, use **Vars** on the chat sidebar [Learn more about API integrations](https://v0.app/docs/external-apis) [Ship: Publish to production](https://v0.app/docs/quickstart#ship-publish-to-production) ----------------------------------------------------------------------------------------- Publish your application to the web with one click using Vercel's enterprise-grade infrastructure. 1. **Click "Publish"** in the top right corner 2. **Click "Publish to Production"** 3. **Wait for publishing**: usually 30-60 seconds 4. **Get your live URL** - your app is now accessible worldwide 5. **Make changes** to your code or chat with v0 6. **Click "Publish Changes"** to update production [Learn more about deployments](https://v0.app/docs/deployments) ### [Add a custom domain](https://v0.app/docs/quickstart#add-a-custom-domain) Add a custom domain directly from v0: * **From Publish**: Click "Publish" → "Customize Domain" * **From Settings**: Open **Settings** in the chat sidebar → "Domains" Customize your default domain (your-domain.vercel.app) or connect a custom domain. You can also purchase domains via [Vercel Domains](https://vercel.com/domains) . [Learn more about custom domains](https://v0.app/docs/custom-domains) [Manage: Organize and collaborate](https://v0.app/docs/quickstart#manage-organize-and-collaborate) --------------------------------------------------------------------------------------------------- Organize your work into projects, manage your account, and collaborate with your team. ### [Projects](https://v0.app/docs/quickstart#projects) Use the chat sidebar to manage your project: * **Design** - Create and manage your design system * **Git** - Connect and manage your GitHub repository * **Connect** - Install and manage integrations * **Vars** - Add, edit, and remove environment variables * **Rules** - Set project-specific instructions and context * **Settings** - Configure project settings, domains, and more [Learn more about projects](https://v0.app/docs/projects) ### [Team collaboration](https://v0.app/docs/quickstart#team-collaboration) 1. **Invite team members** via email 2. **Set permissions**: viewer, member, admin, etc. 3. **Track usage** and manage credits [Learn more about teams](https://v0.app/docs/teams) [Learn more about pricing](https://v0.app/docs/pricing) [Embed: Use v0 everywhere](https://v0.app/docs/quickstart#embed-use-v0-everywhere) ----------------------------------------------------------------------------------- Use v0 in your existing development workflow. * [Cursor](https://v0.app/docs/cursor) * [Zed](https://v0.app/docs/zed) * [Cline](https://v0.app/docs/cline) * [OpenAI Codex](https://v0.app/docs/openai-codex) Or, use the v0 [Model API](https://v0.app/docs/v0-model-api) in your own tools. [Next steps](https://v0.app/docs/quickstart#next-steps) -------------------------------------------------------- Now that you understand the basics, try [building a simple app](https://v0.app/) or explore the [community templates](https://v0.app/templates) . [Need help?](https://v0.app/docs/quickstart#need-help) ------------------------------------------------------- * **Community Forum**: Ask questions in the [community forum](https://community.vercel.com/tag/v0) * **Vercel Support**: Contact support at [vercel.com/help](https://vercel.com/help) * **X Community**: Join the [v0 community on X](https://x.com/i/communities/1863294272687980838) [Ready to start building?](https://v0.app/) [Vercel Integration\ \ How v0 and Vercel work in tandem.](https://v0.app/docs/vercel-integration) [FAQs\ \ Common questions about what v0 is, how it works, and how to build with it.](https://v0.app/docs/faqs) ---