| name | veo-setup |
| description | Configure Google Cloud project and authentication for Veo video generation. Creates or configures GCP project, enables APIs, sets up service account, and configures environment variables. |
This skill configures Google Cloud Platform for Veo video generation. Handles project creation, API enablement, service account setup, and environment variable configuration.
Prerequisites Check
Before starting, verify gcloud CLI is installed:
gcloud --version
If not installed, direct user to: https://cloud.google.com/sdk/docs/install
Setup Flow
Step 1: Determine Project Strategy
Ask the user:
- Use existing project - They have a GCP project ready
- Create new project - Need to create one from scratch
Step 2: Project Configuration
Option A: Existing Project
gcloud projects list
gcloud config set project PROJECT_ID
Verify billing is enabled:
gcloud billing accounts list
gcloud billing projects describe PROJECT_ID
If billing not enabled, instruct user to enable at:
https://console.cloud.google.com/billing/linkedaccount?project=PROJECT_ID
Option B: New Project
gcloud projects create PROJECT_ID --name="PROJECT_NAME"
gcloud config set project PROJECT_ID
Link billing account:
gcloud billing accounts list
gcloud billing projects link PROJECT_ID --billing-account=BILLING_ACCOUNT_ID
Step 3: Enable Required APIs
gcloud services enable aiplatform.googleapis.com
gcloud services list --enabled --filter="name:aiplatform"
Step 4: Create Service Account
gcloud iam service-accounts create veo-generator \
--display-name="Veo Video Generator" \
--description="Service account for Veo AI video generation via Vertex AI"
gcloud iam service-accounts list --filter="email:veo-generator"
Step 5: Grant IAM Permissions
SA_EMAIL="veo-generator@PROJECT_ID.iam.gserviceaccount.com"
gcloud projects add-iam-policy-binding PROJECT_ID \
--member="serviceAccount:$SA_EMAIL" \
--role="roles/aiplatform.user"
gcloud projects get-iam-policy PROJECT_ID \
--flatten="bindings[].members" \
--filter="bindings.members:$SA_EMAIL" \
--format="table(bindings.role)"
Step 6: Create Service Account Key
gcloud iam service-accounts keys create ~/veo-service-account.json \
--iam-account=veo-generator@PROJECT_ID.iam.gserviceaccount.com
ls -la ~/veo-service-account.json
Security note: This key file grants access to your GCP project. Keep it secure and never commit to version control.
Step 7: Configure Environment Variables
Detect user's shell and update appropriate config file.
For zsh (default on macOS):
grep -q "GOOGLE_CLOUD_PROJECT" ~/.zshrc && echo "Already configured" || echo "Not configured"
cat >> ~/.zshrc << 'EOF'
export GOOGLE_CLOUD_PROJECT="PROJECT_ID"
export GOOGLE_CLOUD_LOCATION="us-central1"
export GOOGLE_APPLICATION_CREDENTIALS="$HOME/veo-service-account.json"
EOF
source ~/.zshrc
For bash:
cat >> ~/.bashrc << 'EOF'
export GOOGLE_CLOUD_PROJECT="PROJECT_ID"
export GOOGLE_CLOUD_LOCATION="us-central1"
export GOOGLE_APPLICATION_CREDENTIALS="$HOME/veo-service-account.json"
EOF
source ~/.bashrc
Step 8: Authenticate Application Default Credentials
gcloud auth application-default login
This opens a browser for OAuth authentication.
Step 9: Verify Complete Setup
Run all verification checks:
echo "=== Verification ==="
echo "Project: $GOOGLE_CLOUD_PROJECT"
echo "Location: $GOOGLE_CLOUD_LOCATION"
echo "Credentials: $GOOGLE_APPLICATION_CREDENTIALS"
if [ -f "$GOOGLE_APPLICATION_CREDENTIALS" ]; then
echo "✓ Credentials file exists"
else
echo "✗ Credentials file NOT FOUND"
fi
if gcloud auth application-default print-access-token > /dev/null 2>&1; then
echo "✓ Authentication working"
else
echo "✗ Authentication FAILED"
fi
if gcloud services list --enabled --filter="name:aiplatform" --format="value(name)" | grep -q aiplatform; then
echo "✓ Vertex AI API enabled"
else
echo "✗ Vertex AI API NOT enabled"
fi
if gcloud iam service-accounts list --filter="email:veo-generator" --format="value(email)" | grep -q veo-generator; then
echo "✓ Service account exists"
else
echo "✗ Service account NOT FOUND"
fi
echo "=== Setup Complete ==="
Quick Setup (All Steps)
For users who want to run everything at once with a new project:
PROJECT_ID="veo-video-gen"
PROJECT_NAME="Veo Video Generation"
BILLING_ACCOUNT=""
gcloud projects create $PROJECT_ID --name="$PROJECT_NAME"
gcloud config set project $PROJECT_ID
gcloud billing projects link $PROJECT_ID --billing-account=$BILLING_ACCOUNT
gcloud services enable aiplatform.googleapis.com
gcloud iam service-accounts create veo-generator --display-name="Veo Video Generator"
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member="serviceAccount:veo-generator@$PROJECT_ID.iam.gserviceaccount.com" \
--role="roles/aiplatform.user"
gcloud iam service-accounts keys create ~/veo-service-account.json \
--iam-account=veo-generator@$PROJECT_ID.iam.gserviceaccount.com
echo "" >> ~/.zshrc
echo "# Veo - Google Cloud Configuration" >> ~/.zshrc
echo "export GOOGLE_CLOUD_PROJECT=\"$PROJECT_ID\"" >> ~/.zshrc
echo "export GOOGLE_CLOUD_LOCATION=\"us-central1\"" >> ~/.zshrc
echo "export GOOGLE_APPLICATION_CREDENTIALS=\"\$HOME/veo-service-account.json\"" >> ~/.zshrc
source ~/.zshrc
gcloud auth application-default login
Troubleshooting
"Project ID already exists"
Project IDs are globally unique. Try adding a random suffix:
PROJECT_ID="veo-video-gen-$(date +%s)"
"Billing account not found"
List available billing accounts:
gcloud billing accounts list
If none listed, create one at: https://console.cloud.google.com/billing
"Permission denied creating service account"
Ensure you have Owner or Editor role on the project:
gcloud projects get-iam-policy PROJECT_ID \
--flatten="bindings[].members" \
--filter="bindings.members:user:YOUR_EMAIL"
"API not accessible"
Wait a few minutes after enabling API. If still failing:
gcloud services disable aiplatform.googleapis.com
gcloud services enable aiplatform.googleapis.com
Cleanup (If Needed)
To remove the setup:
rm ~/veo-service-account.json
gcloud iam service-accounts delete veo-generator@PROJECT_ID.iam.gserviceaccount.com
gcloud projects delete PROJECT_ID
Output
After successful setup, confirm to user:
- Project ID: The configured GCP project
- Service Account: veo-generator@PROJECT_ID.iam.gserviceaccount.com
- Credentials File: ~/veo-service-account.json
- Environment Variables: Set in shell config
- Ready to use: The
veo skill for video generation