Reasoning
Advanced reasoning capabilities with the Responses API
Reasoning Configuration
const response = await fetch('https://llm.onerouter.pro/v1/responses', {
method: 'POST',
headers: {
'Authorization': 'Bearer <<API_KEY>>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'o4-mini',
input: 'What is the meaning of life?',
reasoning: {
effort: 'high'
},
max_output_tokens: 9000,
}),
});
const result = await response.json();
console.log(result);import requests
response = requests.post(
'https://llm.onerouter.pro/v1/responses',
headers={
'Authorization': 'Bearer <<API_KEY>>',
'Content-Type': 'application/json',
},
json={
'model': 'o4-mini',
'input': 'What is the meaning of life?',
'reasoning': {
'effort': 'high'
},
'max_output_tokens': 9000,
}
)
result = response.json()
print(result)Effort Level
Description
Complex Reasoning Example
Reasoning in Conversation Context
Streaming Reasoning
Best Practices
Next Steps
Last updated