Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see Model versions and lifecycle.
Stay organized with collections
Save and categorize content based on your preferences.
When interacting with Gemini on Vertex AI, your requests
(prompts) or the generated responses might be blocked by content filters. This
document provides guidance on how to identify and process these blocked
responses.
When is content blocked?
There are two scenarios for content filters blocking content:
The input prompt is blocked.
The model's response is blocked.
The sections that follow describe how to process each scenario.
The input prompt is blocked
If your input prompt is blocked by content filters before it is sent to the
model, the API response exhibits the following characteristics:
The
promptFeedback
field is populated. This field contains information about why the
prompt is blocked.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[],[],null,["# Process blocked responses\n\nWhen interacting with Gemini on Vertex AI, your requests\n(prompts) or the generated responses might be blocked by content filters. This\ndocument provides guidance on how to identify and process these blocked\nresponses.\n\nWhen is content blocked?\n------------------------\n\nThere are two scenarios for content filters blocking content:\n\n- The input prompt is blocked.\n- The model's response is blocked.\n\nThe sections that follow describe how to process each scenario.\n\n### The input prompt is blocked\n\nIf your input prompt is blocked by content filters before it is sent to the\nmodel, the API response exhibits the following characteristics:\n\n- The [`promptFeedback`](/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#PromptFeedback) field is populated. This field contains information about why the prompt is blocked.\n- The [`candidates`](/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse) field isn't set.\n\n### The model's response is blocked\n\nIf the model generates a response but that response is blocked by content\nfilters, the API response exhibits the following characteristics:\n\n- The [`promptFeedback`](/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#PromptFeedback) field isn't set.\n- The [`candidates`](/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse) field is set with the following characteristics:\n - The [`content`](/vertex-ai/generative-ai/docs/reference/rest/v1/Content) field isn't set.\n - The [`finishReason`](/vertex-ai/generative-ai/docs/reference/rest/v1/GenerateContentResponse#FinishReason) field is set and indicates why response generation stopped.\n\nYou can determine why the content was blocked by inspecting these fields in the\nAPI response.\n\nWhat's next\n-----------\n\n- Learn how to [configure content filters](/vertex-ai/generative-ai/docs/multimodal/configure-safety-filters)."]]