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

# Model Reasoning

> Access internal chain-of-thought traces from reasoning models via reasoning_content.

Reasoning models such as `deepseek-r1` and `deepseek-v4.1-flash` produce an internal chain-of-thought before emitting their final answers. Neosantara surfaces this thinking process in a dedicated `reasoning_content` field on `/v1/chat/completions`.

```python Python (Streaming / OpenAI SDK) icon="python" theme={"theme":{"light":"catppuccin-latte","dark":"ayu-dark"}}
from openai import OpenAI
import os

client = OpenAI(
    base_url="https://api.neosantara.xyz/v1",
    api_key=os.environ["NEOSANTARA_API_KEY"]
)

stream = client.chat.completions.create(
    model="deepseek-r1",
    messages=[
        {"role": "user", "content": "How many 'r' letters are in the word 'strawberry'?"}
    ],
    stream=True
)

print("=== REASONING PROCESS ===")
for chunk in stream:
    delta = chunk.choices[0].delta
    # Extract reasoning tokens
    reasoning = getattr(delta, "reasoning_content", None)
    if reasoning:
        print(reasoning, end="", flush=True)
    
    # Extract final public content
    content = delta.content or ""
    if content:
        print(content, end="", flush=True)
print()
```

```python Python (Non-Streaming) icon="python" theme={"theme":{"light":"catppuccin-latte","dark":"ayu-dark"}}
from openai import OpenAI
import os

client = OpenAI(
    base_url="https://api.neosantara.xyz/v1",
    api_key=os.environ["NEOSANTARA_API_KEY"]
)

response = client.chat.completions.create(
    model="deepseek-r1",
    messages=[
        {"role": "user", "content": "How many 'r' letters are in the word 'strawberry'?"}
    ]
)

message = response.choices[0].message

# Internal thinking trace
if hasattr(message, "reasoning_content") and message.reasoning_content:
    print(f"[Thinking]:\n{message.reasoning_content}\n")

# Final public answer
print(f"[Answer]:\n{message.content}")
```

```bash cURL icon="terminal" theme={"theme":{"light":"catppuccin-latte","dark":"ayu-dark"}}
curl -X POST https://api.neosantara.xyz/v1/chat/completions \
  -H "Authorization: Bearer $NEOSANTARA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-r1",
    "messages": [
      {"role": "user", "content": "How many r in strawberry?"}
    ]
  }'
```

## Billing Rules for Reasoning Tokens

Neosantara adheres to strict billing integrity principles:

* **Delivered Output Is Billable:** Reasoning tokens delivered to the client (via `reasoning_content`) are counted as output tokens in `usage.completion_tokens`.
* **Usage Breakdown:** The usage payload includes `completion_tokens_details.reasoning_tokens` allowing exact analysis of thinking token volume.
* **Model Integrity:** Billing is calculated at the exact public rate of the model requested.

## Available Reasoning Models

