v0 Platform API/Guides
Environment Variables
Learn how to manage environment variables and configuration in v0 projects
Learn how to securely manage environment variables and configuration settings in your v0 projects. Environment variables are tied to projects, making them available across all chats in that project.
Overview
Environment variables in v0 provide a secure way to manage:
- API keys and secrets - Database connections, third-party services
- Configuration settings - Feature flags, deployment settings
- Build-time variables - Framework configurations, asset paths
Environment variables are project-scoped, meaning all chats in a project have access to the same environment variables.
Managing Environment Variables
Creating Variables
Reading Variables
Updating Variables
Deleting Variables
Getting Individual Variables
Usage in Development
Chat Context
Environment variables are automatically available in chat sessions when you link your chat to a project:
Best Practices
1. Secure Secrets Management
2. Consistent Naming
3. Documentation
Document your environment variables for team members: