> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gnani.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Thinking

> How the model reasons before it answers, what it costs, and how to turn it off.

Early access
**Gnani Evon v3.5** is now available as an API to early access registrants.

By default, the model **thinks before it answers**: it works through the problem step by step, then writes the reply. Thinking helps with multi-step questions, calculations and planning. For simple questions it mostly adds time and tokens.

## When to use this

* **Thinking on:** maths, multi-step questions, planning, comparing options.
* **Thinking off:** short factual answers, translation, rewriting, classification, extracting fields, and usually JSON output from a clear instruction.
* **Thinking off:** voice agents and other replies where speed matters most.

> [!WARNING]
>
> `minimal`, `low`, `medium` and `high` all turn thinking on and do not change how long the model thinks. To limit thinking, use [`reasoning_budget`](#limit-how-long-the-model-thinks).

***

## Turn thinking off

Send `"reasoning_effort": "none"`. This is OpenAI's standard field, so it works from every OpenAI SDK:

Set up the client once. The examples on this page use `client` from here. Your API key is read from the `GNANI_API_KEY` environment variable. The Python examples below the setup are written for the OpenAI SDK, and work unchanged with the Gnani SDK client (`GnaniLLMClient`). With `AsyncGnaniLLMClient`, add `await` to each call. See the [Python SDK](https://docs.gnani.ai/python-sdk/llm.md) page.

```python Python (OpenAI SDK) theme={null}
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.vachana.ai/v1",
    api_key=os.environ["GNANI_API_KEY"],
)
```

```python Python (Gnani SDK) theme={null}
# pip install "gnani-vachana[llm]"
from gnani.llm import GnaniLLMClient

client = GnaniLLMClient()  # reads GNANI_API_KEY
```

```python Python (Gnani SDK, async) theme={null}
# pip install "gnani-vachana[llm]"
from gnani.llm import AsyncGnaniLLMClient

client = AsyncGnaniLLMClient()  # reads GNANI_API_KEY
# call it with await: await client.chat.completions.create(...)
```

```javascript JavaScript (OpenAI SDK) theme={null}
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.vachana.ai/v1",
  apiKey: process.env.GNANI_API_KEY,
});
```

```bash cURL highlight={6} theme={null}
curl https://api.vachana.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key-ID: $GNANI_API_KEY" \
  -d '{
    "model": "evon-v3.5",
    "reasoning_effort": "none",
    "messages": [{"role": "user", "content": "Translate to Tamil: Your order has shipped."}]
  }'
```

```python Python (OpenAI SDK) highlight={4} theme={null}
completion = client.chat.completions.create(
    model="evon-v3.5",
    messages=[{"role": "user", "content": "Translate to Tamil: Your order has shipped."}],
    reasoning_effort="none",
)
```

```javascript JavaScript (OpenAI SDK) highlight={4} theme={null}
const completion = await client.chat.completions.create({
  model: "evon-v3.5",
  messages: [{ role: "user", content: "Translate to Tamil: Your order has shipped." }],
  reasoning_effort: "none",
});
```

```python Python (requests) highlight={9} theme={null}
import os
import requests

response = requests.post(
    "https://api.vachana.ai/v1/chat/completions",
    headers={"X-API-Key-ID": os.environ["GNANI_API_KEY"]},
    json={
        "model": "evon-v3.5",
        "reasoning_effort": "none",
        "messages": [{"role": "user", "content": "Translate to Tamil: Your order has shipped."}],
    },
    timeout=60,
)
response.raise_for_status()
print(response.json()["choices"][0]["message"]["content"])
```

You can also send `"enable_thinking": false`. If a request has both fields, `enable_thinking` is used.

| Field | Thinking on | Thinking off |
| - | - | - |
| `reasoning_effort` | `minimal`, `low`, `medium`, `high`, or leave it out | `none` |
| `enable_thinking` | `true` (the default) | `false` |

***

## How it works

The thinking is returned separately from the answer:

```json wrap theme={null}
{
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "₹1,200 split between 3 people is ₹400 each.",
        "reasoning": "1200 divided by 3 is 400, so each person pays ₹400."
      },
      "finish_reason": "stop"
    }
  ]
}
```

| Field | What it holds |
| - | - |
| `message.content` | The answer. Show this to your users. |
| `message.reasoning` | The thinking. Show it, log it or ignore it, as you prefer. When streaming, it arrives first, in `delta.reasoning`. |

### What thinking costs

Thinking tokens are **output tokens**, the same as the answer's:

* They are included in `usage.completion_tokens`.
* They count toward `max_tokens`.
* They count toward your [daily token quota](https://docs.gnani.ai/api/LLM/limits.md).
* They add time before the first word of the answer.

> [!WARNING]
>
> **Thinking can use up the whole reply budget.** On Free and Pay-as-you-go plans, `max_tokens` is at most 1,024. If the model spends those tokens thinking, the reply comes back with empty or missing `content` and `finish_reason: "length"`.
>
> To fix it, turn thinking off for that request, lower `reasoning_budget`, or raise `max_tokens` if your plan allows it.

***

## Limit how long the model thinks

`reasoning_budget` sets the most tokens the model may spend thinking, from `0` to `65536`. The default is 32,768. Thinking also counts toward `max_tokens`, so the effective limit is the lower of the two.

> [!WARNING]
>
> `reasoning_budget: 0` sets no budget. It does not turn thinking off; use `"reasoning_effort": "none"` for that.

```json highlight={4} theme={null}
{
  "model": "evon-v3.5",
  "max_tokens": 1024,
  "reasoning_budget": 256,
  "messages": [{"role": "user", "content": "Plan a 3-day trip to Hampi on a student budget."}]
}
```

Here thinking can use at most 256 of the 1,024 output tokens, which leaves at least 768 for the answer.

With OpenAI's Python SDK, pass it in `extra_body={"reasoning_budget": 256}`. OpenAI's JavaScript SDK sends extra fields as they are, so put it in the request object:

```python Python (OpenAI SDK) highlight={5} theme={null}
completion = client.chat.completions.create(
    model="evon-v3.5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Plan a 3-day trip to Hampi on a student budget."}],
    extra_body={"reasoning_budget": 256},
)
```

```python Python (Gnani SDK) highlight={5} theme={null}
# GnaniLLMClient; with AsyncGnaniLLMClient, await the call
completion = client.chat.completions.create(
    model="evon-v3.5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Plan a 3-day trip to Hampi on a student budget."}],
    extra_body={"reasoning_budget": 256},
)
```

```javascript JavaScript (OpenAI SDK) highlight={4} theme={null}
const completion = await client.chat.completions.create({
  model: "evon-v3.5",
  max_tokens: 1024,
  reasoning_budget: 256,  // in TypeScript, add // @ts-expect-error above this line
  messages: [{ role: "user", content: "Plan a 3-day trip to Hampi on a student budget." }],
});
```

***

## Multi-turn conversations

When you send the conversation back, include each earlier assistant reply's `content`. You do not need to send `reasoning`; it is ignored if you do.

```json theme={null}
{
  "messages": [
    {"role": "user", "content": "Split ₹1,200 between 3 people."},
    {"role": "assistant", "content": "₹1,200 split between 3 people is ₹400 each."},
    {"role": "user", "content": "And between 4?"}
  ]
}
```

***

## Related

> [card] [Streaming](https://docs.gnani.ai/api/LLM/streaming.md)
>
> Show the thinking as it arrives in `delta.reasoning`.

> [card] [Limits](https://docs.gnani.ai/api/LLM/limits.md)
>
> `max_tokens` and the daily token quota.

> [card] [JSON output](https://docs.gnani.ai/api/LLM/structured-outputs.md)
>
> Extraction and classification, with thinking off.

> [card] [Chat Completions](https://docs.gnani.ai/api/LLM/chat-completions.md)
>
> Every request field, including `reasoning_effort`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.