Tencent Hunyuan Hy4 Released: Pricing, 1M Context, Benchmarks, and How to Use It in Claude Code / Codex

Tencent Hunyuan released Hy4 on November 4. It adds vision and computer use for the first time, has a 1M context window and up to 64K output, and is priced at $0.834 input, $2.501 output and $0.042 cached input per million tokens, with a 50% launch discount on OpenRouter. This guide covers the official specs, pricing, the benchmark numbers you can check in Tencent's own table, how to call the Hy4 API on Tencent Cloud TokenHub and OpenRouter (model IDs hy4 / tencent/hy4), and tested steps for using Chinese models in Claude Code and Codex.

9 分钟阅读
Tencent Hunyuan Hy4 Released: Pricing, 1M Context, Benchmarks, and How to Use It in Claude Code / Codex

Short answer: Tencent Hunyuan released Hy4 on November 4, 2026. It is the first Hy model with image input (vision) and computer use, it has a 1M context window and up to 64K output, and the official API price per million tokens is $0.834 input, $2.501 output and $0.042 cached input, the same as Hy4 preview in August.

  • You can call it today on Tencent Cloud TokenHub (model ID hy4) and OpenRouter (model ID tencent/hy4, currently shown at 50% off: $0.417 input, $1.251 output). It is also available in CodeBuddy, WorkBuddy, Yuanbao and ima.
  • In Tencent's own benchmark table Hy4 scores 75.2 on APEX-Agents v1.1, slightly above Tencent's run of Claude Opus 5.5 (74.8). On Terminal-Bench 4.0 it scores only 44.4, well behind Opus 5.5 and Kimi K3.1 Pro (both around 66). Tencent itself writes that "a notable gap remains between it and top proprietary models".
  • The Hy4 weights are not out yet. Tencent says it "plans to open-source" them but gives no date; Hugging Face currently has only Hy4-preview. A faster, cheaper Hy4 flash is also due "in the near future".
  • aicodewith does not list Hy4 as of November 4. If you want a Chinese model in Claude Code, Codex or Cursor, aicodewith already has kimi-k3.1-pro, glm-5.3, deepseek-v4-pro and more. Tested steps are at the end.

Create an API key and use Chinese models in Claude Code, Codex and Cursor →

Figures checked on 2026-11-04 (Beijing time) against Tencent's Hy4 release page, the Tencent Cloud TokenHub Hy guide, the OpenRouter model page, and reports from IT Home, ifeng and FourWeekMBA. All benchmark scores come from Tencent's table and are labelled as Tencent's own testing.

Where Hy4 stands today

QuestionStatus (2026-11-04)Source
Released?Yes, replacing Hy4 preview from August 28Tencent release page
API access?Yes: Tencent Cloud TokenHub hy4, OpenRouter tencent/hy4Tencent Cloud docs, OpenRouter
Official price$0.834 input / $2.501 output / $0.042 cached input (per million tokens)Tencent release page
Context and output1M context (1,048,576), 960K max input, 64K max output (65,536)Tencent Cloud docs, OpenRouter
ModalitiesText + image in, text outOpenRouter, Tencent Cloud docs
ParametersNot published for Hy4; Hy4 preview was 770B total / 49B activeIT Home report on the preview
Open weightsPlanned, no date; only preview weights are publicTencent release page, Hugging Face
Hy4 flashPlanned for the near futureTencent release page
On aicodewith?Not yet (no hy4 in our /v1/models)Checked on November 4

What is new in Hy4

According to Tencent's release page and IT Home, compared with Hy4 preview:

  • Larger pre-training and post-training, with gains in instruction following, long-context understanding, long-horizon tasks and deep research.
  • Vision for the first time: combines perception, reasoning and tool use for fine-grained image work, complex charts and visual math.
  • Computer use for the first time across CLI and GUI, with targeted training on Blender, CAD and multi-app workflows.
  • Frontend and game development: adapted for Unreal Engine, Unity and Godot; Tencent reports +19.1% on GameDev and +9.8% on GameLogic over the preview.
  • Finance and office work: 213 finance professionals rated 579 real tasks; Hy4 scored 3.04, DeepSeek-V4.1-Flash-1017 2.97, Kimi K3.1 Pro and GLM-5.3 2.68 each. In internal tests the hallucination rate fell from 15.76% (preview) to 5.45%.
  • Safety: cybersecurity training data was limited to defensive material, with exploit development, reverse engineering and penetration testing filtered out. A system card will ship with the weights.

The launch also made X trending.

Hy4 pricing

USD per million tokens (MTok), checked on 2026-11-04.

