
Gemini API safety settings
Configurable harm filters built into the Gemini API.
Made by GoogleAI guardrails
About Gemini API safety settings
The Gemini API provides safety settings that developers can adjust during prototyping. The guide covers how the Gemini API handles safety settings and filtering, and how to change them in an application.
The adjustable filters cover four categories: harassment, hate speech or violence incitement, sexually explicit content, and dangerous content. The Gemini API also has built-in protections against fundamental harms, such as content that endangers children, and these types of harm are always blocked and cannot be adjusted.
Drafted from ai.google.dev · not yet confirmed by Google
How it works
Every Gemini API call runs through Google's safety classifiers for harassment, hate speech, sexually explicit content and dangerous content, and you set a blocking threshold per category. Blocked responses come back with a reason and the category probabilities. It's the built in equivalent of OpenAI's moderation, applied to model output rather than offered as a standalone endpoint.
From the company
Reviews
Be the first to review it
AnonymousKnow a team weighing Gemini API safety settings? Send them this page.