vertex-ai-creative-studio

vertex-ai-creative-studio

GenMedia Creative Studio is a Vertex AI generative media user experience highlighting the use of Imagen, Veo, Gemini 🍌, Gemini TTS, Chirp 3, Lyria and other generative media APIs on Google Cloud.

Stars: 418

Visit
 screenshot

GenMedia Creative Studio is an application showcasing the capabilities of Google Cloud Vertex AI generative AI creative APIs. It includes features like Gemini for prompt rewriting and multimodal evaluation of generated images. The app is built with Mesop, a Python-based UI framework, enabling rapid development of web and internal apps. The Experimental folder contains stand-alone applications and upcoming features demonstrating cutting-edge generative AI capabilities, such as image generation, prompting techniques, and audio/video tools.

README:

GenMedia Creative Studio | Vertex AI

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program. This project is intended for demonstration purposes only. It is not intended for use in a production environment.

GenMedia Creative Studio v.next

GenMedia Creative Studio v.next

Table of Contents

GenMedia Creative Studio

GenMedia Creative Studio is a web application showcasing Google Cloud's generative media - Veo, Lyria, Chirp, Gemini 2.5 Flash Image Generation (nano-banana), and Gemini TTS along with custom workflows and techniques for creative exploration and inspiration. We're looking forward to see what you create!

Current featureset

  • Image: Imagen 3, Imagen 4, Virtual Try-On, Gemini 2.5 Flash Image Generation
  • Video: Veo 2, Veo 3
  • Music: Lyria
  • Speech: Chirp 3 HD, Gemini Text to Speech
  • Workflows: Character Consistency, Shop the Look, Starter Pack Moodboard, Interior Designer
  • Asset Library

This is built using Mesop, an open source Python framework used at Google for rapid AI app development, and the scaffold for Studio style apps.

Experiments

The Experimental folder contains a variety of stand-alone applications and new and upcoming features that showcase cutting-edge capabilities with generative AI.

Here's a glimpse of what you'll find:

MCP Tools

  • MCP Tools for Genmedia: Model Context Protocol servers for Veo, Imagen, Lyria, Chirp, and Gemini to bring creativity to your agents.

Combined Workflows

  • Countdown Workflow: An automated two-stage pipeline to create branded countdown videos.
  • Storycraft: An AI-powered video storyboard generation platform that transforms text descriptions into complete video narratives.
  • Creative GenMedia Workflow: An end-to-end workflow to produce high-quality, on-brand creative media.

Prompting Techniques

  • Promptlandia: A powerful web app to analyze, refine, and improve your prompts.
  • Veo Genetic Prompt Optimizer: An automated system to evolve and refine high-level "metaprompts" for Veo.
  • Character & Item Consistency: Workflows for maintaining consistency for characters and items across video scenes.

Image Generation & Analysis

  • Virtual Try-On: A notebook for virtually trying on outfits at scale.
  • Imagen Product Recontextualization: Tools for large-scale product image recontextualization.
  • Arena: A visual arena for rating and comparing images from different models.

Audio & Video

  • Creative Podcast Assistant: A notebook for creating a podcast with generative media.
  • Babel: An experimental app for Chirp 3 HD voices.

...and much more! For a full, detailed list of all experiments, please see the Experiments README.

Deploying GenMedia Creative Studio

Deployment of GenMedia Creative Studio is accomplished using a combination of Terraform and Cloud Build. Terraform is used to deploy the infrastructure and Cloud Build is used to create the container image and update the Cloud Run service to use it.

You have two deployment options for this application:

  1. Deploy using a custom domain. Use this if:
    • You need to support external identities. Included Terraform script does not support this; however, you can customize the script.
    • You prefer more control over the domain used
  2. Deploy using the autogenerated Cloud Run Domain. Use this if:

Prerequisites

