block_reason=<BlockedReason.OTHER: 'OTHER'>

I’m using the Gemini Flash 2.5 model and I’m getting the following error in the response:
block_reason=<BlockedReason.OTHER: ‘OTHER’>

I looked at the documentation and saw that there were some parameters to indicate that no type of content should be blocked, which are modified as follows:

response = client.models.generate_content(
    model="gemini-2.5-flash-preview-05-20", 
    contents=[myfile, "Example prompt"],
        config=types.GenerateContentConfig(
        safety_settings=[
                types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_HARASSMENT, threshold=types.HarmBlockThreshold.BLOCK_NONE),
                types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, threshold=types.HarmBlockThreshold.BLOCK_NONE),
                types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_HATE_SPEECH, threshold=types.HarmBlockThreshold.BLOCK_NONE),
                types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, threshold=types.HarmBlockThreshold.BLOCK_NONE),
                types.SafetySetting(category=types.HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY, threshold=types.HarmBlockThreshold.BLOCK_NONE)
            ]
    ),
)

But even with these parameters indicating that nothing should be blocked, I still get the same error. Does anyone know if it’s because it’s not picking up these parameters correctly or because the model has a minimum security level that can’t be modified, or if it could be due to copyright issues since I’m transferring episodes from a series to it?

Thank you.

There is content Gemini will always block, no matter what. I’d say you’ve just found it. If you want to be 100% certain it isn’t your code (and it probably isn’t) you can try to process the content via AI Studio. If that blocks it too, it’s a Gemini gate.

Hello,

Welcome to the Forum

As @Richard_Davey mentioned Gemini API has built-in protection against core harms and these types of harms will always be blocked and cannot be adjusted. For more details on this you refer to safety setting and guidlines section in Gemini API docs.

Thank you very much for your response. The thing is, AI Studio doesn’t block that video and respond to me. I don’t know to what extent AI Studio is less sensitive to this type of content.

When testing in AI Studio try to recreate your setup exactly: prompts, tools, system instructions, temp etc. It all matters. Also a consideration - your location. Are you outside of the US? I would be amazed if the Google content policies are not geo specific.

Could you please share some specific cases (possibly DM me) where your inputs were blocked by API but not by AI Studio?
Also if you observed any difference between different models sharing those will also be helpful.