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

# Qwen3.6

> Qwen3.6 recipes: 2 variants (27B, 35B-A3B), Dense and Hybrid MoE architectures.

<div className="capability-pills">
  <a href="/examples/models/capabilities/reasoning" className="capability-pill">Reasoning</a>
  <a href="/examples/models/capabilities/tool-calling" className="capability-pill">Tool calling</a>
  <a href="/examples/models/capabilities/agentic" className="capability-pill">Agentic</a>
  <a href="/examples/models/capabilities/long-context" className="capability-pill">Long context</a>
</div>

## Setup

Install the Baseten CLI and sign in, then install the OpenAI SDK.

<Columns cols={2}>
  <Column>
    **Install and sign in to Baseten**

    <Tabs>
      <Tab title="macOS or Linux">
        ```bash Terminal theme={"system"}
        brew tap basetenlabs/baseten
        brew trust --formula basetenlabs/baseten/baseten
        brew install baseten
        ```
      </Tab>

      <Tab title="Windows">
        Download and extract the Windows archive for the latest Baseten CLI release:

        ```powershell Terminal theme={"system"}
        $release = Invoke-RestMethod https://api.github.com/repos/basetenlabs/baseten-cli/releases/latest
        $asset = $release.assets | Where-Object { $_.name -like "*_windows_amd64.zip" }
        Invoke-WebRequest $asset.browser_download_url -OutFile baseten.zip
        Expand-Archive -Force baseten.zip .
        ```

        Move `baseten.exe` to a directory on your `PATH`.
      </Tab>
    </Tabs>

    For other platforms or a specific version, see the [Baseten CLI install reference](/reference/cli/baseten/overview#install).

    ```sh theme={"system"}
    baseten auth login
    ```
  </Column>

  <Column>
    **Install the OpenAI SDK**

    ```sh theme={"system"}
    uv pip install openai
    ```
  </Column>
</Columns>

To install without Homebrew, see the [Baseten CLI install reference](/reference/cli/baseten/overview#install).

Pick the model you want to deploy. Each tab is a self-contained recipe.

<Tabs>
  <Tab title="27B">
    [Qwen/Qwen3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B) is a 27B-parameter dense model with up to 256K context.

    This preset serves Qwen3.6-27B on H100:4 with MTP speculative decoding, optimized for low time-to-first-token on interactive chat and agent workflows.

    <CardGroup cols={4}>
      <Card title="Hardware" icon="microchip">H100 × 4</Card>
      <Card title="Engine" icon="server">vLLM 0.20.0</Card>
      <Card title="Context" icon="ruler-horizontal">256K</Card>
      <Card title="Concurrency" icon="layer-group">64</Card>
    </CardGroup>

    ## Write the config

    Create and move into the project directory:

    ```sh theme={"system"}
    mkdir qwen3.6-27b-latency && cd qwen3.6-27b-latency
    ```

    Then create a file named `config.yaml` and paste the following:

    ```yaml config.yaml theme={"system"}
    model_name: "model:qwen3.6-27b preset:latency"

    model_metadata:
      example_model_input:
        model: "Qwen/Qwen3.6-27B"
        messages:
          - role: user
            content: "What is the capital of France?"
        stream: true
        max_tokens: 512
        temperature: 1.0
        top_p: 0.95
      tags:
        - openai-compatible

    base_image:
      image: vllm/vllm-openai:v0.20.0

    weights:
      - source: "hf://Qwen/Qwen3.6-27B@6a9e13bd6fc8f0983b9b99948120bc37f49c13e9"
        mount_location: "/app/checkpoint/model"

    resources:
      instance_type: H100:4

    runtime:
      predict_concurrency: 64

    environment_variables:
      HF_HUB_ENABLE_HF_TRANSFER: "1"
      VLLM_LOGGING_LEVEL: WARNING


    docker_server:
      start_command: >-
        sh -c 'GPU_COUNT=$(nvidia-smi --list-gpus | wc -l) && vllm serve /app/checkpoint/model
        --served-model-name Qwen/Qwen3.6-27B
        --host 0.0.0.0
        --port 8000
        --trust-remote-code
        --tensor-parallel-size $GPU_COUNT
        --max-model-len 262144
        --language-model-only
        --reasoning-parser qwen3
        --enable-auto-tool-choice
        --tool-call-parser qwen3_coder
        --speculative_config.method mtp
        --speculative_config.num_speculative_tokens 2'
        --load-format runai_streamer
      readiness_endpoint: /health
      liveness_endpoint: /health
      predict_endpoint: /v1/chat/completions
      server_port: 8000
    ```

    ## Flags

    The `start_command` passes these flags to the engine. Each one controls a runtime or serving behavior:

    | Flag | Value | What it does |
    | - | - | - |
    | `--trust-remote-code` | (no value) | Execute model-specific Python from the checkpoint (required for many Qwen, Phi, and custom architectures). |
    | `--tensor-parallel-size` | `$GPU_COUNT` | Number of GPUs to shard the model across. |
    | `--max-model-len` | `262144` | Maximum context length (tokens) the server accepts per request. |
    | `--language-model-only` | (no value) | Disable the multimodal path; text-only serving. Remove to enable image/video inputs. |
    | `--reasoning-parser` | `qwen3` | Server-side parser that separates reasoning output into `reasoning_content`. **qwen3:** Qwen3-family thinking format (used by Qwen3, Qwen3.5, and Qwen3.6). |
    | `--enable-auto-tool-choice` | (no value) | Let the model choose when to call tools without requiring `tool_choice: "required"`. |
    | `--tool-call-parser` | `qwen3_coder` | Server-side parser that emits structured `tool_calls` on the response. **qwen3\_coder:** Qwen3-Coder tool format. |
    | `--speculative_config.method` | `mtp` | Speculative decoding method. **mtp:** Multi-token prediction head speculation. |
    | `--speculative_config.num_speculative_tokens` | `2` | Number of tokens the draft speculator proposes per step. |

    ## Deploy

    Push the config to Baseten with the Baseten CLI, or with the Truss CLI if you prefer it:

    <CodeGroup>
      ```sh Baseten CLI theme={"system"}
      baseten model push
      ```

      ```sh Truss CLI theme={"system"}
      uvx truss push
      ```
    </CodeGroup>

    You should see output similar to:

    ```output theme={"system"}
    Pushing model "qwen3.6-27b-latency"...
    Uploading model...
    Uploaded model in 0s
    ✨ Model qwen3.6-27b-latency was successfully pushed ✨

      Model:       qwen3.6-27b-latency (abc1d2ef)
      Deployment:  xyz123
      Environment: production

    🪵 View logs:
       deployment:   baseten model deployment logs --model-id abc1d2ef --deployment-id xyz123
       environment:  baseten model environment logs --model-id abc1d2ef --environment production  (once deployed)
       app:          https://app.baseten.co/models/abc1d2ef/logs/xyz123

    🚀 Invoke your model:
       URL:  https://model-abc1d2ef.api.baseten.co/deployment/xyz123/predict
       CLI:  baseten model predict --model-id abc1d2ef
    ```

    `baseten model push` prints your **model ID** (`abc1d2ef` in the example). The examples below use it wherever you see `{model_id}`, and read your API key from the `BASETEN_API_KEY` environment variable.

    ## Call the model

    Your deployment serves an OpenAI-compatible API.

    Now call your deployment to run inference:

    <Tabs>
      <Tab title="Python">
        ```python main.py theme={"system"}
        import os
        from openai import OpenAI

        client = OpenAI(
            api_key=os.environ["BASETEN_API_KEY"],
            base_url="https://model-{model_id}.api.baseten.co/environments/production/sync/v1",
        )

        response = client.chat.completions.create(
            model="Qwen/Qwen3.6-27B",
            messages=[
                {"role": "user", "content": "What is machine learning?"}
            ],
        )

        print(response.choices[0].message.content)
        ```
      </Tab>

      <Tab title="cURL">
        ```sh theme={"system"}
        curl -s https://model-{model_id}.api.baseten.co/environments/production/sync/v1/chat/completions \
          -H "Content-Type: application/json" \
          -H "Authorization: Bearer $BASETEN_API_KEY" \
          -d '{
            "model": "Qwen/Qwen3.6-27B",
            "messages": [
              {"role": "user", "content": "What is machine learning?"}
            ]
          }'
        ```
      </Tab>
    </Tabs>

    To access the model's chain of thought, enable thinking mode. The server parses the reasoning output into a separate `reasoning_content` field on the response:

    ```python theme={"system"}
    response = client.chat.completions.create(
        model="Qwen/Qwen3.6-27B",
        messages=[
            {"role": "user", "content": "How many r's in strawberry?"}
        ],
        extra_body={"chat_template_kwargs": {"enable_thinking": True}},
    )
    print(response.choices[0].message.reasoning_content)  # chain of thought
    print(response.choices[0].message.content)            # final answer
    ```

    To let the model call tools, pass a `tools` array. The server returns structured `tool_calls` on the response:

    ```python theme={"system"}
    tools = [{
        "type": "function",
        "function": {
            "name": "get_weather",
            "parameters": {
                "type": "object",
                "properties": {"location": {"type": "string"}},
                "required": ["location"],
            },
        },
    }]

    response = client.chat.completions.create(
        model="Qwen/Qwen3.6-27B",
        messages=[
            {"role": "user", "content": "What's the weather in Paris?"}
        ],
        tools=tools,
    )
    print(response.choices[0].message.tool_calls)
    ```
  </Tab>

  <Tab title="35B-A3B">
    [Qwen/Qwen3.6-35B-A3B](https://huggingface.co/Qwen/Qwen3.6-35B-A3B) is a 35B-parameter hybrid MoE model (3B active per token) with up to 256K context.

    This variant ships in 2 presets tuned for different goals: **Throughput** for highest tokens per second, and **Latency** for lowest time-to-first-token. Pick the tab that matches your workload.

    <Tabs>
      <Tab title="Throughput">
        This preset serves the RedHatAI NVFP4 quantization of Qwen3.6-35B-A3B on a single B200, with FlashInfer MoE kernels, chunked prefill, and prefix caching enabled. It maximizes aggregate throughput at high concurrency.

        <CardGroup cols={4}>
          <Card title="Hardware" icon="microchip">B200</Card>
          <Card title="Engine" icon="server">vLLM 0.28.0</Card>
          <Card title="Context" icon="ruler-horizontal">256K</Card>
          <Card title="Concurrency" icon="layer-group">1000</Card>
        </CardGroup>

        ## Write the config

        Create and move into the project directory:

        ```sh theme={"system"}
        mkdir qwen3.6-35b-a3b-throughput && cd qwen3.6-35b-a3b-throughput
        ```

        Then create a file named `config.yaml` and paste the following:

        ```yaml config.yaml theme={"system"}
        model_name: "model:qwen3.6-35b-a3b preset:throughput"
        model_metadata:
          example_model_input:
            model: "RedHatAI/Qwen3.6-35B-A3B-NVFP4"
            messages:
              - role: user
                content: "What is the capital of France?"
            max_tokens: 100
            temperature: 0.7
          tags:
            - openai-compatible
            - vllm
            - qwen3.6
            - nvfp4
            - b200
        base_image:
          image: "vllm/vllm-openai:v0.28.0"
        weights:
          - source: "hf://RedHatAI/Qwen3.6-35B-A3B-NVFP4@main"
            mount_location: "/app/checkpoint/model"
            auth_secret_name: "hf_access_token"
        build_commands: []
        environment_variables:
          PYTORCH_ALLOC_CONF: "expandable_segments:True"
          VLLM_FLASHINFER_MOE_BACKEND: throughput
          VLLM_USE_FLASHINFER_MOE_FP4: 1
          VLLM_USE_FLASHINFER_MOE_FP8: 1
        docker_server:
          start_command: >-
            sh -c 'GPU_COUNT=$(nvidia-smi --list-gpus | wc -l) && vllm serve /app/checkpoint/model
            --tensor-parallel-size $GPU_COUNT
            --served-model-name RedHatAI/Qwen3.6-35B-A3B-NVFP4
            --host 0.0.0.0
            --port 8000
            --gpu-memory-utilization 0.95
            --max-model-len 262144
            --max-num-batched-tokens 32768
            --dtype auto
            --enable-chunked-prefill
            --enable-prefix-caching
            --max-num-seqs 512
            --reasoning-parser qwen3
            --enable-auto-tool-choice
            --tool-call-parser qwen3_coder
            --moe_backend flashinfer_cutlass
            --speculative-config.method qwen3_5_mtp
            --speculative-config.num_speculative_tokens 3
            --trust-remote-code
            --load-format runai_streamer'
          readiness_endpoint: /health
          liveness_endpoint: /health
          predict_endpoint: /v1/chat/completions
          server_port: 8000
        runtime:
          predict_concurrency: 1000
          health_checks:
            startup_threshold_seconds: 1500
            restart_threshold_seconds: 1500
            stop_traffic_threshold_seconds: 120
        resources:
          instance_type: B200
        secrets:
          hf_access_token: null
        ```

        ## Flags

        The `start_command` passes these flags to the engine. Each one controls a runtime or serving behavior:

        | Flag | Value | What it does |
        | - | - | - |
        | `--tensor-parallel-size` | `$GPU_COUNT` | Number of GPUs to shard the model across. |
        | `--gpu-memory-utilization` | `0.95` | Fraction of GPU memory vLLM may use for weights and KV cache. |
        | `--max-model-len` | `262144` | Maximum context length (tokens) the server accepts per request. |
        | `--max-num-batched-tokens` | `32768` | Maximum total tokens processed per scheduler step. |
        | `--dtype` | `auto` | Weight precision loaded at runtime. **auto:** Match the model's checkpoint dtype (default). |
        | `--enable-chunked-prefill` | (no value) | Process long prompts in chunks so decode requests keep running. |
        | `--enable-prefix-caching` | (no value) | Reuse KV cache across requests that share a prefix. |
        | `--max-num-seqs` | `512` | Maximum number of concurrent sequences in the batch. |
        | `--reasoning-parser` | `qwen3` | Server-side parser that separates reasoning output into `reasoning_content`. **qwen3:** Qwen3-family thinking format (used by Qwen3, Qwen3.5, and Qwen3.6). |
        | `--enable-auto-tool-choice` | (no value) | Let the model choose when to call tools without requiring `tool_choice: "required"`. |
        | `--tool-call-parser` | `qwen3_coder` | Server-side parser that emits structured `tool_calls` on the response. **qwen3\_coder:** Qwen3-Coder tool format. |
        | `--moe_backend` | `flashinfer_cutlass` | MoE expert dispatch kernel. Engine-specific values select between routing implementations tuned for different hardware or model layouts. |
        | `--speculative-config.method` | `qwen3_5_mtp` | Speculative decoding method. **qwen3\_5\_mtp:** Qwen3.5/3.6-style multi-token prediction head. |
        | `--speculative-config.num_speculative_tokens` | `3` | Number of tokens the draft speculator proposes per step. |
        | `--trust-remote-code` | (no value) | Execute model-specific Python from the checkpoint (required for many Qwen, Phi, and custom architectures). |
        | `--load-format` | `runai_streamer` | Weight loading backend. **runai\_streamer:** Stream weights from object storage without materializing to disk. |

        ## Deploy

        Push the config to Baseten with the Baseten CLI, or with the Truss CLI if you prefer it:

        <CodeGroup>
          ```sh Baseten CLI theme={"system"}
          baseten model push
          ```

          ```sh Truss CLI theme={"system"}
          uvx truss push
          ```
        </CodeGroup>

        You should see output similar to:

        ```output theme={"system"}
        Pushing model "qwen3.6-35b-a3b-throughput"...
        Uploading model...
        Uploaded model in 0s
        ✨ Model qwen3.6-35b-a3b-throughput was successfully pushed ✨

          Model:       qwen3.6-35b-a3b-throughput (abc1d2ef)
          Deployment:  xyz123
          Environment: production

        🪵 View logs:
           deployment:   baseten model deployment logs --model-id abc1d2ef --deployment-id xyz123
           environment:  baseten model environment logs --model-id abc1d2ef --environment production  (once deployed)
           app:          https://app.baseten.co/models/abc1d2ef/logs/xyz123

        🚀 Invoke your model:
           URL:  https://model-abc1d2ef.api.baseten.co/deployment/xyz123/predict
           CLI:  baseten model predict --model-id abc1d2ef
        ```

        `baseten model push` prints your **model ID** (`abc1d2ef` in the example). The examples below use it wherever you see `{model_id}`, and read your API key from the `BASETEN_API_KEY` environment variable.

        ## Call the model

        Your deployment serves an OpenAI-compatible API.

        Now call your deployment to run inference:

        <Tabs>
          <Tab title="Python">
            ```python main.py theme={"system"}
            import os
            from openai import OpenAI

            client = OpenAI(
                api_key=os.environ["BASETEN_API_KEY"],
                base_url="https://model-{model_id}.api.baseten.co/environments/production/sync/v1",
            )

            response = client.chat.completions.create(
                model="RedHatAI/Qwen3.6-35B-A3B-NVFP4",
                messages=[
                    {"role": "user", "content": "What is machine learning?"}
                ],
            )

            print(response.choices[0].message.content)
            ```
          </Tab>

          <Tab title="cURL">
            ```sh theme={"system"}
            curl -s https://model-{model_id}.api.baseten.co/environments/production/sync/v1/chat/completions \
              -H "Content-Type: application/json" \
              -H "Authorization: Bearer $BASETEN_API_KEY" \
              -d '{
                "model": "RedHatAI/Qwen3.6-35B-A3B-NVFP4",
                "messages": [
                  {"role": "user", "content": "What is machine learning?"}
                ]
              }'
            ```
          </Tab>
        </Tabs>

        To access the model's chain of thought, enable thinking mode. The server parses the reasoning output into a separate `reasoning_content` field on the response:

        ```python theme={"system"}
        response = client.chat.completions.create(
            model="RedHatAI/Qwen3.6-35B-A3B-NVFP4",
            messages=[
                {"role": "user", "content": "How many r's in strawberry?"}
            ],
            extra_body={"chat_template_kwargs": {"enable_thinking": True}},
        )
        print(response.choices[0].message.reasoning_content)  # chain of thought
        print(response.choices[0].message.content)            # final answer
        ```

        To let the model call tools, pass a `tools` array. The server returns structured `tool_calls` on the response:

        ```python theme={"system"}
        tools = [{
            "type": "function",
            "function": {
                "name": "get_weather",
                "parameters": {
                    "type": "object",
                    "properties": {"location": {"type": "string"}},
                    "required": ["location"],
                },
            },
        }]

        response = client.chat.completions.create(
            model="RedHatAI/Qwen3.6-35B-A3B-NVFP4",
            messages=[
                {"role": "user", "content": "What's the weather in Paris?"}
            ],
            tools=tools,
        )
        print(response.choices[0].message.tool_calls)
        ```
      </Tab>

      <Tab title="Latency">
        This preset serves Qwen3.6-35B-A3B on H100:4 with MTP speculative decoding, optimized for low time-to-first-token on interactive chat and short-horizon agent workflows.

        <CardGroup cols={4}>
          <Card title="Hardware" icon="microchip">H100 × 4</Card>
          <Card title="Engine" icon="server">vLLM 0.20.0</Card>
          <Card title="Context" icon="ruler-horizontal">256K</Card>
          <Card title="Concurrency" icon="layer-group">64</Card>
        </CardGroup>

        ## Write the config

        Create and move into the project directory:

        ```sh theme={"system"}
        mkdir qwen3.6-35b-a3b-latency && cd qwen3.6-35b-a3b-latency
        ```

        Then create a file named `config.yaml` and paste the following:

        ```yaml config.yaml theme={"system"}
        model_name: "model:qwen3.6-35b-a3b preset:latency"

        model_metadata:
          example_model_input:
            model: "Qwen/Qwen3.6-35B-A3B"
            messages:
              - role: user
                content: "What is the capital of France?"
            stream: true
            max_tokens: 512
            temperature: 1.0
            top_p: 0.95
          tags:
            - openai-compatible

        base_image:
          image: vllm/vllm-openai:v0.20.0

        weights:
          - source: "hf://Qwen/Qwen3.6-35B-A3B@995ad96eacd98c81ed38be0c5b274b04031597b0"
            mount_location: "/app/checkpoint/model"

        resources:
          accelerator: H100:4
          use_gpu: true

        runtime:
          predict_concurrency: 64

        environment_variables:
          HF_HUB_ENABLE_HF_TRANSFER: "1"
          VLLM_LOGGING_LEVEL: WARNING


        docker_server:
          start_command: >-
            sh -c 'GPU_COUNT=$(nvidia-smi --list-gpus | wc -l) && vllm serve /app/checkpoint/model
            --served-model-name Qwen/Qwen3.6-35B-A3B
            --host 0.0.0.0
            --port 8000
            --trust-remote-code
            --tensor-parallel-size $GPU_COUNT
            --max-model-len 262144
            --language-model-only
            --reasoning-parser qwen3
            --enable-auto-tool-choice
            --tool-call-parser qwen3_coder
            --speculative_config.method mtp
            --speculative_config.num_speculative_tokens 2'
            --load-format runai_streamer
          readiness_endpoint: /health
          liveness_endpoint: /health
          predict_endpoint: /v1/chat/completions
          server_port: 8000
        ```

        ## Flags

        The `start_command` passes these flags to the engine. Each one controls a runtime or serving behavior:

        | Flag | Value | What it does |
        | - | - | - |
        | `--trust-remote-code` | (no value) | Execute model-specific Python from the checkpoint (required for many Qwen, Phi, and custom architectures). |
        | `--tensor-parallel-size` | `$GPU_COUNT` | Number of GPUs to shard the model across. |
        | `--max-model-len` | `262144` | Maximum context length (tokens) the server accepts per request. |
        | `--language-model-only` | (no value) | Disable the multimodal path; text-only serving. Remove to enable image/video inputs. |
        | `--reasoning-parser` | `qwen3` | Server-side parser that separates reasoning output into `reasoning_content`. **qwen3:** Qwen3-family thinking format (used by Qwen3, Qwen3.5, and Qwen3.6). |
        | `--enable-auto-tool-choice` | (no value) | Let the model choose when to call tools without requiring `tool_choice: "required"`. |
        | `--tool-call-parser` | `qwen3_coder` | Server-side parser that emits structured `tool_calls` on the response. **qwen3\_coder:** Qwen3-Coder tool format. |
        | `--speculative_config.method` | `mtp` | Speculative decoding method. **mtp:** Multi-token prediction head speculation. |
        | `--speculative_config.num_speculative_tokens` | `2` | Number of tokens the draft speculator proposes per step. |

        ## Deploy

        Push the config to Baseten with the Baseten CLI, or with the Truss CLI if you prefer it:

        <CodeGroup>
          ```sh Baseten CLI theme={"system"}
          baseten model push
          ```

          ```sh Truss CLI theme={"system"}
          uvx truss push
          ```
        </CodeGroup>

        You should see output similar to:

        ```output theme={"system"}
        Pushing model "qwen3.6-35b-a3b-latency"...
        Uploading model...
        Uploaded model in 0s
        ✨ Model qwen3.6-35b-a3b-latency was successfully pushed ✨

          Model:       qwen3.6-35b-a3b-latency (abc1d2ef)
          Deployment:  xyz123
          Environment: production

        🪵 View logs:
           deployment:   baseten model deployment logs --model-id abc1d2ef --deployment-id xyz123
           environment:  baseten model environment logs --model-id abc1d2ef --environment production  (once deployed)
           app:          https://app.baseten.co/models/abc1d2ef/logs/xyz123

        🚀 Invoke your model:
           URL:  https://model-abc1d2ef.api.baseten.co/deployment/xyz123/predict
           CLI:  baseten model predict --model-id abc1d2ef
        ```

        `baseten model push` prints your **model ID** (`abc1d2ef` in the example). The examples below use it wherever you see `{model_id}`, and read your API key from the `BASETEN_API_KEY` environment variable.

        ## Call the model

        Your deployment serves an OpenAI-compatible API.

        Now call your deployment to run inference:

        <Tabs>
          <Tab title="Python">
            ```python main.py theme={"system"}
            import os
            from openai import OpenAI

            client = OpenAI(
                api_key=os.environ["BASETEN_API_KEY"],
                base_url="https://model-{model_id}.api.baseten.co/environments/production/sync/v1",
            )

            response = client.chat.completions.create(
                model="Qwen/Qwen3.6-35B-A3B",
                messages=[
                    {"role": "user", "content": "What is machine learning?"}
                ],
            )

            print(response.choices[0].message.content)
            ```
          </Tab>

          <Tab title="cURL">
            ```sh theme={"system"}
            curl -s https://model-{model_id}.api.baseten.co/environments/production/sync/v1/chat/completions \
              -H "Content-Type: application/json" \
              -H "Authorization: Bearer $BASETEN_API_KEY" \
              -d '{
                "model": "Qwen/Qwen3.6-35B-A3B",
                "messages": [
                  {"role": "user", "content": "What is machine learning?"}
                ]
              }'
            ```
          </Tab>
        </Tabs>

        To access the model's chain of thought, enable thinking mode. The server parses the reasoning output into a separate `reasoning_content` field on the response:

        ```python theme={"system"}
        response = client.chat.completions.create(
            model="Qwen/Qwen3.6-35B-A3B",
            messages=[
                {"role": "user", "content": "How many r's in strawberry?"}
            ],
            extra_body={"chat_template_kwargs": {"enable_thinking": True}},
        )
        print(response.choices[0].message.reasoning_content)  # chain of thought
        print(response.choices[0].message.content)            # final answer
        ```

        To let the model call tools, pass a `tools` array. The server returns structured `tool_calls` on the response:

        ```python theme={"system"}
        tools = [{
            "type": "function",
            "function": {
                "name": "get_weather",
                "parameters": {
                    "type": "object",
                    "properties": {"location": {"type": "string"}},
                    "required": ["location"],
                },
            },
        }]

        response = client.chat.completions.create(
            model="Qwen/Qwen3.6-35B-A3B",
            messages=[
                {"role": "user", "content": "What's the weather in Paris?"}
            ],
            tools=tools,
        )
        print(response.choices[0].message.tool_calls)
        ```
      </Tab>
    </Tabs>
  </Tab>
</Tabs>

## Next steps

<CardGroup cols={2}>
  <Card title="Call your model" icon="code" href="/inference/calling-your-model">
    Endpoint anatomy, authentication, and sync versus async inference
  </Card>

  <Card title="Autoscaling" icon="arrow-up-right-dots" href="/deployment/autoscaling/overview">
    Scale replicas with traffic, including scale to zero
  </Card>
</CardGroup>
