> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mixlayer.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mixlayer.com/_mcp/server.

# Qwen 4

> Qwen 4 models, reasoning levels, and sampling settings on Mixlayer

Qwen 4 is a multimodal model family for coding, reasoning over long inputs, and multi-step agent workflows.

## Available models

| Model         | Identifier           | Native context window |
| ------------- | -------------------- | --------------------- |
| Qwen4-35B-A3B | `qwen/qwen4-35b-a3b` | 1m tokens             |

Qwen4-35B-A3B is a mixture-of-experts model with 35B language-model parameters and 3B active per token. The model accepts text, images, and video and generates text. See the [Qwen4-35B-A3B model card](https://huggingface.co/Qwen/Qwen4-35B-A3B).

Use the Mixlayer console or `GET /v1/models` to check the context limit and capabilities available to your API key.

## Thinking modes

Qwen 4 uses `high` reasoning effort by default. Use `reasoning_effort` in Chat Completions or `reasoning.effort` in Responses. See [Reasoning](/reasoning#enabling-thinking) for request examples.

| Requested effort                        | Native Qwen 4 effort      |
| --------------------------------------- | ------------------------- |
| Omitted, `default`, `medium`, or `high` | `high`                    |
| `none`                                  | `off` (thinking disabled) |
| `minimal` or `low`                      | `low`                     |
| `xhigh` or `max`                        | `xhigh`                   |

## Mixlayer platform defaults

When these sampling parameters are omitted, Mixlayer uses the following values for `qwen/qwen4-35b-a3b`.

```json
{
  "temperature": 1.0,
  "top_p": 0.95,
  "top_k": 20
}
```

## Recommended sampling

Qwen recommends these settings for Qwen4-35B-A3B. See the [model card’s sampling guidance](https://huggingface.co/Qwen/Qwen4-35B-A3B#best-practices).

| Parameter            | Thinking | Non-thinking |
| -------------------- | -------- | ------------ |
| `temperature`        | `1.0`    | `0.7`        |
| `top_p`              | `0.95`   | `0.80`       |
| `top_k`              | `20`     | `20`         |
| `min_p`              | `0.0`    | `0.0`        |
| `presence_penalty`   | `0.0`    | `1.5`        |
| `repetition_penalty` | `1.0`    | `1.0`        |

Omit `min_p` from Mixlayer requests. See the [Chat Completions API reference](/api-reference/inference-ap-is/chat-completions/chat-completions) for the sampling fields you can set.