一键导入
v0
Generate and iterate on UIs/apps with Vercel v0 via the v0 Platform API. Use when building a frontend with v0, calling the v0 API/SDK, or spending v0 credits.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate and iterate on UIs/apps with Vercel v0 via the v0 Platform API. Use when building a frontend with v0, calling the v0 API/SDK, or spending v0 credits.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Discover, install, and configure Vercel Marketplace integrations (databases, auth, logging, etc.). Use when adding third-party services to a Vercel project.
Deploy, manage, and develop projects on Vercel from the command line
Deploy applications to Vercel. Use when deploying to preview or production.
Set up Vercel CLI and configure project linking. Use when first connecting a project to Vercel.
| name | v0 |
| description | Generate and iterate on UIs/apps with Vercel v0 via the v0 Platform API. Use when building a frontend with v0, calling the v0 API/SDK, or spending v0 credits. |
| allowed-tools | ["Bash","Read","Write","Edit"] |
| user_invocable | true |
v0 is Vercel's AI app builder. Beyond the web UI at
v0.app, it exposes a Platform API (and an OpenAI-compatible model API) so
you can generate UIs, components, and full apps from code.
Hackathon note: participants receive v0 credits. The API bills against those credits, so you can drive v0 from the CLI without a paid upgrade as long as credits remain. Check usage at v0.app/settings/billing.
There are two distinct surfaces — pick the right one:
| Surface | Package / endpoint | Use it for |
|---|---|---|
| Platform API | v0-sdk (npm), https://api.v0.dev/v1 | Create/iterate chats that return generated files, demos, and deployable projects. This is the real "v0 builds my app" surface. |
| Model API | AI SDK @ai-sdk/vercel, https://api.v0.dev/v1 (OpenAI-compatible) | Use v0's models (v0-1.5-md, etc.) as a chat/completions model inside your own app. |
.env (gitignored):
echo 'V0_API_KEY=your-v0-api-key' >> .env
The SDK and CLI read V0_API_KEY automatically.curl -s https://api.v0.dev/v1/user \
-H "Authorization: Bearer $V0_API_KEY" | head
A JSON user object means the key works. 401 means the key is wrong or
credits/billing aren't enabled on the account.# Spins up a Next.js app pre-wired to the v0 Platform API
pnpm create v0-sdk-app@latest my-v0-app
# or: npx create-v0-sdk-app@latest my-v0-app
pnpm add v0-sdk # or: npm install v0-sdk
import { v0 } from 'v0-sdk' // reads V0_API_KEY from the environment
// Create a chat — v0 generates the app and returns a live demo + files
const chat = await v0.chats.create({
message: 'Build a landing page for a biotech hackathon with a hero and signup form',
})
console.log('Preview:', chat.demo) // hosted preview URL
console.log('Chat:', chat.url) // open/iterate in the v0 web UI
// chat.files[] holds the generated source files
// Iterate on the same chat
const next = await v0.chats.sendMessage({
chatId: chat.id,
message: 'Make the hero dark mode and add a pricing section',
})
pnpm add ai @ai-sdk/vercel
import { generateText } from 'ai'
import { vercel } from '@ai-sdk/vercel' // reads V0_API_KEY
const { text } = await generateText({
model: vercel('v0-1.5-md'),
prompt: 'Generate a React component for a file-upload dropzone with Tailwind',
})
Or hit it directly — it's OpenAI-compatible:
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":"a pricing table component"}]}'
v0 projects deploy to Vercel. After pulling the generated files into a repo,
use the deploy skill (/vercel:deploy) or link the v0 project to Vercel from
the v0 UI. Production deploys overwrite live URLs — confirm with the user first.
V0_API_KEY in code, flags, or commits — env var only.v0-sdk (build apps) vs @ai-sdk/vercel
(use v0 as a model). They share the key and base URL but solve different jobs.v0-sdk package docs: https://v0.app/docs/api/platform/packages/v0-sdk