Learn how to use Imagen on Vertex AI's text-to-image generation feature and verify a digital watermark (SynthID) on a generated image. This quickstart shows you how to use Imagen image generation in the Google Cloud console.
Imagen on Vertex AI pricing is based on the feature you use. For more information, see Pricing.

Before you begin
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Vertex AI API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles. -
Make sure that you have the following role or roles on the project: Vertex AI User
Check for the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
-
In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.
- For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
Grant the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
- Click Grant access.
-
In the New principals field, enter your user identifier. This is typically the email address for a Google Account.
- In the Select a role list, select a role.
- To grant additional roles, click Add another role and add each additional role.
- Click Save.
-
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Vertex AI API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles. -
Make sure that you have the following role or roles on the project: Vertex AI User
Check for the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
-
In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.
- For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
Grant the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
- Click Grant access.
-
In the New principals field, enter your user identifier. This is typically the email address for a Google Account.
- In the Select a role list, select a role.
- To grant additional roles, click Add another role and add each additional role.
- Click Save.
-
Generate images and save a local copy
Send the text-to-image generation request using the Google Cloud console.
In the Google Cloud console, go to the Vertex AI > Media Studio page.
In the Prompt (Write your prompt here) field, enter the following prompt:
portrait of a french bulldog at the beach, 85mm f/2.8
If not selected, in the Model options box in the Parameters panel, select
Imagen 3
.If not selected, in the Aspect ratio section in the Parameters panel, select
1:1
.In the Number of results section, change the Number of results to
2
.Click
Generate.Generating images produces images similar to the following images:
To save a local copy of an image, click one of the images.
In the Image details window that opens, click Export.
In the Export image dialog box, click Export.
Verify an image's digital watermark
After you generate watermarked images, you can verify the digital watermark of the novel images.
Create generated images and save a local copy as you did in the previous step.
In the Image detail window, click Export.
In the lower panel, click
Verify.Click Upload image.
Select a locally-saved generated image.
Congratulations! You've just used the Imagen text-to-image generation feature to create novel images and verify the digital watermark of one of the images.
Clean up
To avoid incurring charges to your Google Cloud account for the resources used on this page, follow these steps.
Delete the project
- In the Google Cloud console, go to the Manage resources page.
- In the project list, select the project that you want to delete, and then click Delete.
- In the dialog, type the project ID, and then click Shut down to delete the project.
What's next
- Learn about all image generative AI features in the Imagen on Vertex AI overview.
- Read usage guidelines for Imagen on Vertex AI.
- Explore more pretrained models in Model Garden.
- Learn about responsible AI best practices and Vertex AI's safety filters.