HY4 Preview API

Tencent's open-weight Hy4 preview for coding and office work

tencent/hy4-preview
TencentConversation

About this model

Hy4 preview is the early release of Tencent Hunyuan’s next-generation flagship language model. Tencent describes it as built for productivity and reports a Mixture-of-Experts design with 770B total and 49B active parameters, released with open weights under Apache 2.0.

Tencent itself calls it an early iteration with room to improve, and notes that it can reason longer than necessary on complex tasks.

In this catalog it supports images and tool calls with a context window of about 266,000 tokens, so very long inputs should be trimmed accordingly.

Use cases

  • Software engineering and agent tasks
  • Office and data analysis
  • Long-context reading

Input and output

Input
Text and images
Output
Text, tool calls

Developer

Developer
Tencent
Type
Conversation
Context
266,000 tokens
Capabilities
Image input

HY4 Preview request example

Use https://gatelum.com/v1 as the base URL and pass tencent/hy4-preview in the model field. You create the key in your account after signing up.

curl --silent --show-error --fail-with-body \
  --header 'Authorization: Bearer glt_YOUR_KEY' \
  'https://gatelum.com/v1/chat/completions' \
  --header "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "model": "tencent/hy4-preview",
  "messages": [
    {
      "role": "user",
      "content": "Hi! Tell me about yourself in two sentences."
    }
  ]
}
JSON
Claude Code and Anthropic-protocol clients

For clients using the Anthropic protocol, point the address at ANTHROPIC_BASE_URL=https://gatelum.com with no /v1. The model ID does not change.

macOS / Linux
export ANTHROPIC_BASE_URL=https://gatelum.com
export ANTHROPIC_AUTH_TOKEN=glt_YOUR_KEY
export ANTHROPIC_MODEL=tencent/hy4-preview
claude

Where to use HY4 Preview

Guides with step-by-step instructions for the tools that support this model: