Hy4 API

Hy4 is a powerful chat model from Tencent designed for complex productivity tasks and agentic workflows.

Modalities
Image, TextText
In / Out price
$0.8824/$2.65per 1M
Context window
1.05M tokens
Released
Nov 4, 2026

Hy4 overview

The pelican test: one prompt, every text model, unedited SVG output from Nov 4, 2026.

SVG of a pelican riding a bicycle, written by Hy4 through AI/ML API

Hy4 by Tencent

Hy4 is the official release from Tencent, offering improved performance for real-world productivity. It supports text and image inputs with a large context window and configurable reasoning effort.

Hy4 specs

Model ID
tencent/hy4
Developer
Tencent
Context window
1,048,576 tokens
Max output
65,536 tokens
Input
Image, Text
Output
Text
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

What Is Hy4 API?

Hy4 is the latest model developed by Tencent, built to succeed the previous preview version with significant upgrades to its agentic capabilities.

Designed for versatility, the model handles both text and image inputs while providing users with control over its reasoning effort.

Large Context Window

The model supports a context window of 1M tokens to handle extensive information.

Configurable Reasoning

Users can adjust the reasoning effort to suit the specific demands of their tasks.

Multimodal Input

Hy4 processes both text and image inputs to generate comprehensive text responses.

Tool Integration

The model includes support for tools, streaming, and structured output generation.

Use cases

Automating complex, long-horizon productivity tasks.

Analyzing visual data alongside textual information.

Generating structured outputs for data processing workflows.

Executing multi-step agentic reasoning processes.

Capabilities

  • Reasoning
  • Streaming
  • Structured outputs
  • Function calling
  • Vision

Hy4 API pricing

Hy4 pricing in US dollars
UsagePriceUnit
Input$0.88241M tokens
Output$2.651M tokens
Cached input$0.04441M tokens

Prices from the AI/ML API price list, checked on Nov 4, 2026.

Hy4 vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
Hy4$0.8824$2.65
Hy-MT2-1.8B$0.0466$0.1873
Hy-MT2-30B-A3B$0.0783$0.3121
Hy-MT2-7B$0.0783$0.3121
Hy4 Preview$0.8824$2.65

How to use the Hy4 API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "tencent/hy4",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Related articles

All posts

Hy4 FAQ

How much does Hy4 cost?

Hy4 costs $0.882372 / 1M tokens for input and $2.646058 / 1M tokens for output on AI/ML API. Cached input is billed at $0.044436 / 1M tokens.

What inputs does Hy4 accept?

Hy4 accepts both text and image inputs.

How large is the context window?

The model features a 1M-token context window.

Can I control the reasoning process?

Yes, Hy4 allows for configurable reasoning effort.

What is the maximum output length?

The model supports a maximum output of 65,536 tokens.

What is the Hy4 model ID?

Use tencent/hy4 as the model parameter. Requests go to the OpenAI-compatible endpoint with your AI/ML API key.

Start building with Hy4

Hy4 API

tencent/hy4

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "tencent/hy4",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'