---
title: Tencent: Hy4 API | Text Generation | ModelsLab
description: Build with Tencent: Hy4 API by Tencent. Text generation, chat, code, and reasoning. Plans from $21/month.
url: https://modelslab.com/models/tencent/tencent-hy4.md
canonical: https://modelslab.com/models/tencent/tencent-hy4
type: product
component: Playground/LLM/Index
generated_at: 2026-11-10T13:04:16.680924Z
---

Tencent: Hy4
---

 [LLMs.txt](https://modelslab.com/models/tencent/tencent-hy4/llms.txt) [.md](https://modelslab.com/models/tencent/tencent-hy4.md)

Tencent: Hy4
---

Choose a prompt below to get started or type your own message

 Explain quantum computing in simple terms

 Write a Python function to sort a list

 Create a marketing email for a SaaS product

 Compare REST vs GraphQL APIs

images and text files

Send

### Tencent: Hy4

tencent tencent-hy4

Copy model ID

PricingInput $0.417 / 1M tokens

Output $1.2505 / 1M tokens

API EndpointsOpenAI Compatible

`https://modelslab.com/api/v7/llm/chat/completions`Endpoint

Anthropic Compatible

`https://modelslab.com/api/v7/llm/v1/messages`Messages

`https://modelslab.com/api/v7/llm/v1/messages/count_tokens`Count Tokens

`https://modelslab.com/api/v7/llm/v1/models`Models

Use with Claude Code

cURL Example

ParametersSystem MessageYou are a helpful AI assistant specialized in providing accurate and detailed responses.

Temperature0.7

Max Tokens4000

Top P0.9

Frequency Penalty0

Presence Penalty0

Thinkinglow

lowmediumhigh

Deeper thinking spends more of the Max Tokens budget before the answer starts.

Model Info

Support

Looking for something different?
---

Models that trade off differently against the one you are viewing

### Better quality

Newer flagship models that generally produce stronger results.

[OpenAI](https://modelslab.com/models/openai)

 [GPT 5.2](https://modelslab.com/models/openai/gpt-5.2)

[OpenAI](https://modelslab.com/models/openai)

 [GPT 5.1](https://modelslab.com/models/openai/gpt5.1)

[OpenAI](https://modelslab.com/models/openai)

 [GPT-5.1-Codex-Max](https://modelslab.com/models/openai/gpt-5.1-codex-max)

### Lower cost per run

Open-source models we host, unlimited on the $149/month plan.

[ModelsLab](https://modelslab.com/models/modelslab) Popular

 [Modelslab: Custom LLM](https://modelslab.com/models/modelslab/uncensored-chat)Open Source Model

[Qwen](https://modelslab.com/models/open_router)

 [Qwen: Qwen3 235B A22B Instruct 2507](https://modelslab.com/models/qwen/qwen-qwen3-235b-a22b-2507)Closed Source Model

[OpenAI](https://modelslab.com/models/openai)

 [gpt-oss-20b](https://modelslab.com/models/openai/gpt-oss-20b)Closed Source Model

[DeepSeek](https://modelslab.com/models/open_router)

 [DeepSeek: DeepSeek V4 Flash 0423](https://modelslab.com/models/deepseek/deepseek-deepseek-v4-flash)Closed Source Model

[Google](https://modelslab.com/models/open_router)

 [Gemma 4 31B-it FP8](https://modelslab.com/models/google/google-gemma-4-31B-it)Closed Source Model

[Google](https://modelslab.com/models/open_router)

 [Google: Gemma 4 31B](https://modelslab.com/models/google/google-gemma-4-31b-it)Closed Source Model

Related Models
---

Discover similar models you might be interested in

 [View all LLM Models](https://modelslab.com/models?feature=llmaster)

[#### Alibaba Cloud/Qwen: Qwen3.5 397B A17B

qwen-qwen3.5-397b-a17b

From $2.10/M tokens](https://modelslab.com/models/alibaba_cloud/qwen-qwen3.5-397b-a17b)

[#### Qwen/Qwen: Qwen3.5-Flash

qwen-qwen3.5-flash-02-23

From $0.16/M tokens](https://modelslab.com/models/qwen/qwen-qwen3.5-flash-02-23)

[#### xAI/SpaceXAI: Grok 4.7 (batch)

x-ai-grok-4.7-batch

From $3.20/M tokens](https://modelslab.com/models/x-ai/x-ai-grok-4.7-batch)

[#### DeepSeek/DeepSeek: DeepSeek Flash Latest

deepseek-deepseek-flash-latest

From $0.25/M tokens](https://modelslab.com/models/deepseek/deepseek-deepseek-flash-latest)

[#### Moonshot AI/MoonshotAI: Kimi K2.7 Code

moonshotai-kimi-k2.7-code

From $2.05/M tokens](https://modelslab.com/models/moonshotai/moonshotai-kimi-k2.7-code)

[#### Google/Gemini 2.5 Flash

gemini-2.5-flash

From $1.40/M tokens](https://modelslab.com/models/google/gemini-2.5-flash)

[#### OpenAI/OpenAI: gpt-oss-20b

openai-gpt-oss-20b

From $0.08/M tokens](https://modelslab.com/models/openai/openai-gpt-oss-20b)

[#### BytePlus/Seed 1.8

seed-1.8

From $3.00/M tokens](https://modelslab.com/models/byteplus/seed-1.8)

[#### Typesafe/TypeSafe: Jev Router

typesafe-jev-router

Free](https://modelslab.com/models/typesafe/typesafe-jev-router)

[#### NVIDIA/NVIDIA: Switchyard

nvidia-switchyard

Free](https://modelslab.com/models/nvidia/nvidia-switchyard)

[#### Google/Google: Gemini 3.8 Flash (batch)

google-gemini-3.8-flash-batch

From $1.13/M tokens](https://modelslab.com/models/google/google-gemini-3.8-flash-batch)

[#### Tencent/Tencent: Hy-MT2-30B-A3B

tencent-hy-mt2-30b-a3b

From $0.18/M tokens](https://modelslab.com/models/tencent/tencent-hy-mt2-30b-a3b)

[#### Prism Ml/PrismML: Ternary Bonsai 2 27B

prism-ml-ternary-bonsai-2-27b

From $0.29/M tokens](https://modelslab.com/models/prism-ml/prism-ml-ternary-bonsai-2-27b)

[#### Meta/Llama 3.1 Nemotron 70B Instruct HF

nvidia-Llama-3.1-Nemotron-70B-Instruct-HF

From $0.88/M tokens](https://modelslab.com/models/meta/nvidia-Llama-3.1-Nemotron-70B-Instruct-HF)

[#### Sakana/Sakana: Fugu Max

sakana-fugu-max

From $4.00/M tokens](https://modelslab.com/models/sakana/sakana-fugu-max)

[#### Google/Gemma-2 Instruct (27B)

google-gemma-2-27b-it

From $0.65/M tokens](https://modelslab.com/models/google/google-gemma-2-27b-it)

[#### Meta/Meta: Muse Spark 1.3

meta-muse-spark-1.3

From $2.75/M tokens](https://modelslab.com/models/meta/meta-muse-spark-1.3)

[#### OpenAI/OpenAI: GPT-4o (2024-05-13)

openai-gpt-4o-2024-05-13

From $10.00/M tokens](https://modelslab.com/models/openai/openai-gpt-4o-2024-05-13)

About Tencent: Hy4
---

The official release of Hy4 delivers comprehensive and substantial improvements over Hy4 Preview, with particularly strong gains in agentic capabilities and performance across a wide range of long-horizon, real-world productivity...

### Technical Specifications

Model IDtencent-hy4

CategoryLLM Models

TaskText Generation

Price$0.834 per million tokens

AddedNovember 4, 2026

### Key Features

- Chat completion and multi-turn conversation API
- Streaming response with token-by-token output
- Function calling and tool use support
- System prompts and role-based messaging
- JSON mode and structured output

### Quick Start

Integrate Tencent: Hy4 into your application with a single API call. Get your API key from the [pricing page](https://modelslab.com/pricing) to get started.

PythonJavaScriptcURLPHP

```
<code>import requests
import json

url = "https://modelslab.com/api/v7/llm/chat/completions"

headers = {
    "Content-Type": "application/json"
}

data = {
        "model_id": "tencent-hy4",
        "messages": [
            {
                "role": "user",
                "content": "Hello!"
            }
        ],
        "max_tokens": 1000,
        "key": "YOUR_API_KEY"
    }

try:
    response = requests.post(url, headers=headers, json=data)
    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)
    result = response.json()
    print("API Response:")
    print(json.dumps(result, indent=2))
except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except Exception as err:
    print(f"Other error occurred: {err}")</code>
```

### Pricing

Tencent: Hy4 API costs $0.834 per million tokens. Plans start at $21/month, and open-source models are unlimited on the $149/month plan. [View pricing plans](https://modelslab.com/pricing)

### Use Cases

- AI chatbots and virtual assistants
- Code generation and developer tools
- Content writing and copywriting automation
- Data analysis, summarization, and extraction

[Browse LLM Models](https://modelslab.com/models?feature=llmaster) [More from Tencent](https://modelslab.com/models/open_router) [View Pricing](https://modelslab.com/pricing)

Tencent: Hy4 FAQ
---

### What is Tencent: Hy4?

The official release of Hy4 delivers comprehensive and substantial improvements over Hy4 Preview, with particularly strong gains in agentic capabilities and performance across a wide range of long-horizon, real-world productivity...

### How do I use the Tencent: Hy4 API?

You can integrate Tencent: Hy4 into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "tencent-hy4" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does Tencent: Hy4 cost?

Tencent: Hy4 costs $0.834 per million tokens. ModelsLab plans start at $21/month (Basic), and the $149/month Open Source plan includes unlimited generation on open-source models.

### What is the Tencent: Hy4 model ID?

The model ID for Tencent: Hy4 is "tencent-hy4". Use this ID in your API requests to specify this model.

### Do I need a paid plan to use Tencent: Hy4?

Yes. ModelsLab is subscription-based with no free tier — plans start at $21/month (Basic, 3,250 API calls). The $149/month Open Source Unlimited plan includes unlimited generation across open-source models; premium third-party models are billed per call from your wallet.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-11-10*