We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
tencent/hy4Runs on your balance at the prices above. New accounts start with free usage.
Settings
Tencent: Hy4 is a text generation model from Tencent, released as the official version following Hy4 Preview. It is built for general text work and, according to Tencent, delivers comprehensive improvements over the preview release, with particularly strong gains in agentic capabilities and performance across long-horizon, real-world productivity tasks. If you are choosing a model for workloads that involve sustained multi-step work rather than single-shot prompts, Hy4 is positioned for exactly that kind of use.
The model accepts text and images as input and returns text. Its context window is 1,048,576 tokens, which is large enough to hold entire codebases, long document sets or extended conversation histories in a single request, and it can produce up to 65,536 tokens in one response. Reasoning behaviour is exposed through request parameters, so you can decide how much internal deliberation the model applies before answering. It also supports structured outputs and tool calling, which means responses can be constrained to a schema and the model can invoke functions you define.
Those capabilities point to a few practical patterns. Long-context analysis is the obvious one: feeding contracts, research papers, logs or repositories and asking questions across the whole set without chunking. Because image input is supported, you can mix screenshots, diagrams or scanned pages with text instructions in the same request, which suits document understanding and visual question answering over mixed material. Tool calling and structured outputs make it a reasonable fit for agents and pipelines where the model needs to call APIs, query data sources or return machine-readable results that downstream code can parse. The reasoning controls help on tasks where accuracy matters more than latency, such as multi-step planning or debugging.
You call Hy4 through api14's OpenAI-compatible API using the model id "tencent/hy4". Because the interface follows the OpenAI format, existing SDKs and client libraries work with a base URL change. The request parameters supported are include_reasoning, max_completion_tokens, max_tokens, reasoning, reasoning_effort, response_format, stop, structured_outputs, temperature, tool_choice and tools. In practice that covers sampling control, output length, stop sequences, JSON or schema-constrained responses, and function calling, along with the reasoning-related options.
One thing to keep in mind is that output is text only, so tasks that require generating images or audio are outside its scope. The maximum output of 65,536 tokens also means very long generations need to be planned in stages. For straightforward, short text tasks where none of the long-context, vision or tool-calling features are needed, a smaller and faster model may be the more economical choice.
This community has no topics yet. Open the first one about Tencent: Hy4.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.chat.completions.create({
"model": "tencent/hy4",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
});
console.log(result.choices[0].message.content);
include_reasoningmax_completion_tokensmax_tokensreasoningreasoning_effortresponse_formatstopstructured_outputstemperaturetool_choicetools