> ## 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)
