Hy4 overview
Hy4 by Tencent
Hy4 is the official release from Tencent, offering improved performance for real-world productivity. It supports text and image inputs with a large context window and configurable reasoning effort.
Hy4 specs
- Model ID
tencent/hy4- Developer
- Tencent
- Context window
- 1,048,576 tokens
- Max output
- 65,536 tokens
- Input
- Image, Text
- Output
- Text
- API
- OpenAI-compatible, base URL
https://api.aimlapi.com/v1
What Is Hy4 API?
Hy4 is the latest model developed by Tencent, built to succeed the previous preview version with significant upgrades to its agentic capabilities.
Designed for versatility, the model handles both text and image inputs while providing users with control over its reasoning effort.
Large Context Window
The model supports a context window of 1M tokens to handle extensive information.
Configurable Reasoning
Users can adjust the reasoning effort to suit the specific demands of their tasks.
Multimodal Input
Hy4 processes both text and image inputs to generate comprehensive text responses.
Tool Integration
The model includes support for tools, streaming, and structured output generation.
Use cases
Automating complex, long-horizon productivity tasks.
Analyzing visual data alongside textual information.
Generating structured outputs for data processing workflows.
Executing multi-step agentic reasoning processes.
Capabilities
- Reasoning
- Streaming
- Structured outputs
- Function calling
- Vision
Hy4 API pricing
| Usage | Price | Unit |
|---|---|---|
| Input | $0.8824 | 1M tokens |
| Output | $2.65 | 1M tokens |
| Cached input | $0.0444 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
Hy4 vs other models: token prices
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $0.8824 | $2.65 | |
| $0.0466 | $0.1873 | |
| $0.0783 | $0.3121 | |
| $0.0783 | $0.3121 | |
| $0.8824 | $2.65 |
How to use the Hy4 API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "tencent/hy4",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "tencent/hy4",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = 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",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Related articles
Hy4 FAQ
How much does Hy4 cost?
Hy4 costs $0.882372 / 1M tokens for input and $2.646058 / 1M tokens for output on AI/ML API. Cached input is billed at $0.044436 / 1M tokens.
What inputs does Hy4 accept?
Hy4 accepts both text and image inputs.
How large is the context window?
The model features a 1M-token context window.
Can I control the reasoning process?
Yes, Hy4 allows for configurable reasoning effort.
What is the maximum output length?
The model supports a maximum output of 65,536 tokens.
What is the Hy4 model ID?
Use tencent/hy4 as the model parameter. Requests go to the OpenAI-compatible endpoint with your AI/ML API key.

