---
title: Overview
description: Core concepts, capabilities, and architecture
product: v0 API
type: overview
related:
  - /docs/api/v1/quickstart
  - /docs/api/v1/packages/v0-sdk
---

# Overview



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 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 v0 API?

With the v0 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

### 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**

```typescript
// 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 },
  ],
})
```

### 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)

```typescript
// 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

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

Deploy your projects to production with built-in hosting:

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

## API Architecture

### Base URL

All API requests are made to:

```
https://api.v0.dev
```

### 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

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

#### Option 1: Default Client (Recommended)

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

```typescript
import { v0 } from 'v0-sdk'

// Automatically uses process.env.V0_API_KEY
const projects = await v0.projects.find()
```

Set your API key in your environment:

```bash
# .env file or environment
V0_API_KEY=your_api_key_here
```

#### 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

```typescript
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 settings](https://v0.app/settings/keys).

### Error Handling

Consistent error responses across all endpoints:

```json
{
  "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

### 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

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

### 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

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

### 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

### 1. Direct API Usage

Use the core SDK for full control:

```typescript
import { v0 } from 'v0-sdk'
// Or with custom configuration:
// import { createClient } from 'v0-sdk'
// const v0 = createClient({ apiKey: process.env.V0_API_KEY })

// Create chat
const chat = await v0.chats.init({
  type: 'files',
  files: myFiles,
})
```

### 2. AI Agent Integration

Build autonomous agents with AI SDK:

```typescript
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

Integrate with CI/CD and development tools:

```typescript
// GitHub Actions integration
const chat = await v0.chats.init({
  type: 'repo',
  repo: {
    url: `https://github.com/${context.payload.repository.full_name}`,
  },
})

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

### 4. Custom Development Tools

Build custom interfaces and experiences:

```typescript
// Custom project dashboard
function ProjectDashboard({ projectId }) {
  const { data: project } = useProject(projectId)
  const { data: chats } = useProjectChats(projectId)
  const { data: deployments } = useProjectDeployments(projectId)

  return (
    <div>
      <ProjectHeader project={project} />
      <ChatsList chats={chats} />
      <DeploymentStatus deployments={deployments} />
    </div>
  )
}
```

## Development Workflow

### Typical Development Flow

1. **Start Development Chat**
   * Use `init()` for existing code or `create()` for new features
   * Provide context about requirements and goals

2. **Iterative Development**
   * Chat with AI to generate and refine code
   * Review and modify generated components
   * Test and validate functionality

3. **Deploy and Monitor**
   * Deploy to staging for testing
   * Deploy to production when ready
   * Monitor performance and usage

### Best Practices

#### 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

* **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

* **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

### 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

* **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

* **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

### API Limits

| Resource | Limit           | Notes                                     |
| -------- | --------------- | ----------------------------------------- |
| Messages | 10,000 per chat | Older messages are automatically archived |
| Files    | 1,000 per chat  | 3MB max file size                         |

### 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

### 1. Get Your API Key

Visit [v0 settings](https://v0.app/settings/keys) to generate your API key.

### 2. Install the SDK

```bash
npm install v0-sdk
# or
pnpm add v0-sdk
```

### 3. Make Your First Call

```typescript
import { v0 } from 'v0-sdk'

// List your chats
const chats = await v0.chats.find()
console.log('Your chats:', chats)
```

### 4. Explore the Guides

* [Start from Existing Code](/docs/api/v1/guides/start-from-existing-code) - Import your codebase
* [Displaying Chat Messages](/docs/api/v1/guides/displaying-chat-messages) - Build chat interfaces
* [OAuth MCP Servers](/docs/api/v1/guides/oauth-mcp-servers) - Connect OAuth-protected MCP tools
* [Lock Files from AI Changes](/docs/api/v1/guides/lock-files-from-ai-changes) - Handle concurrent editing

### 5. Try the Examples

* [Classic v0](/docs/api/v1/examples/classic-v0) - Recreate the v0.dev experience
* [AI Tools](/docs/api/v1/examples/ai-tools) - Build autonomous agents
* [React Components](/docs/api/v1/examples/react-components) - Component development workflow

## Support & Resources

### Documentation

* **[API Reference](/docs/api/v1/quickstart)** - Complete endpoint documentation
* **[SDK Packages](/docs/api/v1/packages/v0-sdk)** - Available SDKs and tools
* **[Examples](/docs/api/v1/examples/v0-clone)** - Working code examples

### 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?

Ready to start building with the v0 API? Here are some suggested next steps:

1. **[Get Started with Quickstart](/docs/api/v1/quickstart)** - 5-minute setup guide
2. **[Choose Your Integration Pattern](/docs/api/v1/examples/v0-clone)** - Find the right example for your use case
3. **[Build Something Amazing](https://v0.app)** - Start creating with v0

The v0 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!


---

For a semantic overview of all documentation, see [/docs/sitemap.md](/docs/sitemap.md)

For an index of all available documentation, see [/docs/llms.txt](/docs/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/docs/agents.md](/docs/agents.md)