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

# Hy4 Preview

> Hy4 Preview：騰訊混元 100 萬上下文旗艦生產力模型，面向複雜代理、程式設計、辦公與分析。

Hy4 Preview 是騰訊混元的新一代旗艦生產力模型，面向複雜代理、長程軟體工程、辦公與分析任務。

可透過 MixRoute 的 OpenAI 相容 Chat Completions 端點呼叫 `hy4-preview`。

## 核心能力

* 100 萬上下文 - 最大輸入 960K token，最大輸出 64K token
* 代理式生產力 - 面向複雜任務執行、程式設計、文件、試算表和分析
* 推理與工具 - 支援保留式思考、結構化輸出、函式呼叫和快取
* 大型 MoE 架構 - 總參數 770B，每個 token 啟用 49B

## 快速範例

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/chat/completions" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "hy4-preview",
        "messages": [
          {
            "role": "user",
            "content": "Review this deployment plan and identify the highest-risk assumption."
          }
        ],
        "max_tokens": 256
      }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from openai import OpenAI

    client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.mixroute.ai/v1")

    response = client.chat.completions.create(
        model="hy4-preview",
        messages=[{"role": "user", "content": "Review this deployment plan and identify the highest-risk assumption."}],
        max_tokens=256,
    )

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

## 參數

| Parameter          | Type    | 必填 | 說明                       |
| ------------------ | ------- | -- | ------------------------ |
| `model`            | string  | 是  | 模型 ID，固定為 `hy4-preview`。 |
| `messages`         | array   | 是  | 包含 role 與 content 的對話訊息。 |
| `max_tokens`       | integer | 否  | 最大生成 token 數。            |
| `stream`           | boolean | 否  | 啟用 SSE 串流輸出。             |
| `reasoning_effort` | string  | 否  | 模型支援時使用的推理強度。            |
| `tools`            | array   | 否  | OpenAI 相容工具定義。           |

## 廠商參考

* [騰訊雲 TokenHub 模型列表](https://cloud.tencent.com/document/product/1823/130051)
* [Tencent Hy4 Preview repository](https://github.com/Tencent-Hunyuan/Hy4-preview)
