Tencent Hunyuan Commands & Prompt Reference

42 commands & parameters · 6 categories · Sources: Tencent Cloud API, Hunyuan 2023-09-01 request models (TencentCloud SDK for Python 3.1.187, Hunyuan docs release of 2026-09-23) and 7 more · Checked

Request parameters of Tencent Hunyuan's ChatCompletions action (API version 2023-09-01), checked against TencentCloud SDK for Python 3.1.187 and the Hunyuan docs release of 2026-09-23, plus the reasoning switches of the open-weight Hy3, Hy4 preview and Hunyuan-A13B models. That release moved ChatCompletions to pre-offline status; Tencent's OpenAI-compatible interface and the image, translation and file actions are left out. Field names are PascalCase, and search stays off unless EnableEnhancement or ForceSearchEnhancement is set.

All Commands

Core request parameters (8)

Command / SyntaxWhat it doesNotes
ModelModel name to callRequired; the reference uses hunyuan-turbos-latest as its example, and each model is billed at its own rate.
MessagesConversation contextRequired; up to 40 entries, oldest first; system may only lead, user and assistant alternate, and overlong context loses its oldest text.
StreamStreaming response switchOff when omitted; set true for SSE chunks in Delta that must be concatenated, which Tencent advises for lower latency.
StreamModerationStreaming moderation switchApplies only while Stream is true; on by default, it checks output in segments and may end a stream with FinishReason sensitive.
TemperatureSampling temperatureAccepts 0.0 to 2.0; every model ships a recommended default, and Tencent advises leaving it unset.
TopPNucleus sampling probability thresholdAccepts 0.0 to 1.0, with larger values giving more varied wording; the model default is used when omitted.
SeedRandom seed for reproducible outputA non-zero integer up to 10000 makes output repeatable; Tencent warns that a poor value can hurt quality.
StopCustom stop strings that end generationUnlike OpenAI, Hunyuan halts after the matched string rather than before it; Tencent says this may later change to match OpenAI.

Message fields (7)

Command / SyntaxWhat it doesNotes
RoleMessage roleTakes system, user, assistant or tool.
ContentMessage textPlain-text body of a turn; Contents is the field for turns that mix text with images or video.
ContentsMultimodal content partsImages need a Hunyuan image-to-text model and video a video-to-text model; see the product overview for which.
ToolCallIdTool call referenceSet on tool-role messages to name the function call that the result answers.
ToolCallsTool calls from the modelGenerated only by hunyuan-pro and hunyuan-functioncall.
FileIDsAttached file IDsOne request carries at most 50 file identifiers.
ReasoningContentChain-of-thought textReturned by Hunyuan-T1 models only; leave it out of later messages, because sending it back makes the call fail.

Tools and reasoning parameters (4)

Command / SyntaxWhat it doesNotes
ToolsCallable tool listHonoured only by the hunyuan-turbos, hunyuan-t1 and hunyuan-functioncall models.
ToolChoiceTool usage modenone, auto (the default) or custom, which forces one tool; read only by hunyuan-turbo and hunyuan-functioncall.
CustomToolForced toolRequired once ToolChoice is custom; it defines the single tool the model has to call.
EnableThinkingChain-of-thought reasoning switchOn when omitted; false turns reasoning off, and for now only hunyuan-a13b reads it.

Search and enhancement switches (11)

Command / SyntaxWhat it doesNotes
EnableEnhancementCapability enhancement switch, such as searchOff by default since 2025-04-20 and ignored by hunyuan-lite; leaving it off lowers latency, mostly for the first streamed token.
ForceSearchEnhancementForce search enhancement onOff by default; routes each request through AI search, and the model gives a fallback reply when search returns nothing.
EnableSpeedSearchTurn on the fast search variantOff by default; when a search is triggered, the quicker variant streams its first token sooner.
SearchInfoReturn search resultsOff by default; with it on, a response that used search includes a SearchInfo object.
CitationSearch citation superscript switchWorks together with EnableEnhancement and SearchInfo; searched passages get superscript marks that point into the SearchInfo list.
EnableMultimediaMultimedia output switchAllowlisted accounts only; needs EnableEnhancement on and EnableSpeedSearch off, and hunyuan-lite ignores it.
EnableRecommendedQuestionsRecommended follow-up questions switchOff by default; the last chunk of the response then adds up to three RecommendedQuestions.
EnableDeepSearchDeep research switchOff by default; when a question triggers deep research, the response returns what it found.
EnableDeepReadDeep document readingTurns EnableEnhancement on by itself and handles one document in a single turn, uploaded with FilesUploads.
WebSearchOptionsKnowledge injection optionsObject for injected knowledge, the user location, a search-status switch, and mixed image-text or music output.
TopicChoiceTopic passed in by the caller

