Hy4 Preview API

tencent/hy4-preview
Hy4 Preview is Tencent's new-generation flagship MoE model — 770B total / 49B active parameters, with a 1M-token context window and native speculative decoding.
Context
1M tokens
Input
$0.882372 / 1M tokens
Output
$2.646058 / 1M tokens
Released
Aug 28, 2026

Overview

What Is Hy4 Preview API?

Hy4 Preview is Tencent's new-generation flagship model, part of the Hunyuan Hy4 family. It is a 770-billion-parameter Mixture-of-Experts model with 49 billion active parameters, trained alongside Tencent's internal software engineering, game development, finance, and security teams around the tasks those teams actually ship, with a native 10-billion-parameter MTP layer built in for speculative decoding.

Technical Reference

DeveloperTencent
Model IDtencent/hy4-preview
Release DateAugust 28, 2026
Context Window1,048,576 tokens (~1M)
Max Output Tokens64,000
Parameters770B total / 49B active (MoE)
ModalitiesText (input) → Text (output)
CapabilitiesReasoning, Streaming, Structured output, Tool calling

What Hy4 Preview Brings to the Table

Large-scale MoE with efficient activation
78 layers — one dense FFN layer plus 77 MoE layers, each with 256 routed experts and 1 shared expert, top-8 routing per token. A native 10B-parameter MTP layer (0.7B activated) handles speculative decoding for faster inference.

Built around real engineering work
Trained with Tencent's internal software engineering, game development, finance, and security teams on the tasks those teams actually ship — including front-end visual and interaction quality, not just benchmark scores.

Open weights, Apache 2.0 license
Both Hy4 Preview and an FP8 variant are available for self-hosted deployment, with dedicated tool-calling and reasoning parsers for agent frameworks.

API Pricing

  • Input: $1.15 per 1M tokens
  • Output: $3.44 per 1M tokens
  • Cached input: $0.0578 per 1M tokens

Where Hy4 Preview Makes the Most Sense

Long-horizon software engineering
Understanding, planning, debugging, and verifying extended development tasks across a 1M-token context window large enough to hold full codebases or long agent sessions.

Tool-calling agent pipelines
Dedicated tool-call and reasoning parsers make it a practical backbone for agent frameworks that need reliable, structured tool use.

Self-hosted deployments
Open weights under Apache 2.0, including an FP8 variant, for teams that need to run the model on their own infrastructure.

‍

Uptime and performance

  • Uptime (7d): 100%

Measured on the AI/ML API gateway across live traffic. Figures are medians unless stated. Last updated 2026-10-12.

Use cases

Software engineering: Hy4 preview is documented as suited for understanding, planning, debugging, and verifying long-horizon development tasks, with improved front-end visual taste and interaction quality.

Office and analysis: It is documented as suited for turning messy information spread across many files into documents, spreadsheets, and presentations, including data analysis, equations, and financial models.

Game development: It is documented as suited for turning a single prompt into a playable prototype and working fluently with game engines across multiple turns.

Scientific research: It is documented as suited for harder research questions, with strengths noted in AI research, molecular dynamics, condensed matter physics, and pure mathematics.

How to use Hy4 Preview API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to tencent/hy4-preview.
import requests

r = requests.post(
    "https://api.aimlapi.com/v1/chat/completions",
    headers={"Authorization": "Bearer " + AIMLAPI_KEY},
    json={
      "model": "tencent/hy4-preview",
      "messages": [
        {
          "role": "user",
          "content": "Hello!"
        }
      ]
    },
)
print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "tencent/hy4-preview",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }),
});
console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/chat/completions \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"tencent/hy4-preview","messages":[{"role":"user","content":"Hello!"}]}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Hy4 Preview API Pricing

TypePrice
Input
$0.882372 / 1M tokens
Output
$2.646058 / 1M tokens
Cached input
$0.044436 / 1M tokens

Hy4 Preview Benchmarks

BenchmarkScoreWhat it measuresSourceRetrieved
GPQA Diamond
92.3
Google-proof graduate science questions (hardest subset)SourceSeptember 21, 2026

Hy4 Preview vs other models

ModelInputOutputContextBest for
Hy4 Preview
This page
$0.882372 / 1M tokens
$2.646058 / 1M tokens
1M tokens
Long-horizon coding + agentic works
$1.4 / 1M tokens
$4.4 / 1M tokens
1000K tokens
Reasoning + agents
$3 / 1M tokens
$15 / 1M tokens
1M tokens
Long-context, multimodal & agentic workflows
$0.9 / 1M tokens
$2.7 / 1M tokens
1M tokens
Reasoning + agents

Frequently asked questions

Hy4 Preview has a 1,048,576 tokens context window and can return up to 64,000 tokens.

Hy4 Preview takes text as input and returns text.

Use tencent/hy4-preview as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.

Hy4 Preview became available on August 28, 2026.

Hy4 Preview is priced at input $1.1470836 / 1M tokens, output $3.4398754 / 1M tokens, cached input $0.0577668 / 1M tokens.

Yes, Hy4 Preview can stream responses as they are generated.

Hy4 Preview was built by Tencent.

Yes, Hy4 Preview supports function calling, allowing it to invoke external tools during a conversation.

Hy4 Preview is a mixture-of-experts model with 49B active parameters out of 770B total.

Start building with Hy4 Preview

Get API Key
1000+ models, one API.