GoogleCloudPlatform / vertex-ai-creative-studio
- четверг, 6 ноября 2025 г. в 00:00:02
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.
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.
Browser Compatibility: For the best experience, we recommend using Google Chrome. Some features may not work as expected on other browsers, such as Safari or Firefox.
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
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.
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
Combined Workflows
Prompting Techniques
Image Generation & Analysis
Audio & Video
...and much more! For a full, detailed list of all experiments, please see the Experiments README.
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:
You'll need the following
Download the source
git clone https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio.gitThe following environment variables are the minimum required to deploy the application.
us-central1. Prior to selecting a different region, validate the GenAI models needed are available here.gcloud below or you can enter it manually.Replace the example values and execute the script below:
export REGION=us-central1 PROJECT_ID=$(gcloud config get project)
export INITIAL_USER=admin@example.comFollow 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.
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.comMake sure your command line is in the folder containing this README (i.e., in the root of the main repository, /). 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 applyA 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.
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.
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.shWith 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.
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.
Make sure your command line is in the folder containing this README (i.e., in the root of the main repository, /). 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 applyMake 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.
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.shThe 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-studioCongratulations, you can now navigate to the address provided in the cloud-run-app-url Terraform output.
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.
As new features and fixes are added to GenMedia Creative Studio, you will want to update your deployment. You do not need to destroy your existing infrastructure.
If you only need to update the application code (Python files, UI changes):
git pull./build.shThis script submits a new build to Cloud Build, creates a new container image, and updates the existing Cloud Run service.
If the updates include changes to the Terraform configuration (e.g., new environment variables, new Google Cloud services):
git pullterraform init -upgradeterraform applyWith any of the deployment options above that use IAP, if you need to add additional users, there are two steps to take to make sure those users can both access the application and the images generated:
assets-bucket Terraform output.Note: For the application to function correctly, the Cloud Run service account must have the
Storage Object Viewer(roles/storage.objectViewer) role on the GCS bucket. This allows the application to read media assets and serve them to users through the proxy.
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.
The above diagram depicts the components that make up the Creative Studio solution. Items of note:
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.
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 projectSee the template dotenv.template file for the defaults and what environment variable options are available.
Once you have your environment variables set, either on the command line or an in .env file:
uv run main.pyPlease 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.
When developing this app, since it's a FastAPI application that serves Mesop, please use the following
uv run main.pyTraditional Mesop hot reload capabilities (i.e. mesop main.py) are not fully available at this time.
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.
Code in this repository is licensed under the Apache 2.0. See LICENSE.
This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.