#Set no thinking in sdk with gpt5
1 messages · Page 1 of 1 (latest)
Hi @lofty spoke. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Yes, you can control the amount of "thinking" (reasoning) GPT-5 and GPT-5-mini perform by setting the reasoning effort parameter in your API call. This allows you to minimize or eliminate the model's internal chain-of-thought reasoning, which reduces latency and cost.
How to set minimal or no "thinking":
- Use the
reasoningparameter with"effort": "minimal"or"effort": "low"in your API request. - This works for both the Responses API and the Chat Completions API.
Example (Python, Responses API):
from openai import OpenAI
client = OpenAI()
result = client.responses.create(
model="gpt-5",
input="Write a haiku about code.",
reasoning={ "effort": "minimal" }, # or "low"
text={ "verbosity": "low" }
)
print(result.output_text)
Or with curl:
curl <https://api.openai.com/v1/responses> \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-5",
"input": "Write a haiku about code.",
"reasoning": { "effort": "minimal" }
}'
- For Chat Completions, use the
reasoning_effortparameter:
"reasoning_effort": "minimal"
Supported values:
"minimal": Few or no reasoning tokens, fastest, lowest cost"low": Slightly more reasoning"medium"(default): Balanced"high": Deepest reasoning, slowest, most expensive
Note:
- The
"minimal"setting is ideal for simple, deterministic tasks where you don't need the model to "think" deeply or explain its answer. - This parameter is supported on gpt-5, gpt-5-mini, and gpt-5-nano models on both the Responses and Chat Completions APIs. If you get an error, ensure your SDK is up to date and you're using the correct endpoint and parameter name for your API version.
References:
- GPT-5 New Params and Tools
- Using GPT-5: Quickstart
- Advice on Prompting for Reasoning Models
- Forum: GPT-5-Nano accepted parameters