Common API parameters (5)

Command / SyntaxWhat it doesNotes
ActionCommon parameter; the API action nameNames the operation, ChatCompletions for chat; the same call can be tried in Tencent API Explorer.
ChatCompletionsChat action, pre-offlineRelease 53 of 2026-09-23 moved it to pre-offline status, along with the translation, thread, file and embedding actions.
VersionCommon parameter; the API versionFixed at 2023-09-01 for every action of the Hunyuan client.
RegionCommon parameter; the regionOptional; the SDK adds the X-TC-Region header only when a region is configured.
hunyuan.tencentcloudapi.comAPI endpoint hostDefault host that the Hunyuan client of the Tencent Cloud SDK sends requests to.

Open-weight model reasoning (7)

Command / SyntaxWhat it doesNotes
reasoning_effortHy3 reasoning depthHy3 defaults to no_think, a direct answer; low and high raise the effort, high giving deep chain-of-thought for maths and code.
chat_template_kwargsChat template optionsSent inside extra_body; Hy4 preview reasons at high effort unless this object sets reasoning_effort to no_think.
enable_thinking=FalseFast thinking modePassed to apply_chat_template for Hunyuan-A13B, whose default is the slow-thinking mode with full reasoning.
/no_thinkSkip reasoning prefixPlaced ahead of a Hunyuan-A13B prompt, it gets a direct answer for that turn without chain-of-thought.
/thinkForce reasoning prefixPlaced ahead of a Hunyuan-A13B prompt, it makes the model reason before answering that turn.
<think>Reasoning block tagHunyuan-A13B output opens its reasoning with this tag and closes it with the matching end tag.
<answer>Final answer tagThe reply proper sits inside this pair, so the card example reads it separately from the reasoning.

Frequently Asked Questions

Why do Hunyuan parameters look different from OpenAI's?

The hosted endpoint follows Tencent Cloud API conventions: PascalCase names, plus the common Action and Version parameters (ChatCompletions and 2023-09-01 here), which the SDK sends as X-TC-Action and X-TC-Version headers. The open-weight Hy models served with vLLM or SGLang take OpenAI-style lowercase fields instead.

How long can the conversation context be?

Messages holds at most 40 entries, ordered oldest to newest. If the combined Content exceeds the model's input limit, the earliest text is cut and the tail is kept.

Which models support tool calling and thinking?

Tools works on hunyuan-turbos, hunyuan-t1 and hunyuan-functioncall, while ToolChoice is read by hunyuan-turbo and hunyuan-functioncall. EnableThinking currently applies only to hunyuan-a13b, and ReasoningContent comes back from the Hunyuan-T1 series.

Is the ChatCompletions action still supported?

Hunyuan release 53 of 2026-09-23 moved ChatCompletions, together with the translation, glossary, thread, file and embedding actions, to pre-offline status, and the action's description now points to Tencent's OpenAI-compatible interface. The parameters on this page describe the action as last documented.

How do I switch reasoning off on the open Hy models?

Hy3 already answers directly, because reasoning_effort defaults to no_think there. Hy4 preview reasons at high effort by default, so pass no_think inside chat_template_kwargs in extra_body. Hunyuan-A13B takes enable_thinking=False in apply_chat_template or a /no_think prefix on the prompt.

How the switches combine

The search family hangs off EnableEnhancement. Citation marks are meant to be used with it and SearchInfo; EnableMultimedia only works with enhancement on and EnableSpeedSearch off; EnableDeepRead turns enhancement on by itself. ForceSearchEnhancement goes further and sends each request through AI search. Outside search, StreamModeration matters only when Stream is true, and a ToolChoice of custom needs CustomTool to define the tool.

Hosted API versus open weights

The hosted action takes PascalCase fields and a fixed Version. The SDK note added with release 53 sets 30 September 2026 as the shutdown date of the old Hunyuan console and sends callers to the OpenAI-compatible interface. The open-weight models, served with vLLM or SGLang, use the OpenAI request shape instead: Hy3 and Hy4 preview read reasoning_effort from chat_template_kwargs (no_think is the Hy3 default, high the Hy4 preview default), and both model cards recommend temperature 0.9 with top_p 1.0. Hunyuan-A13B takes enable_thinking=False or a /no_think prefix.

Sources and checks

Every row on this page was matched to a line in the documentation above on . A command or parameter that could not be found there is not listed.

AI tools change their commands, parameters and model names between releases: the vendor's current documentation and the version you run have the last word. Found a wrong or missing entry? Tell us and it gets checked against the source. How we verify describes the process and its limits.

Related prompt references

DeepSeek (46) · GLM (Z.ai) (58) · Qwen (Alibaba Model Studio) (53) · All AI prompt references