Does the Gemini 2.5 Flash API have a 'thinking mode'?

Hello developer,

When I was using the Gemini 2.5 Flash web version, I noticed that I could choose whether to enable a ‘thinking mode’.

My question is: for the Gemini 2.5 Flash API, is there a ‘thinking mode’ that needs to be explicitly enabled, or does the API inherently (or by default/automatically) operate with this ‘thinking mode’ active?

Hey @One_people , To get summaries of the model’s reasoning process, set includeThoughts to true in your request. See the documentation for details.

It is enabled by default for 2.5 Flash models, even in the API.
As the top reply already stated, you can check out the reasoning of the model in the API, just like in AI studio.

Hello developer,
Could you please tell me why I’m getting an error? I didn’t ask for any information that violates policies.

Preformatted text Invalid operation: The response.text quick accessor requires the response to contain a valid Part, but none were returned. The candidate’s finish_reason is 2.