MCP / Models / Language models

Hunyuan Hy4 MCP: agents and long documents with no API key

Tencent Hunyuan Hy4, the release of Hunyuan Hy4 Preview, is a reasoning model for agents, coding and long documents, with image input and a 1M-token context. Run it from Claude Code, Codex, Cursor or any MCP client through one FlyMy.AI MCP, or call its API.

No API key$0.834 / $2.501 per 1M tokensChat modelTencentCommercial use
Hunyuan Hy4 sample from the FlyMy.AI catalog

$ YOUR NEXT RUN

Claude CodeCodexCursorAny agent

Use Hunyuan Hy4 in your assistant

Paste this prompt into Claude Code, Codex, Cursor or any agent. It reads the guide and helps you connect.

Read https://flymy.ai/skill.md and https://flymy.ai/mcp/models/hy4.md. Help me connect the FlyMy.AI MCP to this assistant, then run Hunyuan Hy4 (flymyai/hy4) for this task: Ask Hunyuan Hy4: plan the steps to migrate this API to a new version.
Open FlyMy.AIDownload brief

What Hunyuan Hy4 does

Send a prompt, or a chat history in messages with images as image_url parts, and get a text answer from a 1M-token context. reasoning_effort is none, low or high (high by default), and reasoning tokens are billed as output; system_prompt and max_tokens (up to 65,536) work as usual, and private_mode keeps the prompt and answer out of FlyMy.AI storage and logs on synchronous calls. Call it with your FlyMy.AI key in two ways: the FlyMy.AI API, or the OpenAI-compatible Chat Completions endpoint, where it also calls your function tools and takes their results back. Leave tool_choice at auto there: a named or required tool_choice is not available for this model through FlyMy.AI. It answers in text only; use the image, video and audio models to create media.

Hunyuan Hy4 inputs

Every input of flymyai/hy4 as its live schema lists them. Returns output (string), finish_reason (string), service_tier (string), reasoning (string), stream_details (string).

InputType, values and default
# prompt
string required What to ask Hunyuan Hy4
# messages
string optional Chat history as a JSON array of {role, content}; used instead of the prompt
# system_prompt
string optional Instructions for the whole chat
# reasoning_effort
string optional Allowed: none, low, high Default: high How hard Hunyuan Hy4 thinks before answering
# max_tokens
integer optional Allowed: 1 to 65536 Most tokens to generate, reasoning included
# private_mode
boolean optional Default: false Keep the prompt and the answer out of FlyMyAI storage and logs (synchronous requests only)

Ask your agent

Requests to paste as they are, once the FlyMy.AI MCP is connected.

“Ask Hunyuan Hy4: plan the steps to migrate this API to a new version.”runs flymyai/hy4
“Explain this stack trace and suggest a fix with Hunyuan Hy4.”runs flymyai/hy4
“With Hunyuan Hy4, turn these meeting notes into a list of action items with owners.”runs flymyai/hy4

Hunyuan Hy4 price

$0.834 per 1M input tokens, $2.501 per 1M output tokens, cached input $0.042 per 1M. Cached input is $0.042 per 1M tokens. Billed to your FlyMy.AI balance; no seats, no subscription and no minimum.

Call Hunyuan Hy4 from code

The same model, from an agent or from your own code. Keys stay in your FlyMy.AI account.

From an agent, through the MCP

The agent calls get_model_schema, then run_model with:

{
  "endpoint_id": "flymyai/hy4",
  "input": {
    "prompt": "Explain in two sentences what an MCP server is."
  }
}

From your code, over HTTP

Form fields, not JSON; files go as uploads or public URLs. Text models answer on the streaming route.

curl -X POST https://api.flymy.ai/api/v1/flymyai/hy4/predict/stream/ \
  -H "X-API-KEY: $FLYMYAI_API_KEY" \
  -F 'prompt=Explain in two sentences what an MCP server is.'

With the OpenAI SDK

Hunyuan Hy4 also answers the OpenAI Chat Completions protocol.

from openai import OpenAI

client = OpenAI(base_url="https://api.flymy.ai/api/v1/flymyai/hy4/openai/v1", api_key="YOUR_FLYMYAI_KEY")
reply = client.chat.completions.create(
    model="flymyai/hy4",
    messages=[{"role": "user", "content": "Explain in two sentences what an MCP server is."}],
)
print(reply.choices[0].message.content)

Questions about Hunyuan Hy4

Do I need a Tencent API key for Hunyuan Hy4?

No. Hunyuan Hy4 runs on FlyMy.AI's account, so you need no Tencent key or plan: sign in to FlyMy.AI once and each run is billed to your FlyMy.AI balance.

How much does Hunyuan Hy4 cost?

$0.834 per 1M input tokens, $2.501 per 1M output tokens, cached input $0.042 per 1M. There is no subscription or minimum; the price comes from FlyMy.AI billing and was checked on 2026-11-18.

How do I use Hunyuan Hy4 in Claude Code, Codex or Cursor?

Add the FlyMy.AI MCP with one command and sign in, then ask in plain words, for example: "Ask Hunyuan Hy4: plan the steps to migrate this API to a new version." Your agent reads the inputs with get_model_schema and runs flymyai/hy4 with run_model.

What does Hunyuan Hy4 need as input?

Hunyuan Hy4 requires prompt; it also takes 5 optional inputs, each listed on this page with its allowed values and default.

Can I call Hunyuan Hy4 from my own code?

Yes. Send form fields to https://api.flymy.ai/api/v1/flymyai/hy4/predict/stream/ with your FlyMy.AI API key in the X-API-KEY header; it also answers the OpenAI Chat Completions protocol at https://api.flymy.ai/api/v1/flymyai/hy4/openai/v1.

Go to the source

From the FlyMy.AI model catalog of 2026-11-18: inputs from the model's live schema, prices from FlyMy.AI billing. Requests are examples to paste, not recorded runs.