You'll need the following

  • An existing Google Cloud Project
  • If you want to use a custom domain, you need the ability to create a DNS A record for your target domain that resolves to the provisioned load balancer

1. Download the source code for this project

Download the source

git clone https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio.git

2. Export Environment Variables

The following environment variables are the minimum required to deploy the application.

  • REGION - Should be set to us-central1. Prior to selecting a different region, validate the GenAI models needed are available here.
  • PROJECT_ID - Set to the desired Google Cloud project's ID, obtained via gcloud below or you can enter it manually.
  • DOMAIN_NAME - Update with the DNS name to be used to reach the web application (e.g., creativestudio.example.com). A Google Cloud Managed certificate will be created for this domain.
  • INITIAL_USER - Email address of initial user given access to the web application (e.g., [email protected])

Replace the example values and execute the script below:

export REGION=us-central1 PROJECT_ID=$(gcloud config get project) 
export [email protected]

Deploying with Custom Domain

Follow these steps if you are going to deploy GenMedia Creative Studio using your own custom domain. You will need the ability to create a DNS A record if you choose this deployment option.

1. Initialize Terraform

Because you are using a custom domain, you will need to export one more variable with the DNS name for the domain that will be used to navigate to GenMedia Creative Studio.

export DOMAIN_NAME=creativestudio.example.com

Make sure your command line is in the folder containing this README (i.e., experiments/veo-app). Then create the terraform.tfvars using the following command:

cat > terraform.tfvars << EOF
project_id = "$PROJECT_ID"
initial_user = "$INITIAL_USER"
domain = "$DOMAIN_NAME"
EOF

terraform init
terraform apply

2. Create a DNS A record for the domain name

A load balancer and a Google Cloud managed certificate are provisioned by the Terraform configuration file. You must create a DNS A record that resolves to the IP address of the provisioned load balancer. Below is a sample output from running the terraform apply command, showing where the provisioned application balancer's IP is displayed.

Load Balancer IP Address

If you use Google Cloud DNS, follow the steps here. Provisioning a Google-managed certificate might take up to 60 minutes from the moment your DNS and load balancer configuration changes have propagated across the internet.

If you take too long to create the A record, usually >15 minutes or the DNS entry resolves to any other IP address than the load balancer's, provisioning of the Google Cloud Managed certificate may fail with a status of FAILED_NOT_VISIBLE. If this is the case, make sure the DNS A record is updated correctly and follow the steps here.

3. Build and Deploy Container Image

A shell script, build.sh, is included in this repo that submits a build to Cloud Build which builds and deploys the application's container image. Use the following command:

./build.sh

4. Wait for certificate to go to provisioned state

With both the infrastructure and application deployed, you are just waiting for the certificate to complete provisioning. Once you see the status as "ACTIVE" and the "In use by" section populated (see sample below), your application is ready for use. You can navigate to the Certificate Manager GCP Console page, and select the certificate to keep an eye on the status.

Provisioned Certificate

Deploying using Cloud Run Domain

If you are unable to create a DNS record in your corporate domain, you can also use the autogenerated Cloud Run domain along with it's preview support for IAP to secure the endpoint.

Currently, Cloud Run's integration with IAP is a preview feature and is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the Service Specific Terms. Pre-GA features are available "as is" and might have limited support. For more information, see the launch stage descriptions.

1. Initialize Terraform

Make sure your command line is in the folder containing this README (i.e., experiments/veo-app). Then create the terraform.tfvars using the following command:

cat > terraform.tfvars << EOF
project_id = "$PROJECT_ID"
initial_user = "$INITIAL_USER"
use_lb = false
EOF

terraform init
terraform apply

Make sure to take note of the Cloud Run URL that is output. This is what you will navigate to in your browser to access the application. Before doing that though, you need to build and deploy the container image.

Cloud Run URL output

2. Build and Deploy Container Image

A shell script, build.sh, is included in this repo that submits a build to Cloud Build which builds and deploys the application's container image. Use the following command:

