hy4-previewhy4-preview via AI Gateway: hy4-preview is part of Tencent Hunyuan, the Chinese-language general model line: preview builds of Hunyuan 3 and Hunyuan 4 that pair native Chinese quality with tool calling and, on the newer build, image input.
hy4-preview is part of Tencent Hunyuan, the Chinese-language general model line: preview builds of Hunyuan 3 and Hunyuan 4 that pair native Chinese quality with tool calling and, on the newer build, image input.
In production workloads: hy4-preview is part of Tencent Hunyuan, the Chinese-language general model line: preview builds of Hunyuan 3 and Hunyuan 4 that pair native Chinese quality with tool calling and, on the newer build, image input.
In detail:
Chinese-first assistants — Assistants tuned for Chinese-language work.
Internal knowledge tools — Answer questions from company documents.
Multimodal drafts — Hunyuan 4 preview accepts images.
As a trade-off of its positioning: hy4-preview is positioned as a flagship model — pick the tier that matches your task; specs and prices always follow the live catalog.
Start with a small share of traffic, watch token consumption and task success rate, then scale.
| Model | Tier | Best for |
|---|---|---|
hy4 | flagship | Chinese-first assistants |
Prompts are forwarded only to the provider selected in your request and are never used for training by the platform. API keys are stored in isolation and traffic is encrypted with TLS. Teams with data-residency requirements can pick an open-weight model from this catalog and self-host entirely inside their own environment.
For production, configure two layers of fallback: first to a lighter sibling tier within the same vendor, then to a comparable model from a different provider. Apply exponential-backoff retries to timeouts and rate limits, and de-duplicate non-idempotent requests with idempotency keys. The platform's unified error format means this logic is written once.
All models on AI Gateway bill per token in credits: input tokens, output tokens and cached tokens are metered separately, with cache hits billed at a steep discount. There is no subscription — top up credits once and spend them on any model on the site. Live per-million-token rates for this model are always available on the Models page, and credit packs are listed on the Pricing page. Because pricing changes as providers adjust their official rates, this page intentionally does not hard-code numbers.
Requests go through the same three endpoints for every provider: chat/completions (OpenAI format), responses (OpenAI Responses format) and, for Claude models, an Anthropic-compatible messages endpoint. Authentication is a single Bearer key issued in your dashboard. Your API key is stored in isolation, traffic is encrypted over TLS, and prompts are forwarded to the selected provider without being used for training. Streaming, function calling and structured output behave exactly as they do against the official APIs.
Because every model on the platform shares one request format, switching is a one-line change: replace the model string and compare outputs. A common pattern is to route easy traffic to a lighter sibling tier and escalate hard tasks to the flagship — measure token spend and task success rate per tier before committing. If you currently call the provider's official API, keep your existing SDK and change only the base URL and API key.
Model IDs follow the provider's own naming: the number indicates the generation, while suffixes indicate capability tiers (pro/high/max) or routing channels. This page always shows the exact model ID to pass in the API request — copy it from the specifications table above.
Specs and prices come from the platform's live catalog; performance figures come from vendor or third-party publications. Page updated 2026-10-13。
| API model ID | hy4-preview |
| Provider | Tencent Hunyuan |
| Context window | 1,048,576 tokens (1.05M) |
| Type | chat |
| Weights | Weights released under the vendor licence. |
Billing is per token in credits — live rates on the Models pricing page.
Assistants tuned for Chinese-language work.
Answer questions from company documents.
Hunyuan 4 preview accepts images.
This model is served through the site's unified OpenAI-compatible API (Bearer auth). Endpoints: POST /api/ai/v1/chat/completions · API docs →
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://your-domain.com/api/ai/v1"
)
response = client.chat.completions.create(
model="hy4-preview",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello, introduce yourself"}
]
)
print(response.choices[0].message.content)stream = client.chat.completions.create(
model="hy4-preview",
messages=[{"role": "user", "content": "Write a short poem about autumn"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")curl https://your-domain.com/api/ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hy4-preview",
"messages": [{"role": "user", "content": "Hello"}],
"stream": false
}'Replace your-domain.com with your site domain.
1,048,576 tokens, shared between input and output.
Per-token credit billing with cache-hit discounts. Live rates on the Models page.
No. One AI Gateway API key covers this model and every other model on the site.
Weights released under the vendor licence.