Tencent Hy4 Preview


Tencent Hy4 preview (Tencent Hunyuan 4 preview) is Tencent's next-generation 770B MoE open-source flagship model. Comprising 770 billion total parameters and 49 billion active parameters, it supports a 1-million-token (1M) context window. Architectural innovations include Gated DeepSeek Sparse Attention (Gated DSA) with IndexCache, identity Hyper-Connections (iHC), and a built-in 10B MTP layer for speculative decoding.

Tencent Hy4 Preview

Tencent Hy4 preview is Tencent's next-generation 770B MoE open-source flagship model with 770 billion total parameters and 49 billion active parameters. It supports a 1-million-token context window for agentic reasoning, coding, and deep research.

Base URL

https://api.icreat.ai/llm/openai/v1

Authentication

All API requests must be authenticated with an API Key. You can obtain an API Key from the console.

export ICREAT_API_KEY="your-api-key-here"

HTTP Request Headers

import os

API_KEY = os.environ.get("ICREAT_API_KEY")
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer " + API_KEY,
}

Protect your API Key

Never expose your API Key in client-side code or public repositories. Use environment variables or a backend proxy.

Code Examples

This model is called through an OpenAI-compatible Chat Completions endpoint. Set stream to false (default) for a single JSON response, or true for Server-Sent Events (SSE) streaming.

POST/chat/completions

Input Schema

The following parameters are accepted in the request body.

Total: 6 Required: 2 Optional: 4

modelstringrequired

The model ID for the completion. Must be the iCreat model_code for this model (hy4-preview), not the vendor's original model name.

Example: "hy4-preview"

messagesarray[object]required

A list of messages comprising the conversation.

thinkingobject

Extended thinking configuration.

reasoning_effortstring

Reasoning effort budget.

lowmediumhigh
max_tokensinteger

Maximum number of tokens to generate.

Min: 1

streamboolean

If true, partial message deltas are streamed via Server-Sent Events.

Default"false"

Output Schema

The API returns an OpenAI-compatible Chat Completions response.

Total: 6

idstring

Unique identifier for the completion.

objectstring

Object type, always chat.completion.

createdinteger

Unix timestamp when the completion was created.

modelstring

The model ID used for the completion.

choicesarray[object]

List of completion choices.

usageobject

Token usage statistics.

LLM-friendly prompt

Below is an LLM-friendly Markdown prompt you can copy into Cursor, ChatGPT, or other AI assistants to help them understand this model's API integration, call flow, and key parameters.

# hy4-preview

> Tencent Hy4 preview is Tencent's next-generation 770B MoE open-source flagship model with 770 billion total parameters and 49 billion active parameters.

## Overview

Call via iCreat OpenAI-compatible Chat Completions API; supports streaming and non-streaming and extended thinking.

## API Info

- **Base URL**: `https://api.icreat.ai/llm/openai/v1`
- **Endpoint (POST)**: `/chat/completions`
- **Model ID**: `hy4-preview`
- **Auth**: `Authorization: Bearer ${ICREAT_API_KEY}`

## Call Flow

Single POST; `stream: false` returns full JSON, `stream: true` streams via SSE.

### Input

- `model` (required): iCreat model_code `hy4-preview`
- `messages` (required): conversation messages
- Common optional: `max_tokens`, `stream`, `thinking`, `reasoning_effort`

### Output

- Read reply from `choices[0].message.content`

## Notes

- `model` must be the iCreat model_code
- Other fields follow the OpenAI Chat Completions protocol