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.
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
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/gemini-api-safety-settings-workflow-guide.md | A 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.text | A 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.text | A 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.text | A 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.text | A 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.text | A 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
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - 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
