Skip to main content

tencent/hy4/chat

Tencent Hy4 chat endpoint runs the Hunyuan flagship reasoning model on text and images, with function calling, JSON output, up to 960K tokens of input and replies of up to 64K tokens.

Input $0.5838Output $1.7502per 1 million tokens

Workbench

Tencent Hy4

What can Tencent Hy4 help with?

Related models and next tasks

Missing the model you need?

LONG-HORIZON REASONING CHAT API

Tencent's flagship Hunyuan model for instructions that run long and tasks that take many steps.

Token budget

Input window
960,000
tokens in one request
Longest reply
64,000
7% of the window

reasoning_effort

  • none
  • low
  • medium
  • high
  • xhigh
messages
up to 256
tools
up to 128

Key numbers

Context window
1M
Shared across the conversation and the reply
Maximum input
960K
Tokens accepted in one Hy4 request
Maximum output
64K
Reply ceiling with thinking included

Before you spend

Chat
  • This endpoint takes text and image URLs, and PNG is the image format we have tested. Audio, video and document inputs are not offered here.
  • Input is limited to 960K tokens and each reply to 64K tokens, with thinking counted inside the reply limit.
  • Tencent's own content rules apply to Hy4, so some requests may be declined.

What it does

Source context

Keep the evidence beside the request

Hy4 accepts up to 960,000 input tokens across 1 to 256 messages. Put a specification and its supporting notes in the conversation, label the sections, and ask each finding to cite the passage that supports it. Review those citations alongside the proposed conclusions.

Reasoning controls

Allocate thinking within the reply

Choose none, low, medium, high, or xhigh for reasoning effort. Separately set a reply allowance from 1 to 64,000 tokens, with 4,096 as the default. Reasoning uses that allowance too, so a request for detailed analysis and a lengthy deliverable needs room for both.

Function workflow

Separate a proposed call from execution

Declare up to 128 tools and decide whether a call is optional with auto or required by the task with required. Give each definition a clear purpose and check the proposed arguments in your application. A tool definition describes an available action; your code still needs to carry it out.

Structured text

Define the record your code expects

The response_format object lets you request a JSON object or a JSON schema. Use it for a catalog record, a requirements list, or an issue report with named fields. Define missing-value handling in the instruction and validate the returned data before saving it.

What a call to Tencent Hy4 looks like

Request bodies from this family's own examples: roles, parameters and attachments exactly as they are sent. Each one is checked against the model's input schema before it is published.

  • basic

    A long-brief review that states exactly what the finished answer should contain.

    user

    Read the specification below and list any requirements that conflict with each other. Quote the two clauses for each conflict and suggest one way to resolve it.

    max_tokens8192
  • tool-step

    Hy4 answers with a function call, and your application decides whether to run it.

    user

    When is high tide at Whitby harbour? Use the tool.

    max_tokens2048tool_choiceautotoolsget_tide

Where it fits

  • Requirements review for engineering

    Provide a labeled specification in messages and ask for conflicting requirements with supporting passages. The 960,000-token input allowance gives room for a substantial source set, while the review criteria make each proposed finding checkable.

  • Software change planning

    Describe the current system, intended behavior, and checks needed for completion. Choose reasoning effort and a reply budget for an ordered implementation plan, then have an engineer verify its assumptions.

  • Catalog data preparation

    Ask for product attributes from supplied descriptions using response_format. Define the record shape and how missing values should be represented, then validate each returned record against the source.

  • Inventory lookup in a business app

    Declare an inventory lookup function in tools and describe when it should be used. Set tool_choice to required when the workflow needs a lookup, and inspect the proposed item identifiers before your application runs it.

  • Follow-up analysis across a project

    Keep relevant decisions and revised requirements in chronological messages. Request a change log grounded in those messages, while respecting the message-count and input-token limits as the conversation grows.

Model reference

Tencent Hy4 API reference

Tencent Hy4 API specifications

Publisher
Tencent
Released
4 November 2026
Maximum input
960,000 tokens
Conversation
1 to 256 messages, in chronological order
Reply allowance
1 to 64,000 tokens; default 4,096; reasoning included
Reasoning effort
none, low, medium, high, xhigh
Tool controls
Up to 128 tool definitions; choice auto or required
Reply format
response_format object, such as a JSON object or JSON schema
Sampling
temperature 0 to 2; top_p 0.01 to 1
Seed range
0 to 2,147,483,647; identical results are not guaranteed
Stop sequences
Nonempty string or array of 1 to 4 sequences; matched text omitted

How to call the Tencent Hy4 API

  1. Arrange the source conversation

    Place the instructions, source passages, and follow-up request in chronological messages. Stay within 256 messages and 960,000 input tokens, and give source sections stable labels for checking citations.

  2. Plan the reply allowance

    Set max_tokens for the reasoning and the visible answer together, within the 64,000-token ceiling. Select a reasoning effort that suits the task, then judge the returned work against a clear completion requirement.

  3. Choose data or a tool action

    Use response_format when your application needs a JSON object or a JSON schema. For a function workflow, supply tools and choose auto or required according to whether a tool call is optional for the task.

  4. Check before using the result

    Compare quoted evidence with the supplied material, validate structured data, and inspect proposed tool arguments. Save the messages and settings so a later revision can change one variable at a time.

The short version

Bring source documents, project decisions, and a concrete question into a Hy4 conversation. Choose a reply budget that covers reasoning as well as the deliverable, then specify whether you need an explanation, structured records, or a proposed function call. Give source passages stable labels so reviewers can trace conclusions back to their context. Before using an answer in your application, check its quotations, validate its records, and review any tool arguments. For model selection, compare Kimi K3.1 Pro and GLM 5.3 on the same task and completion criteria.

Tencent Hy4 API questions