Hello developer,
I am calling the Gemini 2.5 Flash Preview 05-20 API, but the API is flagging my prompt as unsafe. I haven’t asked any questions related to sexually explicit content, politically sensitive topics, or similar issues.
Is there any way to get the Gemini 2.5 Flash Preview 05-20 API to return content normally? I don’t encounter this problem when calling the 2.0-flash API.
Preformatted text Invalid operation: The
response.text
quick accessor requires the response to contain a validPart
, but none were returned. The candidate’s finish_reason is 2.