Hey, I implemented the reasoning into my API code here:
body: JSON.stringify({
model: model,
"reasoning": {
"enabled": true
},
temperature: parseFloat(localStorage.temperature || 0.7),
messages: [
{ role: "system", content: system },
{ role: "user", content: prompt }
]
})
But it doesn't work, I can't see it.
I also tried this:
const response = await fetch(url, {
method : "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${token}`
},
body: JSON.stringify({
model: model,
temperature: parseFloat(localStorage.temperature || 0.7),
messages: [
{ role: "system", content: system },
{ role: "user", content: prompt }
],
"reasoning": {
// Optional: Default is false. All models support this.
"exclude": false, // Set to true to exclude reasoning tokens from response
// Or enable reasoning with the default parameters:
"enabled": true // Default: inferred from `effort` or `max_tokens`
}
}),
signal // ← abort signal
});
I grabbed the code part for the reasoning from here:
https://openrouter.ai/docs/use-cases/reasoning-tokens#enable-reasoning-with-default-config
You can test the API on my website and edit the source code:
https://perchance.org/6pujv6ntxm#edit
(You will need the password to save it permanently)
You need to insert your own API key and change it to
deepseek/deepseek-chat-v3.1:free
Learn how to use reasoning tokens to enhance AI model outputs. Implement step-by-step reasoning traces for better decision making and transparency.
Convert text into any style you want based on your own custom instruction, or use a preset mode to make your text longer, shorter, more formal, more human ("humanize"), and many more, including silly styles. It's completely free, no login/signup, no limits on daily usage. Convert your text into any style with a single click. Can make text more...