[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],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)."]]