---
title: Overview
description: Core concepts, capabilities, and architecture
product: Platform API
type: overview
---

# Overview



v0 turns your ideas into real web apps using natural language. Describe what you want and the v0 agent builds it for you with best in class architecture. The v0 API gives you programmatic access to all of v0's capabilities.

## What can you build with the Platform API? [#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 [#core-concepts]

### Chats [#chats]

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

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

// Start a chat with AI generation
const chat = await v0.chats.create({
  message: 'Create a todo app with React and TypeScript',
})
```

### Messages [#messages]

Messages represent the conversation between users and the AI agent. Each message has a `role` (user or assistant) and contains `parts` with the full agent trace including thinking, file operations, and tool calls.

```typescript
// Send a follow-up message
const response = await v0.messages.send({
  chatId: chat.id,
  message: 'Add dark mode support',
})
```

### Deployments [#deployments]

Deploy your chats to production with built-in hosting:

```typescript
const deployment = await v0.chats.deploy({
  chatId: chat.id,
})
```

## API Architecture [#api-architecture]

### Base URL [#base-url]

All API requests are made to:

```
https://api.v0.app
```

### RESTful Design [#restful-design]

The API follows REST principles with predictable resource URLs:

```
GET    https://api.v0.app/v2/chats              # List chats
POST   https://api.v0.app/v2/chats              # Create chat
GET    https://api.v0.app/v2/chats/:id          # Get chat
DELETE https://api.v0.app/v2/chats/:id          # Delete chat

GET    https://api.v0.app/v2/chats/:id/messages # Get messages
POST   https://api.v0.app/v2/chats/:id/messages # Send message
```

### Authentication [#authentication]

All requests require API key authentication. Use `createClient()` to set the API key.

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

// Add API key
const v0 = createClient({
  apiKey: process.env.V0_API_KEY,
})
```

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

### Error Handling [#error-handling]

Consistent error responses across all endpoints:

```json
{
  "message": "Chat not found"
}
```

## Integration Patterns [#integration-patterns]

### 1. Direct API Usage [#1-direct-api-usage]

Use the core SDK for full control:

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

// Create and iterate on a chat
const chat = await v0.chats.create({
  message: 'Build a dashboard with charts',
})

// Send follow-up messages
await v0.messages.send({
  chatId: chat.id,
  message: 'Add a dark mode toggle',
})
```

### 2. Streaming Responses [#2-streaming-responses]

Handle real-time streaming for responsive UIs:

```typescript
const stream = await v0.messages.sendStream({
  chatId: chat.id,
  message: 'Add authentication',
})

for await (const event of stream) {
  switch (event.object) {
    case 'message':
      // Initial or final message snapshot
      console.log(event.parts)
      break
    case 'message.parts.chunk':
      // Incremental content update
      break
    case 'message.usage':
      // Token usage and credits
      console.log(event.usage)
      break
  }
}
```

### 3. Webhook Integration [#3-webhook-integration]

Receive notifications for chat events:

```typescript
// Register a webhook
await v0.webhooks.create({
  url: 'https://your-app.com/webhooks/v0',
  events: ['chat.message.created', 'chat.deployed'],
})
```

## Security & Privacy [#security--privacy]

### API Security [#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 [#data-privacy]

* **Your code** remains private and is not used for training
* **Data** is encrypted at rest and in transit
* **Access logs** are maintained for security auditing

### Best Practices [#best-practices]

* **Store API keys securely** using environment variables
* **Rotate keys regularly** for enhanced security
* **Monitor usage** for unusual activity patterns

## Getting Started [#getting-started]

### 1. Get Your API Key [#1-get-your-api-key]

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

### 2. Install the SDK [#2-install-the-sdk]

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

### 3. Make Your First Call [#3-make-your-first-call]

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

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

### 4. Explore the Guides [#4-explore-the-guides]

* [Organizations](/api/v2/guides/organizations) - Manage teams and API keys
* [OAuth MCP Servers](/api/v2/guides/oauth-mcp-servers) - Connect OAuth-protected MCP tools

## Support & Resources [#support--resources]

### Documentation [#documentation]

* **[API Reference](/api/v2/reference/chats/list-chats)** - Complete endpoint documentation
* **[Guides](/api/v2/guides/organizations)** - Step-by-step tutorials

### Community [#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 [#enterprise]

* **Custom integrations** for enterprise workflows
* **Dedicated support** and priority assistance
* **SLA guarantees** and priority support

Contact [enterprise@vercel.com](mailto:enterprise@vercel.com) for enterprise inquiries.
