通过 Imagen on Vertex AI 根据提示生成的图片:海滩上的一只法国斗牛犬的照片 (85mm f/2.8)。
准备工作
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.
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-04。"],[],[],null,["# Quickstart: Generate and verify an image's watermark using Imagen text-to-image (Console)\n\n| **API reference overview** : To view an overview of the API options for image generation and editing, see the [`imagegeneration` model API reference](/vertex-ai/generative-ai/docs/model-reference/imagen-api).\n\n\u003cbr /\u003e\n\nLearn how to use Imagen on Vertex AI's text-to-image generation feature and\nverify a digital watermark ([SynthID](https://deepmind.google/technologies/synthid/)) on a generated image. This\nquickstart shows you how to use Imagen image generation in the\nGoogle Cloud console.\n\nImagen on Vertex AI pricing is based on the feature you use. For more\ninformation, see [Pricing](/vertex-ai/pricing#generative_ai_models). \nImage generated using Imagen on Vertex AI from the prompt: *portrait of a french bulldog at the beach, 85mm f/2.8*.\n\nBefore you begin\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Vertex AI API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Vertex AI API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com)\n\nGenerate images and save a local copy\n-------------------------------------\n\nSend the text-to-image generation request using the Google Cloud console.\n\n1.\n In the Google Cloud console, go to the **Vertex AI \\\u003e Media Studio**\n page.\n\n\n [Go to Media Studio](https://console.cloud.google.com/vertex-ai/studio/media/generate;tab=image)\n2. In the **Prompt** (*Write your prompt here*) field, enter the following\n prompt:\n\n portrait of a french bulldog at the beach, 85mm f/2.8\n\n3. If not selected, in the **Model options** box in the **Parameters** panel,\n select `Imagen 3`.\n\n4. If not selected, in the **Aspect ratio** section in the **Parameters**\n panel, select `1:1`.\n\n5. In the **Number of results** section, change the **Number of results** to\n `2`.\n\n6. Click play_arrow**Generate**.\n\n Generating images produces images similar to the following images:\n\n7. To save a local copy of an image, click one of the images.\n\n8. In the **Image details** window that opens, click **Export**.\n\n9. In the **Export image** dialog box, click **Export**.\n\nVerify an image's digital watermark\n-----------------------------------\n\nAfter you generate watermarked images, you can verify the digital watermark of\nthe novel images.\n\n1. [Create generated images and save a local copy as you did in the previous\n step](#generate-images).\n\n2. In the **Image detail** window, click **Export**.\n\n3. In the lower panel, click local_police**Verify**.\n\n4. Click **Upload image**.\n\n5. Select a locally-saved generated image.\n\nCongratulations! You've just used the Imagen text-to-image\ngeneration feature to create novel images and verify the digital watermark of\none of the images.\n\nClean up\n--------\n\nTo avoid incurring charges to your Google Cloud account for the resources used\non this page, follow these steps. \n\n### Delete the project\n\n| **Caution** : Deleting a project has the following effects:\n|\n| - **Everything in the project is deleted.** If you used an existing project for the tasks in this document, when you delete it, you also delete any other work you've done in the project.\n| - **Custom project IDs are lost.** When you created this project, you might have created a custom project ID that you want to use in the future. To preserve the URLs that use the project ID, such as an `appspot.com` URL, delete selected resources inside the project instead of deleting the whole project.\n|\n|\n| If you plan to explore multiple architectures, tutorials, or quickstarts, reusing projects\n| can help you avoid exceeding project quota limits.\n1. In the Google Cloud console, go to the **Manage resources** page.\n\n [Go to Manage resources](https://console.cloud.google.com/iam-admin/projects)\n2. In the project list, select the project that you want to delete, and then click **Delete**.\n3. In the dialog, type the project ID, and then click **Shut down** to delete the project.\n\nWhat's next\n-----------\n\n- Learn about all image generative AI features in the [Imagen on Vertex AI overview](/vertex-ai/generative-ai/docs/image/overview).\n- Read [usage\n guidelines](/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#imagen-guidelines) for Imagen on Vertex AI.\n- Explore more pretrained models in [Model Garden](/vertex-ai/generative-ai/docs/model-garden/explore-models).\n- Learn about [responsible AI best practices and Vertex AI's safety\n filters](/vertex-ai/generative-ai/docs/learn/responsible-ai)."]]