跳到内容

Hy ​

更新时间

Endpoint: https://mmu.vod-qcloud.com/v1认证: VOD ApiToken / Bearer

Hy(腾讯混元) 是文本生成 / 对话模型,通过兼容 OpenAI 的接口调用,支持 JSON 与 SSE 流式响应。支持 Chat Completions、Responses 与 Messages 协议,提供 hy3、hy4-preview 等版本。

基本信息 ​

项目取值
调用地址https://mmu.vod-qcloud.com
认证VOD 应用签发的 ApiToken / Bearer
输出文本 / 结构化响应
响应方式JSON / SSE

支持的协议 ​

规格路径对象
Chat CompletionsPOST /v1/chat/completions下方所有模型
ResponsesPOST /v1/responses下方所有模型
MessagesPOST /v1/messages下方所有模型

下方模型 ID 使用对应规格。认证与公共字段遵循 API Reference。

采样选项 ​

对本文档中列出的所有模型通用。

参数设置
temperature可设置
top_p可设置

temperature 指定采样温度,top_p 指定累积概率范围。以一种方式为主进行调整。

各版本推理设置 ​

模型 ID设置方式停用
hy4-previewthinking_enabled无法停用
hy3thinking_enabled无法停用

以 Chat Completions 为基准。推理内容从 reasoning_content 读取,最终答案从 content 读取。对无法停用的版本不传递停用选项。

请求参数 ​

参数必填类型说明
model必填String各版本选项表中的模型 ID
messages必填ArrayChat Completions / Messages 的对话输入
input必填String / ArrayResponses 的输入。替代 messages 使用
max_tokens可选IntegerChat Completions / Messages 的生成上限。在 Messages 中为必填
max_output_tokens可选IntegerResponses 的生成上限
stream可选Booleantrue:SSE / false:JSON

请求示例 ​

Chat Completions ​

json
{
  "model": "hy4-preview",
  "messages": [
    {
      "role": "user",
      "content": "Reply with exactly OK and nothing else."
    }
  ],
  "max_tokens": 512,
  "stream": false
}

响应 ​

json
{
  "id": "01a0de31-7e55-7dee-b6b5-2f5fb1918137",
  "object": "chat.completion",
  "model": "hy4-preview",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "OK",
        "reasoning_content": "We need respond with exactly \"OK\" and nothing else. The user explicitly asks: \"Reply with exactly OK and nothing else.\" So final answer must be just OK, no extra characters, no punctuation? Exactly OK means two letters O and K. Ensure no newline? Usually can include newline? It says exactly OK and nothing else. Best final content: OK. Could be no trailing spaces. In chat, message body might have newline? To be safe, output just OK. No quotes. No markdown. Final: OK."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 29,
    "prompt_tokens_details": {
      "audio_tokens": 0,
      "cached_tokens": 0
    },
    "prompt_cached_tokens_details": {
      "audio_tokens": 0
    },
    "completion_tokens": 109,
    "completion_tokens_details": {
      "accepted_prediction_tokens": 0,
      "audio_tokens": 0,
      "reasoning_tokens": 106,
      "rejected_prediction_tokens": 0
    },
    "total_tokens": 138
  }
}

Responses ​

json
{
  "model": "hy4-preview",
  "input": "Reply with exactly OK and nothing else.",
  "max_output_tokens": 512,
  "stream": false
}

响应 ​

json
{
  "id": "resp_a1c2722b42b84978bc7754f88a7d45a5",
  "object": "response",
  "model": "hy4-preview",
  "status": "completed",
  "output": [
    {
      "type": "reasoning",
      "id": "rs_20260926225757nn1pd1f3",
      "status": "completed",
      "summary": [
        {
          "type": "summary_text",
          "text": "We need respond exactly \"OK\" and nothing else. The user says: \"Reply with exactly OK and nothing else.\" So output only OK. No extra spaces? They said exactly OK and nothing else. Should we include newline? Usually just \"OK\". Could be trailing newline maybe okay? To be safe, output \"OK\" without newline? In chat, assistant message content likely \"OK\". We can just output OK. No reasoning."
        }
      ]
    },
    {
      "type": "message",
      "id": "msg_20260926225757l9n1p3r5",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "OK"
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 29,
    "output_tokens": 91,
    "total_tokens": 120,
    "output_tokens_details": {
      "reasoning_tokens": 88
    }
  }
}

Messages ​

json
{
  "model": "hy4-preview",
  "messages": [
    {
      "role": "user",
      "content": "Reply with exactly OK and nothing else."
    }
  ],
  "max_tokens": 512,
  "stream": false
}

响应 ​

json
{
  "id": "01a0de34-91da-79f1-8dad-cdbedf2cd19f",
  "model": "hy4-preview",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "text": "OK",
      "type": "text"
    }
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 29,
    "output_tokens": 111
  }
}

特殊设置 ​

文本对话与代码输入传入 messages。hy3 与 hy4-preview 是不同的模型 ID。若响应中包含 reasoning_content,请与最终的 content 分开处理。

基于 VitePress 构建 · 部署于腾讯云 EdgeOne Pages