Author: Wafae Bakkali
V-Start is an experimental toolkit that helps users easily and quickly create effective prompts for Veo and evaluate how well generated videos align with their intended prompts. The main goal is to simplify the process of creating high-quality videos with Veo.
V-Start is divided into two main categories: Prompting and Evaluation.
- Prompt Generator: Generate expert-level prompts based on the ideal structure for Veo, with support for both Text-to-Video and Image-to-Video and options for short or long outputs. For Image-to-Video, a base description is automatically generated from the uploaded image, which can then be customized.
- Prompt Enhancer: Improve an existing prompt by leveraging Gemini to enhance its cinematic detail and effectiveness.
- Prompt Converter: Convert prompts between different formats, such as Plain Text, JSON, YAML or XML.
- Timeline Prompting: Create multi-shot scenes by sequencing multiple prompts, defining the start and end times for each action to build a detailed narrative.
- Gallery: Explore a curated library of high-quality video examples and copy their prompts for inspiration.
- Alignment Eval: An autorater that provides an objective score (0-100%) of how well a video matches its prompt. You can evaluate a single prompt-video pair or process multiple pairs in bulk by pasting data directly into the tool or uploading a CSV file from your local machine. The tool works by breaking the prompt into sub-questions, and Gemini uses its Visual Question Answering (VQA) capabilities to score the video's alignment. All results can be stored for further analysis.
- Side-by-Side Comparison: Compare videos side-by-side to gather human feedback. Participate in existing studies (like prompt format evaluation) or create your own for qualitative evaluation. Results can be stored for further analysis.
- Backend: Node.js with Express.js
- Frontend: HTML, CSS, and modern vanilla JavaScript (ES modules)
- Styling: Tailwind CSS (via CDN) with a custom dark mode theme.
- Core AI: Google Gemini API (specifically gemini-2.5-pro)
- Deployment: The application also includes a Dockerfile for containerization.
The repository is organized as follows:
/
βββ .env.example # Example environment file for new contributors
βββ .gitignore # Specifies files to be ignored by Git
βββ CONTRIBUTING.md # Guidelines for contributing to the project
βββ Dockerfile # Defines the Docker container for the application
βββ index.html # The main HTML file for the single-page application
βββ LICENSE # The Apache 2.0 open-source license for the project
βββ package.json # Lists project dependencies and scripts
βββ package-lock.json # Records exact versions of dependencies
βββ README.md # The project's readme file
βββ server.js # The Node.js/Express backend server
βββ style.css # Main stylesheet for the application
β
βββ data/ # Contains static data and assets
β βββ V-Start.png # Screenshot of the application UI
β βββ veo-youtube-study.json # Data for the A/B evaluation study
β
βββ src/ # Contains all frontend JavaScript source code
βββ api.js # Handles the fetch call to the backend Gemini API
βββ main.js # The main entry point for the frontend application logic
βββ ui.js # Contains UI helper functions (e.g., notifications, toast:
β
βββ features/ # Each file represents a major feature/tab in the UI
β βββ alignment-eval.js
β βββ converter.js
β βββ enhancer.js
β βββ eval.js
β βββ gallery.js
β βββ generator.js
β βββ timeline.js
β
βββ templates/ # Contains the HTML templates for each feature
βββ alignment-eval.html
βββ converter.html
βββ enhancer.html
βββ eval.html
βββ gallery.html
βββ generator.html
βββ timeline.html
Public URL: https://v-start-604101121820.us-central1.run.app/
The public instance is rate-limited to 50 requests per hour per IP address. For unlimited usage, deploy your own instance (see Deployment section below).
The recommended way to deploy this application is directly from source to Google Cloud Run. When you deploy from source, Cloud Build automatically uses the Dockerfile in your repository to build and deploy your container.
- A Google Cloud Project with billing enabled.
- The Google Cloud SDK (gcloud CLI) installed and authenticated.
-
Set your project ID:
export PROJECT_ID="your-gcp-project-id" gcloud config set project $PROJECT_ID
-
Enable required services:
gcloud services enable run.googleapis.com cloudbuild.googleapis.com artifactregistry.googleapis.com -
Deploy the application:
gcloud run deploy v-start \ --source . \ --region us-central1 \ --allow-unauthenticated \ --max-instances 2 \ --memory 256Mi \ --cpu 0.5 \ --clear-env-varsImportant: The
--clear-env-varsflag ensures no API keys are deployed with the service. Users will provide their own keys through the UI. -
Get your service URL:
gcloud run services describe v-start --region us-central1 --format 'value(status.url)' -
Grant Access Permissions:
After deploying, make sure to enforce IAP by granting access permissions to authorized users or groups. For detailed instructions, please follow the official documentation.
Official Guide: Securing Cloud Run services with IAP
Follow these instructions to get a copy of the project up and running on your local machine.
- Node.js (v18 or later recommended)
- npm (usually comes with Node.js)
- Authentication setup (see Authentication Setup section above)
-
Clone the repository:
git clone https://github.com/GoogleCloudPlatform/generative-ai.git cd vision/sample-apps/V-Start -
Install NPM packages:
npm install
-
Set up your environment variables (optional for local development): Create a file named
.envin the root of the project by copying the example file.cp .env.example .env
Open the
.envfile and add your Gemini API Key (if using Method 2):API_KEY=your_gemini_api_key_hereNote: This is optional for local development convenience. You can also provide the API key through the UI. Never deploy with API keys in environment variables.
-
Run the server:
npm start
-
Open your browser and navigate to
http://localhost:8080.
V-Start supports two authentication methods for flexibility. Users must provide their own API keys through the UI. Keys are never stored on the server.
This method uses your own Google Cloud Project.
-
Set up a Google Cloud Project:
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Enable billing for your project
-
Enable required APIs:
# Set your project ID export PROJECT_ID="your-gcp-project-id" gcloud config set project $PROJECT_ID # Enable Vertex AI API gcloud services enable aiplatform.googleapis.com
-
Install and authenticate gcloud CLI:
- Install the Google Cloud SDK
- Authenticate with your Google account:
gcloud auth login
-
Get your access token:
gcloud auth print-access-token
Note: Access tokens expire after 1 hour. You'll need to run this command again to get a new token when it expires.
-
Use in V-Start:
- In the V-Start UI, select "gcloud Access Token" as your authentication method
- Enter your Project ID and the access token from step 4
-
Get your API Key:
- Go to Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Choose "Create API key in new project" or select an existing project
- Copy the generated API key
-
Use in V-Start:
- In the V-Start UI, select "API Key" as your authentication method
- Enter your API key (it will be used directly for API calls, never stored)
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for the full license text.
Contributions are welcome! Please see the CONTRIBUTING.md file for guidelines on how to report bugs, suggest enhancements, or submit pull requests.
