Use extended thinking models for hard problems that require deeper deliberation.
Reasoning models spend additional compute “thinking through” a problem before producing a response. This extended deliberation makes them significantly better at complex tasks like multi-step math, code debugging, strategic planning, and hard classification problems where a direct answer is often wrong.
Reasoning models supported through Routeway include GPT 5.4, Claude Opus 4.8, DeepSeek V4 and much more. Check the Models page for the current list.
Both approaches achieve the same result. The model suffix is convenient for quick testing or when there is no way to change reasoning level via ui, while reasoning_effort gives you programmatic control without changing the model ID.
You can control reasoning effort using the reasoning_effort parameter.
Value
Behavior
Best for
"low"
Minimal reasoning, fastest
Simple tasks, cost-sensitive
"medium"
Balanced (default)
Most production use cases
"high"
Deep reasoning, slowest
Hard math, complex code, critical decisions
"none"
No reasoning, fastest
Simple Q&A or retrieval
Python
Node.js
cURL
import osfrom openai import OpenAIclient = OpenAI( base_url="https://api.routeway.ai/v1", api_key=os.getenv("ROUTEWAY_API_KEY"))response = client.chat.completions.create( model="o4-mini", messages=[ { "role": "user", "content": "A farmer has 17 sheep. All but 9 run away. How many sheep does the farmer have left? Show your reasoning." } ], reasoning_effort="medium",)print(response.choices[0].message.content)
import OpenAI from "openai";const client = new OpenAI({ baseURL: "https://api.routeway.ai/v1", apiKey: process.env.ROUTEWAY_API_KEY,});async function main() { const response = await client.chat.completions.create({ model: "o4-mini", messages: [ { role: "user", content: "A farmer has 17 sheep. All but 9 run away. How many sheep does the farmer have left? Show your reasoning.", }, ], reasoning_effort: "medium", }); console.log(response.choices[0].message.content);}main().catch(console.error);
curl https://api.routeway.ai/v1/chat/completions \ -H "Authorization: Bearer $ROUTEWAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "o4-mini", "messages": [ { "role": "user", "content": "A farmer has 17 sheep. All but 9 run away. How many does he have left?" } ], "reasoning_effort": "medium" }'