ChannelInputOutputCached input
Tencent official (Tencent Cloud)$0.834$2.501$0.042
OpenRouter as shown (marked 50% off)$0.417$1.251$0.021

Notes:

  • Tencent says Hy4 "delivers major performance gains over Hy4 preview at the same API price".
  • OpenRouter does not say when the discount ends. Tencent Cloud is currently the only provider behind Hy4 on OpenRouter.
  • For comparison, FourWeekMBA calculates from OpenRouter list prices that Hy4's output price is about 1/8 of Claude Opus 5.5 ($20) and 1/4 of Kimi K3.1 Pro and GPT-6.1 Sol ($10), but about 2.1 times DeepSeek V4.1 Flash-1017's standard rate ($1.20). Kimi K3.1 Pro's official pricing is in our Kimi K3.1 Pro review.
  • Hy4 thinks by default and thinking tokens count as output, so lower reasoning_effort for simple tasks.

Hy4 benchmarks: the numbers you can check in Tencent's table

The rows below come from the benchmark appendix on Tencent's release page. Tencent ran every model at its highest reasoning setting; where a cell has two numbers, the first is the vendor's own figure and the second is Tencent's testing. Only coding, agent and multimodal rows are shown.

BenchmarkHy4Hy4 previewClaude Opus 5.5Kimi K3.1 ProGPT-6.1 SolDeepSeek-V4.1-Flash-1017GLM-5.3
APEX-Agents v1.1 (pass@1)75.253.973.5 / 74.867.2 / 68.260.0 / 61.772.1 / 72.964.3
DeepSWE v1.174.964.374.2 / 72.675.5 / 76.375.2 / 72.777.0 / 73.866.9 / 68.1
SWE-Marathon v1.143.831.946.3 / 44.451.7 / 53.842.5 / 39.446.342.5 / 35.6
Terminal-Bench 4.044.426.366.4 / 66.465.7 / 66.855.9 / 55.542.3 / 40.042.9
ProgramBench30.017.565.0 / 56.531.5 / 24.546.0 / 46.029.1 / 29.019.0 / 18.0
FrontierCode 2.031.0-46.425.540.628.521.6
AutomationBench v1.0.656.236.358.865.651.460.5 / 54.348.2 / 54.1
OSWorld 2.1 (Full, partial score)78.9-81.879.675.268.4-
MMMU-Pro78.6-88.284.1 / 83.484.976.7-
HLE-Full (with tools)59.157.367.7 / 66.270.0 / 61.860.657.162.5 / 57.4

How to read it:

  • Hy4's only clear lead is APEX-Agents (office-style agent tasks). On DeepSWE it is roughly level with the others.
  • The gaps are large on terminal coding (Terminal-Bench 4.0), writing programs from scratch (ProgramBench) and the research-oriented Terminal-Bench-Science (Hy4 19.8 vs Opus 5.5 58.7 / 56.2). Tencent ran Terminal-Bench 4.0 in the Claude Code harness with up to 500 turns and 13 hours per task.
  • FourWeekMBA counts 20 of the table's 34 rows as Tencent-internal benchmarks; on the other 14 public rows Hy4 beats Opus 5.5 on only 2.
  • Every score is either Tencent's testing or a vendor's own figure; there is no independent reproduction yet.

How to call the Hy4 API

Tencent Cloud TokenHub

Enable TokenHub in the console and create an API key. Per the Tencent Cloud docs, TokenHub supports OpenAI Chat Completions (/v1/chat/completions), OpenAI Responses (/v1/responses) and Anthropic Messages (/v1/messages). Pick a base URL by region: Guangzhou https://tokenhub.tencentmaas.com/v1 or Singapore https://tokenhub-intl.tencentmaas.com/v1. OpenAI paths use Authorization: Bearer; the Anthropic path uses x-api-key.

bash
# Tencent Cloud TokenHub (Guangzhou / mainland China)
curl https://tokenhub.tencentmaas.com/v1/chat/completions \
  -H "Authorization: Bearer $TOKENHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "hy4",
    "messages": [{"role": "user", "content": "Hello"}],
    "reasoning_effort": "high"
  }'

# Singapore (global): https://tokenhub-intl.tencentmaas.com/v1

Python (OpenAI SDK):

python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_TOKENHUB_API_KEY",
    base_url="https://tokenhub.tencentmaas.com/v1",
)
resp = client.chat.completions.create(
    model="hy4",
    messages=[{"role": "user", "content": "Hello"}],
    extra_body={"reasoning_effort": "high"},
)
msg = resp.choices[0].message
print(getattr(msg, "reasoning_content", None))  # thinking trace
print(msg.content)

