Hy4 flash on Vercel AI Gateway

Hunyuan · Tencent AI Lab

Serverless

Last refreshed 2026-11-16. Next refresh: weekly.

Why use Hy4 flash on Vercel AI Gateway?

Vercel AI Gateway offers Hy4 flash. Vercel AI Gateway is a unified AI proxy providing a single OpenAI-compatible API endpoint to 275+ models from 25+ providers including Anthropic, OpenAI, Google, Meta, Mistral, DeepSeek, xAI, Alibaba, Amazon, ByteDance, Cohere, MiniMax, MoonshotAI, KwaiPilot, Black Forest Labs, Recraft, Voyage AI, NVIDIA, and more.

Compare Hy4 flash across 4 providers to find the best fit for your use case
Input / 1M
-
Output / 1M
-
Cache
Not sourced
Batch
Not sourced

Setup recipe

Python + curl
Install
pip install openai
Auth
export AI_GATEWAY_API_KEY=...
Call
import os
from openai import OpenAI
client = OpenAI(
    api_key=os.environ["AI_GATEWAY_API_KEY"],
Model ID
tencent/hy4-flash

Request example

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AI_GATEWAY_API_KEY"],
    base_url="https://ai-gateway.vercel.sh/v1"
)
response = client.chat.completions.create(
    model="tencent/hy4-flash",
    messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)

Gotchas

  • Use provider model ID "tencent/hy4-flash", not the LLMReference slug "hy4-flash".
  • creator/model-name e.g. kwaipilot/kat-coder-pro-v2
  • The examples expect AI_GATEWAY_API_KEY; rename it only if your application config maps the new variable.

Compare Hy4 flash Across Providers

ProviderInput (per 1M)Output (per 1M)
Tencent Cloud TI Platform$0.07$0.28
OpenRouter——
Vercel AI Gateway——
Novita AI$0.07$0.28

Capabilities

VisionMultimodalReasoningJSON / Tool useStructured OutputsPrompt Caching

About Hy4 flash

Hy4 flash is Tencent Hy's lowest-cost model in the Hy4 family, released November 16, 2026. Tencent says it has 224B total parameters, including 64B Engram parameters, with 12B active per token, and combines hybrid attention, LatentMoE and Engram to shrink the KV cache to 1/6 of Hy4's. Like Hy4 it is natively multimodal, taking text and image input with a 1M-token context window, and supports reasoning, function calling, structured outputs and prompt caching. Tencent positions it for high-volume everyday work such as coding assistance, agentic workflows and document and chart understanding. API-only; weights are not released.

Get Started

Model Specs

Released2026-11-16
Parameters224B (12B active)
Context1M

Related Models on Vercel AI Gateway