Hy4 Flash from Tencent is now available on AI Gateway with an introductory 50% discount on input, cached input, and output tokens through November 29, 2026.
Hy4 Flash is the new lower-cost model in the Hy4 family. It keeps the full Hy4 feature set at roughly a tenth of the price per token: reasoning with preserved thinking across turns, tool calling, structured outputs, prompt caching, and image input, with the same 1M-token context window. Reasoning can be turned off for requests that don't need it, which suits high-volume coding, agent, and document workloads.
Use tencent/hy4-flash as the model name:
import { streamText } from 'ai';
const result = streamText({ model: 'tencent/hy4-flash', prompt: 'Summarize the tradeoffs of server-side rendering in three sentences.',});
for await (const text of result.textStream) { process.stdout.write(text);}
To use it in Claude Code, Codex, Cursor, and more, install the latest Vercel CLI and run setup:
npx vercel ai-gateway setup
Then select tencent/hy4-flash in the agent. See the coding agents guide for details.
Try Hy4 Flash in the model playground.
AI Gateway provides a unified API for calling models, tracking usage and cost, and configuring retries, failover, and performance optimizations for higher-than-provider uptime. It includes built-in custom reporting, Zero Data Retention support, budgets for API keys, routing rules, and more.
AI Gateway reflects provider pricing with no markup and does not charge a platform fee on inference, including on Bring Your Own Key (BYOK) requests.
You can view all language models available on AI Gateway.
Reference Architecture
Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.
- Agent stack: Build and operate agents with models, tools, and durable workflows.
- Web applications: Choose rendering, data, authentication, and caching approaches.
- Backends: Choose a runtime, connect services, and run background work.
Browse all stacks
Build with prompts
Build an app, extend an agent, or improve your project with ready-to-use prompts for your coding agent.
Browse the prompt library · Read the Markdown index