OpenAI's reasoning models โ the "o-series" (o1, o3, and their successors) โ are trained to think step-by-step internally before producing an answer, trading speed and cost for much stronger performance on hard problems. They rank #4 among the most-used AI model lines, at roughly 34.6% usage share, reflecting how often developers reach for them specifically for math, logic, and complex multi-step coding tasks rather than everyday chat.
Reasoning models are called through the same OpenAI Python SDK, but expose a reasoning_effort parameter to control how much internal deliberation the model does before answering.
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY")
response = client.chat.completions.create(
model="o3",
reasoning_effort="medium",
messages=[
{"role": "user", "content": "A train leaves at 2pm going 60mph, another leaves 30 minutes later going 75mph on the same route. When does the second train catch up?"}
]
)
print(response.choices[0].message.content)
Create an OpenAI platform account, generate an API key, install the SDK, then call a reasoning model by name.
# 1. Create an account and API key at platform.openai.com/api-keys
# 2. install the SDK
pip install openai
# 3. set your key as an environment variable
export OPENAI_API_KEY="your-key-here"