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

> ## Agent Instructions
> The Venice API is OpenAI-compatible: use any OpenAI SDK with the base URL `https://api.venice.ai/api/v1` and a Venice API key, or pay per request from a USDC wallet through x402 with no account.
> Read model IDs from `GET /models` or `GET /models/traits` at runtime instead of hardcoding them from memory or from these pages. Models are added and retired often.
> Every model's price is in https://docs.venice.ai/pricing.md. Quote video and audio jobs with `POST /video/quote` or `POST /audio/quote` before you queue them.
> Search these docs from an MCP client at https://docs.venice.ai/mcp. The full agent guide is https://docs.venice.ai/agents.md.

# Reasoning Models

> Call Venice reasoning models that expose thinking tokens and control effort.

Some models think out loud before answering. They work through problems step by step, then give you a final answer. This makes them stronger at math, code, and logic-heavy tasks.

See the full list of models, pricing and context limits on the [Models page](https://docs.venice.ai/overview/models.md). Not all reasoning models support the [`reasoning_effort`](#reasoning-effort) parameter. See [model support](#model-support) for details.

## Reading the output

Reasoning models return their thinking in a separate `reasoning_content` field, keeping `content` clean:

```python Python theme={"system"}
response = client.chat.completions.create(
    model="zai-org-glm-5-1",
    messages=[{"role": "user", "content": "What is 15% of 240?"}]
)

thinking = response.choices[0].message.reasoning_content
answer = response.choices[0].message.content
```

```javascript Node.js theme={"system"}
const response = await client.chat.completions.create({
    model: "zai-org-glm-5-1",
    messages: [{ role: "user", content: "What is 15% of 240?" }]
});

const thinking = response.choices[0].message.reasoning_content;
const answer = response.choices[0].message.content;
```

```bash cURL theme={"system"}
curl https://api.venice.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zai-org-glm-5-1",
    "messages": [{"role": "user", "content": "What is 15% of 240?"}]
  }'
```

> [!NOTE]
>
> Some providers (Anthropic, Google, OpenAI, Qwen) return encrypted or summarized reasoning tokens. When this happens, `reasoning_content` contains a `"[Some reasoning content is encrypted]"` placeholder.

### Streaming

When streaming, `reasoning_content` arrives in the delta before the final answer:

```python Python theme={"system"}
stream = client.chat.completions.create(
    model="zai-org-glm-5-1",
    messages=[{"role": "user", "content": "Explain photosynthesis"}],
    stream=True
)

for chunk in stream:
    if chunk.choices:
        delta = chunk.choices[0].delta
        if delta.reasoning_content:
            print(delta.reasoning_content, end="")
        if delta.content:
            print(delta.content, end="")
```

```javascript Node.js theme={"system"}
const stream = await client.chat.completions.create({
    model: "zai-org-glm-5-1",
    messages: [{ role: "user", content: "Explain photosynthesis" }],
    stream: true
});

for await (const chunk of stream) {
    if (chunk.choices?.[0]?.delta) {
        const delta = chunk.choices[0].delta;
        if (delta.reasoning_content) process.stdout.write(delta.reasoning_content);
        if (delta.content) process.stdout.write(delta.content);
    }
}
```

```bash cURL theme={"system"}
curl https://api.venice.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zai-org-glm-5-1",
    "messages": [{"role": "user", "content": "Explain photosynthesis"}],
    "stream": true
  }'
```

## Reasoning effort

The `reasoning_effort` parameter controls how much thinking a model does before responding. Higher effort means deeper reasoning but more tokens and latency.

### Accepted values

| Value | Description |
| - | - |
| `none` | Disables reasoning entirely |
| `minimal` | Basic reasoning with minimal effort |
| `low` | Light reasoning for simple problems |
| `medium` | Balanced reasoning for moderate complexity |
| `high` | Deep reasoning for complex problems |
| `xhigh` | Extra-high reasoning depth |
| `max` | Maximum reasoning capability |

> [!WARNING]
>
> Not all models support all values. If you send a value a model doesn't support, Venice may adjust it to a supported level. Some models instead return a 400 error that lists the supported values.
>
> When in doubt, use `low`, `medium`, or `high`. These are the most widely supported values.

### Model support

Supported values change as models are added and updated, so read them from the [`/v1/models`](https://docs.venice.ai/api-reference/endpoint/models/list) endpoint instead of hardcoding them. Each model that accepts `reasoning_effort` lists them under `model_spec.capabilities`:

| Field | Meaning |
| - | - |
| `reasoningEffortOptions` | The `reasoning_effort` values the model supports. If it includes `none`, reasoning can be disabled |
| `defaultReasoningEffort` | The value used when the request doesn't set one |

Both fields are present only when `supportsReasoningEffort` is `true`.

```bash theme={"system"}
curl -s "https://api.venice.ai/api/v1/models?type=text" \
  | jq '.data[]
    | select(.model_spec.capabilities.supportsReasoningEffort)
    | {id, options: .model_spec.capabilities.reasoningEffortOptions,
       default: .model_spec.capabilities.defaultReasoningEffort}'
```

```json theme={"system"}
{
  "id": "zai-org-glm-5-1",
  "options": ["none", "low", "medium", "high"],
  "default": "low"
}
```

### Usage

Pass `reasoning_effort` as a top-level parameter or use the nested `reasoning.effort` format:

```python Python theme={"system"}
response = client.chat.completions.create(
    model="minimax-m25",
    messages=[{"role": "user", "content": "Prove that there are infinitely many primes"}],
    extra_body={"reasoning": {"effort": "high"}}
)
```

```javascript Node.js theme={"system"}
const response = await client.chat.completions.create({
    model: "minimax-m25",
    messages: [{ role: "user", content: "Prove that there are infinitely many primes" }],
    reasoning: { effort: "high" }
});
```

```bash cURL theme={"system"}
curl https://api.venice.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-m25",
    "messages": [{"role": "user", "content": "Prove that there are infinitely many primes"}],
    "reasoning": {"effort": "high"}
  }'
```

The flat format `"reasoning_effort": "high"` is also accepted.

## Disabling reasoning

There are two ways to disable reasoning:

| Method | Syntax | How it works |
| - | - | - |
| `reasoning.enabled: false` | `"reasoning": {"enabled": false}` | Venice-level toggle that prevents reasoning parameters from being sent to the provider. **Recommended.** |
| `reasoning.effort: "none"` | `"reasoning": {"effort": "none"}` | Passed to the provider, which decides how to handle it. Only supported by some models (e.g. GPT-5.x). |

For models that support it, `reasoning.enabled: false` is the more reliable option:

| Model | Can disable? |
| - | - |
| GPT-5.2 | Yes |
| GPT-5.3 Codex | Yes |
| Qwen 3 235B A22B Thinking, Qwen 3.5 35B A3B | Yes |
| GLM 5.1 series | Yes |
| Claude Opus 4.5/4.6/4.6 Fast, Sonnet 4.5/4.6 | No (always reasons) |
| Gemini 3.1 Pro, 3 Flash | No (always reasons) |

```python Python theme={"system"}
response = client.chat.completions.create(
    model="openai-gpt-52",
    messages=[{"role": "user", "content": "What's the capital of France?"}],
    extra_body={"reasoning": {"enabled": False}}
)
```

```javascript Node.js theme={"system"}
const response = await client.chat.completions.create({
    model: "openai-gpt-52",
    messages: [{ role: "user", content: "What's the capital of France?" }],
    reasoning: { enabled: false }
});
```

```bash cURL theme={"system"}
curl https://api.venice.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $VENICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai-gpt-52",
    "messages": [{"role": "user", "content": "What is the capital of France?"}],
    "reasoning": {"enabled": false}
  }'
```

## Token limits

Reasoning models generate visible answer tokens (in `content`) and reasoning tokens (in `reasoning_content`). Both count toward your token budget.

### Setting a token cap

Use `max_completion_tokens` to cap the total number of tokens the model generates, including reasoning:

```json theme={"system"}
{
  "model": "deepseek-v4-flash",
  "messages": [...],
  "max_completion_tokens": 500
}
```

`max_tokens` is also accepted and behaves the same way. If both are set, `max_completion_tokens` takes precedence.

To get more visible output, raise the cap, lower `reasoning_effort`, or [disable reasoning](#disabling-reasoning).

### Reading the breakdown

The `usage` object shows how your budget was spent:

```json theme={"system"}
"usage": {
  "completion_tokens": 501,
  "completion_tokens_details": { "reasoning_tokens": 169 },
  "prompt_tokens": 13,
  "total_tokens": 514
}
```

In this example, 169 tokens were spent on reasoning and 332 on the visible answer. When the cap is reached, `finish_reason` is `length`.

Each model's upper bound is available as `maxCompletionTokens` on the [`/v1/models`](https://docs.venice.ai/api-reference/endpoint/models/list) endpoint.

### Non-reasoning models

`max_tokens` and `max_completion_tokens` behave the same on non-reasoning models, capping visible output directly.

## Capability discovery

Check what a model supports via the [`/v1/models`](https://docs.venice.ai/api-reference/endpoint/models/list) endpoint:

| Field | Meaning |
| - | - |
| `supportsReasoning` | Model has reasoning capability (chain-of-thought) |
| `supportsReasoningEffort` | Model accepts the `reasoning_effort` / `reasoning.effort` parameter |
| `reasoningEffortOptions` | Supported effort values (see [model support](#model-support)) |
| `defaultReasoningEffort` | Effort used when the request doesn't set one |

## Best practices

* Default to `medium` for general use
* Use `high` or `xhigh` for complex tasks (math, code, analysis)
* Use `low` for latency-sensitive applications
* Use `reasoning.enabled: false` or set effort to `none` to disable reasoning
* When in doubt, use `low`, `medium`, or `high`. These are the most widely supported values


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