Key points from the Hy guide:

  • hy4 thinks by default; reasoning_effort defaults to high, and the thinking text is in reasoning_content.
  • In multi-turn tool calling, send back the previous reasoning_content together with tool_calls, or quality drops.
  • Images can be sent as URL or Base64, up to 10 MB each and 600 per request.
  • If the model service is not enabled, the API returns 402.

OpenRouter

The model ID is tencent/hy4. The API is OpenAI-compatible and also accepts Responses and Anthropic Messages formats (per the OpenRouter model page):

bash
curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tencent/hy4",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

OpenRouter lists tools, tool_choice and JSON Schema structured output as supported, with up to 65,536 output tokens.

Using Chinese models in Claude Code / Codex / Cursor (our tests)

Hy4 is not on aicodewith yet. If what you want is a Chinese model inside Claude Code, Codex or Cursor, you can use the models we already serve, such as kimi-k3.1-pro, glm-5.3 and deepseek-v4-pro, with one key across all three clients. On November 4 we ran Claude Code with Kimi K3.1 Pro and Codex with GLM-5.3 using an aicodewith key.

Step 1: Create an API key

Sign up, then create an API key in the console. See the model list for available models.

Create API Key →

Step 2 (Claude Code): edit settings.json

Open ~/.claude/settings.json (Windows: %USERPROFILE%\.claude\settings.json). Do not add /v1 to ANTHROPIC_BASE_URL:

json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.aicodewith.ai",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_MODEL": "kimi-k3.1-pro",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "kimi-k3.1-pro",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "kimi-k3.1-pro",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "kimi-k3.1-pro",
    "CLAUDE_CODE_SUBAGENT_MODEL": "kimi-k3.1-pro"
  }
}

To use GLM instead, change every model name to glm-5.3. More detail: How to connect Claude Code to a third-party API and Kimi K3.1 Pro in Claude Code.

Step 3 (Claude Code): run a small task

bash
claude --version
# 2.1.316 (Claude Code)

claude -p "Create a file context_check.py with a function fits(prompt_tokens, max_output, window=1_048_576) that returns True when prompt_tokens + max_output <= window, add 3 asserts (one with 65_536 output), then run python3 context_check.py and report the exact output." \
  --allowedTools "Write,Bash,Read,Edit" --output-format json

Result (Claude Code 2.1.316, model kimi-k3.1-pro):

text
# wall time 53.4 s, num_turns 3, is_error false, modelUsage: kimi-k3.1-pro
# stderr: [claude-code:unrecognized_model] {"model":"kimi-k3.1-pro","query_source":"sdk"}

$ cat context_check.py
def fits(prompt_tokens, max_output, window=1_048_576):
    """Return True when prompt_tokens + max_output fits within the context window."""
    return prompt_tokens + max_output <= window


assert fits(900_000, 65_536) is True        # 965_536 <= 1_048_576, 65_536-token output
assert fits(1_000_000, 48_576) is True      # 1_048_576 <= 1_048_576, exactly at the boundary
assert fits(983_041, 65_536) is False       # 1_048_577 > 1_048_576, one token over

$ python3 context_check.py
$ echo $?
0
  • 53.4 seconds, 3 turns. The file was correct, all asserts passed, the script printed nothing and exited 0.
  • The unrecognized_model line on stderr only means Claude Code does not know this model name; the call works.

Step 4 (Codex): edit the global config.toml

Codex reads the key from experimental_bearer_token in the global ~/.codex/config.toml. The base_url is https://api.aicodewith.ai/chatgpt/v1 (note /chatgpt/v1):

toml
# ~/.codex/config.toml
model = "glm-5.3"
model_provider = "aicodewith"

[model_providers.aicodewith]
name = "aicodewith"
base_url = "https://api.aicodewith.ai/chatgpt/v1"
wire_api = "responses"
experimental_bearer_token = "YOUR_API_KEY"

Field-by-field notes: Codex config.toml guide.

Step 5 (Codex): run the same task

bash
codex --version
# codex-cli 0.166.0

codex -s workspace-write -a never exec --skip-git-repo-check "Create a file context_check.py with a function fits(prompt_tokens, max_output, window=1_048_576) that returns True when prompt_tokens + max_output <= window, add 3 asserts (one with 65_536 output) and a final print('ok'), then run python3 context_check.py and report the exact output."

Result (codex-cli 0.166.0, model glm-5.3):