| Model ID | Provider | Context Window | Capabilities | Pricing (Input/Output per 1M) |
| :- | :- | :- | :- | :- |
| `agnes-2.5-flash` | Agnes AI | 1M tokens | Tools, Vision, Reasoning, JSON | Free / Included |
| `amazon-nova-2-lite` | Amazon | 1M tokens | Tools, Vision, Reasoning | $0.33 / $2.75 |
| `claude-4-5-haiku` | Anthropic | 200k tokens | Tools, Vision, Reasoning, JSON | $1 / $5 |
| `claude-4.5-opus` | Anthropic | 200k tokens | Tools, Vision, Reasoning, JSON | $5 / $25 |
| `claude-4.5-sonnet` | Anthropic | 200k tokens | Tools, Vision, Reasoning, JSON | $3 / $15 |
| `claude-fable-5` | Anthropic | 200k tokens | Tools, Vision, Reasoning, JSON | $10 / $50 |
| `claude-fable-5.1` | Anthropic | 200k tokens | Tools, Vision, Reasoning, JSON | $10 / $50 |
| `claude-opus-4-6` | Anthropic | 200k tokens | Tools, Vision, Reasoning, JSON | $5 / $25 |
| `claude-opus-4-7` | Anthropic | 200k tokens | Tools, Vision, Reasoning, JSON | $5 / $25 |
| `claude-opus-4-8` | Anthropic | 200k tokens | Tools, Vision, Reasoning, JSON | $5 / $25 |
| `claude-opus-5` | Anthropic | 1M tokens | Tools, Vision, Reasoning | $5 / $25 |
| `claude-opus-5.5` | Anthropic | 1M tokens | Tools, Vision, Reasoning, JSON | $4 / $20 |
| `claude-sonnet-4-6` | Anthropic | 200k tokens | Tools, Vision, Reasoning, JSON | $3 / $15 |
| `claude-sonnet-5` | Anthropic | 200k tokens | Tools, Vision, Reasoning, JSON | $3 / $15 |
| `command-a-plus` | Cohere | 436k tokens | Tools, Reasoning, JSON | Free / Included |
| `north-mini-code` | Cohere | 256k tokens | Tools, Reasoning, JSON | Free / Included |
| `deepseek-r1` | DeepSeek | 128k tokens | Reasoning, JSON | $1.35 / $5.4 |
| `deepseek-v4-flash` | DeepSeek | 1M tokens | Tools, Reasoning | $0.22 / $0.66 |
| `deepseek-v4-flash-0731` | DeepSeek | 1M tokens | Tools, Reasoning, JSON | $0.14 / $0.28 |
| `deepseek-v4-pro` | DeepSeek | 1M tokens | Tools, Reasoning | $0.66 / $1.98 |
| `deepseek-v4-pro-0813` | DeepSeek | 1M tokens | Tools, Reasoning, JSON | $1.32 / $3.96 |
| `deepseek-v4.1-flash` | DeepSeek | 1M tokens | Tools, Vision, Reasoning, JSON | $0.15 / $0.6 |
| `gemini-3.1-flash-lite` | Google | 1M tokens | Tools, Vision, Reasoning, JSON | $0.25 / $1.5 |
| `gemini-3.1-pro` | Google | 1M tokens | Tools, Vision, Reasoning, JSON | $2 / $12 |
| `gemini-3.5-flash` | Google | 1M tokens | Tools, Vision, Reasoning, JSON | $1.5 / $9 |
| `gemini-3.6-flash` | Google | 1M tokens | Tools, Vision, Reasoning, JSON | $1.5 / $7.5 |
| `gemini-3.7-flash` | Google | 1M tokens | Tools, Vision, Reasoning, JSON | $1.5 / $7.5 |
| `gemini-3.8-flash` | Google | 1M tokens | Tools, Vision, Reasoning, JSON | $0.75 / $3.75 |
| `ling-3.0-flash-fin` | InclusionAI | 256k tokens | Tools, Reasoning | Free / Included |
| `longcat-2.0` | Meituan | 1M tokens | Tools, Reasoning, JSON | Free / Included |
| `muse-glimmer-30b` | Meta | 131k tokens | Tools, Vision, Reasoning, JSON | $0.35 / $1.5 |
| `muse-spark-1.1` | Meta | 1M tokens | Tools, Vision, Reasoning | $1.25 / $4.25 |
| `muse-spark-1.2` | Meta | 1M tokens | Tools, Vision, Reasoning | $1.25 / $4.25 |
| `muse-spark-1.2-contributor` | Meta | 1M tokens | Tools, Vision, Reasoning | $0.1 / $0.2 |
| `muse-spark-1.3` | Meta | 1M tokens | Tools, Vision, Reasoning | $1.25 / $4.25 |
| `muse-spark-1.3-contributor` | Meta | 1M tokens | Tools, Vision, Reasoning | $0.1 / $0.2 |
| `minimax-m2.7` | MiniMax | 204k tokens | Tools, Reasoning, JSON | $0.3 / $1.2 |
| `minimax-m2.7-free` | MiniMax | 196k tokens | Tools, Reasoning, JSON | Free / Included |
| `minimax-m3` | MiniMax | 1M tokens | Tools, Vision, Reasoning, JSON | $0.6 / $1.2 |
| `minimax-m3-free` | MiniMax | 1M tokens | Tools, Vision, Reasoning, JSON | Free / Included |
| `kimi-k2-thinking` | Moonshot | 256k tokens | Tools, Reasoning | $0.6 / $2.5 |
| `kimi-k2.5` | Moonshot | 256k tokens | Tools, Vision, Reasoning | $0.6 / $3 |
| `kimi-k2.6` | Moonshot | 262k tokens | Tools, Vision, Reasoning, JSON | $0.95 / $4 |
| `kimi-k3` | Moonshot | 1M tokens | Tools, Vision, Reasoning, JSON | $3 / $15 |
| `garda-core` | Neosantara | 1M tokens | Tools, Reasoning, JSON | Rp 300 / Rp 1,500 |
| `llama-3.3-nemotron-super-49b-v1.5` | NVIDIA | 132k tokens | Tools, Reasoning, JSON | Rp 4,560 / Rp 31,991 |
| `gpt-5-nano` | OpenAI | 128k tokens | Tools, Vision, Reasoning, JSON | Rp 810 / Rp 6,485 |
| `gpt-5.4` | OpenAI | 270k tokens | Tools, Vision, Reasoning, JSON | $2.5 / $15 |
| `gpt-5.4-mini` | OpenAI | 128k tokens | Tools, Vision, Reasoning, JSON | $0.75 / $4.5 |
| `gpt-5.4-nano` | OpenAI | 400k tokens | Tools, Vision, Reasoning, JSON | Rp 3,240 / Rp 20,250 |
| `gpt-5.5` | OpenAI | 270k tokens | Tools, Vision, Reasoning, JSON | $5 / $30 |
| `gpt-5.6-luna` | OpenAI | 272k tokens | Tools, Reasoning | $0.2 / $1.2 |
| `gpt-5.6-sol` | OpenAI | 272k tokens | Tools, Reasoning | $5 / $30 |
| `gpt-5.6-terra` | OpenAI | 272k tokens | Tools, Vision, Reasoning | $2 / $12 |
| `gpt-6-astra` | OpenAI | 1M tokens | Tools, Vision, Reasoning, JSON | $10 / $50 |
| `gpt-6-luna` | OpenAI | 1M tokens | Tools, Vision, Reasoning, JSON | $0.1 / $0.5 |
| `gpt-6-sol` | OpenAI | 1M tokens | Tools, Vision, Reasoning, JSON | $2 / $10 |
| `gpt-oss-120b` | OpenAI | 131k tokens | Tools, Reasoning, JSON | $0.15 / $0.6 |
| `gpt-oss-20b` | OpenAI | 131k tokens | Tools, Reasoning, JSON | Rp 400 / Rp 1,600 |
| `laguna-s-2.1` | Poolside | 262k tokens | Tools, Reasoning | Free / Included |
| `laguna-xs-2.1` | Poolside | 262k tokens | Tools, Reasoning | Free / Included |
| `bonsai-27b` | Prism ML | 262k tokens | Tools, Vision, Reasoning, JSON | Free / Included |
| `step-3.5-flash` | StepFun | 256k tokens | Tools, Reasoning, JSON | Rp 3,000 / Rp 9,000 |
| `hy4-preview` | Tencent | 1M tokens | Tools, Reasoning | $0.85 / $2.55 |
| `grok-4.1-fast-reasoning` | xAI | 1M tokens | Tools, Reasoning | $1.25 / $2.5 |
| `grok-4.3` | xAI | 1M tokens | Tools, Vision, Reasoning | $1.25 / $2.5 |
| `grok-4.5` | xAI | 500k tokens | Tools, Vision, Reasoning, JSON | $2 / $6 |
| `mimo-v2.5` | Xiaomi | 1M tokens | Tools, Vision, Reasoning | $0.14 / $0.28 |
| `mimo-v2.5-free` | Xiaomi | 262k tokens | Tools, Reasoning, JSON | Free / Included |
| `mimo-v2.5-pro` | Xiaomi | 1M tokens | Tools, Vision, Reasoning, JSON | $0.435 / $0.87 |
| `mimo-v2.5-pro-free` | Xiaomi | 1M tokens | Tools, Reasoning, JSON | Free / Included |
| `mimo-v2.6-flash-free` | Xiaomi | 262k tokens | Tools, Reasoning, JSON | Free / Included |
| `mimo-v2.6-pro-free` | Xiaomi | 1M tokens | Tools, Reasoning, JSON | Free / Included |
| `glm-4.5-flash` | zAI | 128k tokens | Tools, Reasoning | Rp 250 / Rp 750 |
| `glm-4.6` | zAI | 128k tokens | Vision, Reasoning | Rp 10,000 / Rp 30,000 |
| `glm-4.6-plus` | zAI | 128k tokens | Vision, Reasoning | Rp 10,000 / Rp 30,000 |
| `glm-4.6v-flash` | zAI | 128k tokens | Tools, Vision, Reasoning | Rp 250 / Rp 750 |
| `glm-4.7` | zAI | 200k tokens | Tools, Reasoning | Rp 10,000 / Rp 30,000 |
| `glm-4.7-flash` | zAI | 1M tokens | Tools, Reasoning | Free / Included |
| `glm-5` | zAI | 202k tokens | Tools, Reasoning, JSON | $1 / $3.2 |
| `glm-5.3` | zAI | 1M tokens | Tools, Vision, Reasoning, JSON | $1.4 / $4.4 |
| `glm-5.3-flash` | zAI | 1M tokens | Tools, Vision, Reasoning, JSON | $0.15 / $0.5 |
| `glm-5.3-flashx-free` | zAI | 128k tokens | Tools, Reasoning, JSON | Free / Included |

## Next Steps

| Task | Guide |
| :- | :- |
| Anthropic Extended Thinking | [Extended Thinking](https://docs.neosantara.xyz/en/gateway/anthropic-messages/thinking.md) |
| Responses API Reasoning | [Responses Reasoning](https://docs.neosantara.xyz/en/gateway/responses-api/reasoning.md) |
| Streaming Responses | [Streaming Responses](https://docs.neosantara.xyz/en/gateway/chat-completions/streaming.md) |


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