Prompt Buddy logoPrompt Buddy

google · Google AI Docs

Gemini API Safety settings

Configures safety filters and threshold levels for different categories of content such as harassment, hate speech, sexually explicit content, and dangerous content within the Gemini API.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Gemini API Safety settings

Configures safety filters and threshold levels for different categories of content such as harassment, hate speech, sexually explicit content, and dangerous content within the Gemini API.

When To Use

Use when you need to adjust the sensitivity of content filters to prevent or allow specific types of harmful content in model responses.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/gemini-api-safety-settings-workflow-guide.mdA guide explaining how to adjust safety filter categories and threshold levels within the Gemini API.Questions about a guide explaining how to adjust safety filter categories and threshold levels within the Gemini API.
examples/gemini-api-safety-settings-python-config.textA Python code example demonstrating how to configure safety settings and harm thresholds using the Google GenAI SDK.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to configure safety settings and harm thresholds using the Google GenAI SDK.
examples/gemini-api-safety-settings-go.textA Go code example demonstrating how to configure safety settings and thresholds for Gemini API content generation requests.Exact payloads, commands, or snippets shown in A Go code example demonstrating how to configure safety settings and thresholds for Gemini API content generation req...
examples/gemini-api-safety-settings-nodejs.textA Node.js code example demonstrating how to configure safety settings and thresholds for the Gemini API.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to configure safety settings and thresholds for the Gemini API.
examples/gemini-api-safety-settings-java.textA Java code example demonstrating how to configure safety settings and harm categories for a Gemini API generative model.Exact payloads, commands, or snippets shown in A Java code example demonstrating how to configure safety settings and harm categories for a Gemini API generative mo...
examples/gemini-api-safety-settings-curl-request.textA curl command demonstrating how to configure safety settings thresholds for a Gemini API generateContent request.Exact payloads, commands, or snippets shown in A curl command demonstrating how to configure safety settings thresholds for a Gemini API generateContent request.

What This Skill Covers

  • The Gemini API provides safety settings that you can adjust during the prototyping stage to determine if your application requires a more or less restrictive...
  • Main sections: Safety filters, Content safety filtering level, Safety filtering per request, Safety feedback, Adjust safety settings.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://ai.google.dev/gemini-api/docs/safety-settings