text
# wall time 31.6 s, exit 0
model: glm-5.3
provider: aicodewith
approval: never
sandbox: workspace-write [workdir, /tmp, $TMPDIR]
warning: Model metadata for `glm-5.3` not found. Defaulting to fallback metadata; this can degrade performance and cause issues.

exec /bin/bash -lc "apply_patch <<'PATCH' ..."
 exited 2 in 0ms:
patch: **** Only garbage was found in the patch input.

exec /bin/bash -lc "cat > context_check.py <<'EOF' ... EOF
python3 context_check.py"
 succeeded in 0ms:
ok
  • 31.6 seconds, exit code 0, final output ok.
  • Codex warns that it has no model metadata for glm-5.3 and falls back to defaults. GLM first tried to call apply_patch from the shell, which failed, then switched to a heredoc and finished. Non-OpenAI models in Codex sometimes take a detour like this.

Cursor

In Cursor, add an OpenAI-compatible custom model under Models, enter your aicodewith key and use our model ID (for example kimi-k3.1-pro). Another example of a Chinese model in Claude Code / Codex: DeepSeek V4.1 Flash in Claude Code / Codex.

Who should try Hy4

Worth trying:

  • Office and finance research agents (APEX-Agents and the finance expert study are its strongest results)
  • Tasks that need image or chart understanding plus a 1M context window
  • Budget-conscious teams willing to run their own task evaluations (output price is far below Opus 5.5)

Hold off for now:

  • Heavy terminal coding and long-horizon development: Tencent's own table has it far behind Opus 5.5 and Kimi K3.1 Pro on Terminal-Bench 4.0 and ProgramBench
  • Self-hosting: the Hy4 weights are not out
  • If you need third-party leaderboards: so far there are only Tencent's numbers

FAQ

When was Tencent Hunyuan Hy4 released?

Hy4 was released on November 4, 2026. Hy4 preview came out on August 28.

How much does Hy4 cost?

Tencent's official price per million tokens is $0.834 input, $2.501 output and $0.042 cached input, the same as the preview. OpenRouter currently shows 50% off ($0.417 / $1.251) with no end date.

What is the Hy4 API model ID?

hy4 on Tencent Cloud TokenHub and tencent/hy4 on OpenRouter.

How long is Hy4's context window?

1M (1,048,576 tokens). Tencent Cloud lists 960K max input and 64K max output.

Is Hy4 open source?

Not yet. Tencent plans to open the weights and is working with vLLM and SGLang, but has not given a date. Hy4-preview weights are on Hugging Face.

Can I use Hy4 in Claude Code?

Both Tencent Cloud TokenHub and OpenRouter offer Anthropic Messages-compatible endpoints, so you can configure it following their docs. aicodewith does not serve Hy4 yet; for a Chinese model in Claude Code today, use our kimi-k3.1-pro or glm-5.3 as shown above.

How does Hy4 compare with Kimi K3.1 Pro?

In Tencent's table Hy4 is ahead on APEX-Agents, while Kimi K3.1 Pro is ahead on Terminal-Bench 4.0, SWE-Marathon, OSWorld and MMMU-Pro. Hy4's output price is about 1/4 of K3.1 Pro's.

Related reading

Sources

Checked on 2026-11-04 (Beijing time)

Create API Key → View models →

相关文章

What is Gemini 4 Hydrogen and how do you connect it? Official price $1.50/$7.50, in Claude Code / Codex

What is Gemini 4 Hydrogen and how do you connect it? Official price $1.50/$7.50, in Claude Code / Codex

Gemini 4 Hydrogen is Google's efficiency model for everyday coding and agentic workflows, officially released on 12 November 2026 (US time). The model ID is gemini-4-hydrogen. Official Gemini Developer API standard pricing is $1.50 per million input tokens and $7.50 per million output tokens (including thinking tokens), with implicit caching at $0.075; the free tier lists those three as free of charge. This article covers official specs and pricing, how to connect it in AI Studio and the Gemini API, and how to write the client config in Claude Code, Codex, and Cursor.

Claude Fable 5.2 vs Opus 5.5: Which to Use? Switching Models in Claude Code and Running Fable as the Main Agent with Opus Subagents (Tested)

Claude Fable 5.2 vs Opus 5.5: Which to Use? Switching Models in Claude Code and Running Fable as the Main Agent with Opus Subagents (Tested)

Claude Fable 5.2 or Opus 5.5? Start with an official spec and pricing comparison table, then learn how to switch between the two in Claude Code with /model, --model and settings.json, how to use a subagent's model field so the main agent runs Fable while subagents run Opus, and how to choose in Codex and Cursor. Includes timings and results from the same task run on both models with an AICodeWith key, plus fixes for common errors.