./build.sh

3. Edit Cloud Run's IAP Policy to provide initial user's access

The last step is to change the IAP policy of the Cloud Run service to provide access to a user. You can also use a group but for the purposes of this example, a single user is given access.

gcloud beta iap web add-iam-policy-binding \
--project=$PROJECT_ID \
--region=$REGION \
--member=user:$INITIAL_USER \
--role=roles/iap.httpsResourceAccessor \
--resource-type=cloud-run \
--service=creative-studio

Congratulations, you can now navigate to the address provided in the cloud-run-app-url Terraform output.

Deploying to Cloud Shell for Testing

Use this option if you want to quickly run the UI without having to setup a local development environment. To get started, use Cloud Shell and follow the tutorial instructions.

Open in Cloud Shell

Solution Design

There are two way to deploy this solution. One using a custom domain with a load balancer and IAP integration. The other is using Cloud Run's default URL and integrating IAP with Cloud Run. The below diagrams depict the components used for each option.

Custom Domain Using Identity Aware Proxy w/Load Balancer

Solution Design - LB IAP

Cloud Run Domain Using Identity Aware Proxy w/Cloud Run

Solution Design - Cloud Run IAP

The above diagram depicts the components that make up the Creative Studio solution. Items of note:

  • DNS entry is not deployed as part of the provided Terraform configuration files. You will need to create a DNS A record that resolves to the IP address of the provisioned load balancer so that certificate provisioning succeeds.
  • Users are authenticated with Google Accounts and access is managed through Identity Aware Proxy (IAP). IAP does support external identities and you can learn more here.

Solution Components

Runtime Components

  • Load Balancer - Provides the HTTP access to the Cloud Run hosted application
  • Identity Aware Proxy - Limits access to web application for only authenticated users or groups
  • Cloud Run - Serverless container runtime used to host Mesop application
  • Cloud Firestore - Data store for the image / video / audio metadata. If you're new to Firebase, a great starting point is here.
  • Cloud Storage - A bucket is used to store the image / video / audio files

Build time Components

  • Cloud Build - Uses build packs to create the container images, push them to Artifact Registry and update the Cloud Run service to use the latest image version. To simplify deployment, connections to a GitHub project and triggers are not deployed w/Terraform. The source code that was cloned locally is compressed and pushed to Cloud Storage. It is this snapshot of the source that is used to build the container image.
  • Artifact Registry - Used to store the container images for the web aplication
  • Cloud Storage - A bucket is used to store a compressed file of the source used for the build

Setting up your development environment

Python virtual environment

A python virtual environment, with required packages installed.

Using the uv virtual environment and package manager:

# sync the requirements to a virtual environment
uv sync

If you've done this before, you can also use the command uv sync --upgrade to check for any package version upgrades.

Application Environment variables

Use the included dotenv.template and create a .env file with your specific environment variables.

Only one environment variable is required:

  • PROJECT_ID your Google Cloud Project ID, obtained via gcloud config get project

See the template dotenv.template file for the defaults and what environment variable options are available.

GenMedia Creative Studio - Developing

Running

Once you have your environment variables set, either on the command line or an in .env file:

uv run main.py

Developing

Please see the Developer's Guide for more information on how this application was built, including specific information about Mesop and the scaffold for Studio style apps.

Using the Mesop app in a virtual environment provides the best debugging and building experience as it supports hot reload.

source .venv/bin/activate

Start the app, use the Mesop command in your python virutal environment

mesop main.py

Contributing changes

Interested in contributing? Please open an issue describing the intended change. Additionally, bug fixes are welcome, either as pull requests or as GitHub issues.

See CONTRIBUTING.md for details on how to contribute.

Licensing

Code in this repository is licensed under the Apache 2.0. See LICENSE.

Disclaimer

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for vertex-ai-creative-studio

Similar Open Source Tools

For similar tasks

For similar jobs