Tencent

Hunyuan-4-preview

tencent/hy4-preview
/v1/completions/v1/chat/completions/v1/messages/v1/responses/v1beta/models/*/v1/models/*

混元Hy4 preview总参数770B、激活参数49B,重点面向Agent、Coding与生产力场景优化,强化复杂任务中的理解、规划、工具调用与持续执行能力。相比上一代模型,Hy4 preview在多步骤Agent、代码开发和生产力任务上进一步提升,具备更好的任务拆解、上下文承接、指令遵循和长链路执行能力。在Coding场景中,进一步增强代码理解、生成、修改和复杂工程任务处理能力;在生产力场景中,重点提升文档处理、信息分析、办公自动化、游戏开发、网页生成及跨工具协作等能力。Hy4 preview适用于Coding Agent、复杂工具调用以及各类需要多步骤规划和持续执行的Agent工作流,为真实业务场景中的复杂任务提供更可靠的任务完成能力。

Input / output modalities
文本 · 图像 to 文本
Reference input / output price
Input¥6Output¥18per 1M tokens
Context window
1M
Added to catalog
Aug 28, 2026

Providers and pricing

ProviderInput /MOutput /MCached /MContextMax outputDetails
Tencent¥6¥18¥0.31M64K

Tencent

Latency
2.37s
Throughput
38 tokens/s
Context
1M

Pricing

Input
¥6/M tokens
Output
¥18/M tokens
Cached
¥0.3/M tokens

Specifications

Context
1M
Max output
64K
Supported APIs
/v1/completions/v1/chat/completions/v1/messages/v1/responses/v1beta/models/*/v1/models/*

Hunyuan-4-preview code examples and API guide

Modelmesh normalizes requests and responses across service providers behind one consistent API.

Modelmesh provides an OpenAI-compatible Completion API for more than 300 models and service providers. Call it directly, through the OpenAI SDK, or with supported third-party SDKs.

Modelmesh-specific request headers in these examples are optional. When supplied, your application can appear on the Modelmesh rankings.

Supported endpointsSelect an endpoint to switch the example below.
/v1/completions
from openai import OpenAI API_KEY = "$SSY_API_KEY" client = OpenAI( base_url="https://router.shengsuanyun.com/api/v1", api_key=API_KEY, ) response = client.completions.create( model="tencent/hy4-preview", prompt="Enter your request here", max_tokens=1024, ) print(response.choices[0].text)
                
              

Related Models