// api reference

API Reference

Tools, parameters, and response shapes.

generate

Prompt → UI. Returns chatId, webUrl, files (path + content). Optional chatId to iterate.

parameters

promptstringrequired

What to generate (e.g. "A pricing table with 3 tiers")

chatIdstringoptional

Continue an existing chat instead of starting new

projectIdstringoptional

Associate with a project

request

{
  "prompt": "Create a modern pricing table with 3 tiers: Basic, Pro, and Enterprise. Include feature lists and CTA buttons."
}

response

{
  "chatId": "chat_abc123",
  "webUrl": "https://v0.dev/chat/chat_abc123",
  "files": [
    { "path": "pricing-table.tsx", "content": "..." }
  ]
}

request

Generic {resource, action, params} dispatcher. Deploy, list/get/delete chats, versions, projects, env vars, reports.

quick start

Quick Start

1. Get your API key

  1. Go to v0.dev/chat/settings/keys
  2. Click "Generate New Key"
  3. Copy your key

2. Configure your client

# Set your API key
export V0_API_KEY="your-key"

# Run the MCP server
npx v0-mcp-server
workflow

Typical Workflow

1

Generate

Create a component

generate
2

Iterate

Refine with chatId

generate
3

Retrieve

Get the files

request {chats.get}
4

Deploy

Go live

request {deployments.create}