> ## 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: Tencent's 1M-context flagship productivity model for complex agents, coding, office work, and analysis.

Hy4 Preview is Tencent Hy's next-generation flagship productivity model for complex agents, long-horizon software engineering, office work, and analytical tasks.

Call `hy4-preview` through MixRoute using the OpenAI-compatible Chat Completions endpoint.

## Key capabilities

* 1M context window - Supports up to 960K input tokens and 64K output tokens
* Agentic productivity - Designed for complex task execution, coding, documents, spreadsheets, and analysis
* Reasoning and tools - Supports preserved thinking, structured output, function calling, and caching
* Large MoE architecture - 770B total parameters with 49B activated per token

## Quick example

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

## Parameters

| Parameter          | Type    | Required | Description                                   |
| ------------------ | ------- | -------- | --------------------------------------------- |
| `model`            | string  | Yes      | Model ID. Must be `hy4-preview`.              |
| `messages`         | array   | Yes      | Conversation messages with role and content.  |
| `max_tokens`       | integer | No       | Maximum generated tokens.                     |
| `stream`           | boolean | No       | Enable SSE streaming.                         |
| `reasoning_effort` | string  | No       | Reasoning effort when supported by the model. |
| `tools`            | array   | No       | OpenAI-compatible tool definitions.           |

## Vendor reference

* [Tencent Cloud TokenHub model list](https://cloud.tencent.com/document/product/1823/130051)
* [Tencent Hy4 Preview repository](https://github.com/Tencent-Hunyuan/Hy4-preview)
