Hy4 flash overview
Hy4 flash by Tencent
Tencent describes Hy4 flash as its leaner, more efficient model for high-volume, large-scale everyday work. It has 224 billion total parameters, with 12 billion active parameters.
Hy4 flash specs
- Model ID
tencent/hy4-flash- 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
Sizing long inputs and reading images
Of the 224 billion parameters, Tencent counts 64 billion as Engram parameters. Tencent lists a maximum input length of 960,000 tokens, so size long repositories and document sets against that figure.
Tencent positions the model for document and chart understanding. Pair a screenshot or chart image with a text question, then check that the numbers in the answer match the image.
Set reasoning effort to match the task
The reasoning effort option limits how much the model reasons before it answers. Lowering it gives faster responses and spends fewer tokens on reasoning.
Start with low for high-volume everyday requests. Move to high on the prompts where answers come back wrong, such as multi-step code changes, then compare quality and latency on the same set.
Hy4 flash or Hy4 preview
Hy4 preview is Tencent's mixture-of-experts model with 49B active parameters out of 770B total. It is built for coding agents, complex tool-use workflows and productivity tasks. Run both on your own agent traces and weigh the results against the speed you need.
Use cases
Generate and review code inside an editor assistant, with long files passed in as context.
Drive an agent that calls tools and returns structured output at high request volume.
Answer questions about a chart or a scanned document by sending the image with a text prompt.
Handle everyday productivity requests such as summaries and drafts at low reasoning effort.
Capabilities
- Reasoning
- Streaming
- Structured outputs
- Function calling
- Vision
Hy4 flash API pricing
| Usage | Price | Unit |
|---|---|---|
| Input | $0.07406 | 1M tokens |
| Output | $0.297298 | 1M tokens |
| Cached input | $0.003174 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 18, 2026.
Hy4 flash vs other models: token prices
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $0.07406 | $0.297298 | |
| $0.046552 | $0.187266 | |
| $0.078292 | $0.31211 | |
| $0.42 | $1.25 | |
| $0.882372 | $2.646058 |
How to use the Hy4 flash 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-flash",
"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-flash",
"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-flash",
"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 flash FAQ
How much does Hy4 flash cost?
Hy4 flash costs $0.07406 / 1M tokens for input and $0.297298 / 1M tokens for output on AI/ML API. Cached input is billed at $0.003174 / 1M tokens.
What inputs does Hy4 flash accept?
It accepts text and image input and returns text. Send an image together with a text question for chart and document tasks.
How do I change the reasoning effort?
Set the reasoning effort option on the request. Lowering it gives faster responses and fewer tokens spent on reasoning, so start with low and move to high for harder prompts.
Does it support tools, streaming and structured output?
Yes. Tools, streaming and structured output are listed capabilities, along with reasoning and vision.
How does Hy4 flash differ from Hy4 preview?
Hy4 flash has 12 billion active parameters out of 224 billion. Hy4 preview has 49B active out of 770B and is built for coding agents and complex tool-use workflows.
What is the Hy4 flash model ID?
Use tencent/hy4-flash as the model parameter. Requests go to the OpenAI-compatible endpoint with your AI/ML API key.
What is the context window of Hy4 flash?
Hy4 flash accepts up to 1,048,576 tokens of context and returns up to 65,536 output tokens.

