v0 Platform API/Guides
Start from Existing Code
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
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
Basic Repository Import
Lock Files from Modification
Importing from Files
Upload Individual Files
Upload from URLs
Importing from Zip Archives
Importing from Community Registries
For specialized use cases, you can import from component registries:
Working with Projects
Create Project and Chat Together
Chat vs Init vs Create
When to Use chats.init()
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()
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