models

Tencent: Hy4 preview

Markdown · JSON

Tencent: Hy4 preview

Tencent Hy4 preview is a text model with a published 1,048,576-token context. Select tencent/hy4-preview through Chat Completions for work over supplied text, including document synthesis, structured extraction and code discussion. Its declared controls cover reasoning, structured responses and function-tool workflows, with complete JSON or streamed response delivery.

About the model

This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.

Tencent Hy4 preview is the explicitly named preview edition selected by tencent/hy4-preview. It accepts text and produces text through Chat Completions, with a published context length of 1,048,576 tokens. Prepare long material with stable document labels, section boundaries and a precise question so the request describes both the evidence to use and the result the application needs.

Send POST /v1/chat/completions with model set to tencent/hy4-preview and a nonempty messages array. Supply the actual text in message content. A document-synthesis request can include labelled reports and ask for shared findings, disagreements and supporting passages. An extraction request can name fields and define how to represent missing information. A code discussion can include the relevant files or excerpts as text and ask for a focused explanation or proposed edit.

Budget the instructions, documents, conversation history and requested reply within the stated context. Keep source labels beside the text they identify and state which documents govern the answer when they conflict. For a large comparison, define the criteria before the source material and request a result organised by those criteria. This gives the application a specific output to check against the input instead of relying on a broad instruction to summarise everything.

The published parameter set includes reasoning, reasoning_effort and include_reasoning, along with temperature, stop, max_tokens and max_completion_tokens. For a defined response shape, use response_format with the schema your application expects; the profile declares structured-output support. For a function-tool exchange it includes tools and tool_choice. Supply the schema or function definitions used by your own application, keep the selected parameter values with the request, and validate the actual returned fields or tool arguments before proceeding.

The optional stream control supports assembled JSON delivery or a streamed reply. For JSON, retain every returned choice, message content, tool call, reasoning field and usage field. For streaming, join deltas by choice and tool-call index and keep the final finish information. When a tool call is returned, preserve its actual identifier and arguments so the application can associate the resulting tool message with that call. Keep the original request identity and complete response when an exchange needs investigation after an interruption.

Ailoot Ultra · Chat Completions POST /v1/chat/completions tencent/hy4-preview

tencent/hy4-preview

Tencent /tencent/hy4-preview

Overview

Tencent Hy4 preview is a text model with a published 1,048,576-token context. Select tencent/hy4-preview through Chat Completions for work over supplied text, including document synthesis, structured extraction and code discussion. Its declared controls cover reasoning, structured responses and function-tool workflows, with complete JSON or streamed response delivery.

Accepted inputs
Text
Results
Text

Available in Ailoot · inputs & methods

Ailoot Ultra · Chat Completions POST /v1/chat/completions
Input types
text
Output types
text
Context
1,048,576 tokens
Output format
JSON or supported SSE
FieldTypeRequirementValues & limitsDefault
FieldmodelTypestringRequirementRequiredValues & limits
tencent/hy4-preview
Default—
FieldmessagesTypearrayRequirementRequiredValues & limitsDefault—
FieldstreamTypebooleanRequirementOptionalValues & limitsDefaultfalse
Fieldmax_tokensTypeintegerRequirementOptionalValues & limits
Minimum: 1
Default—
Fieldmax_completion_tokensTypeintegerRequirementOptionalValues & limits
Minimum: 1
Default—
FieldnTypeintegerRequirementOptionalValues & limits
Minimum: 1
Default—
FieldtemperatureTypenumberRequirementOptionalValues & limitsDefault—
Fieldtop_pTypenumberRequirementOptionalValues & limitsDefault—
FieldseedTypeintegerRequirementOptionalValues & limitsDefault—
FieldstopTypeRequirementOptionalValues & limitsDefault—
Fieldfrequency_penaltyTypenumberRequirementOptionalValues & limitsDefault—
Fieldpresence_penaltyTypenumberRequirementOptionalValues & limitsDefault—
FielduserTypestringRequirementOptionalValues & limitsDefault—
Method parameters and lifecycle
ParameterContract
Parametercontent_typeContractapplication/json
ParameterrequiredContractmodel, messages
ParameteroptionalContractstream, max_tokens, max_completion_tokens, n, temperature, top_p, seed, stop, frequency_penalty, presence_penalty, user
Parametermaterial_typesContracttext
ParameterconditionsContract

Lifecycle: synchronous_json_or_sse

Pricing

Tariff references do not add request options. Supported parameters are listed for the selected method.

Fast mode
Not specified When fast mode is selected
Flex mode
Not specified When flex mode is selected
Time schedule
{"periods":[{"end_time":"00:00","multiplier":"0.9","start_time":"16:00"}],"timezone":"UTC","weekdays_only":false} At the request pricing time

Ailoot rates

Prices by configuration

ConfigurationRate scheduleCharge
ConfigurationBase token ratesRate scheduleBase rateCharge
Input · Input tokens $0.001668 / 1K tokens
Output · Output tokens $0.005002 / 1K tokens
Input · Cache read $0.000084 / 1K tokens
Input · Cache write — / 1K tokens
Input · Cache write, 1 hour — / 1K tokens

Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. How reservation and settlement work →

Example requests

Ailoot Ultra · Chat Completions

curl · create once and retain the complete result
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "tencent/hy4-preview", "messages": [{"role": "user", "content": "Summarize the supplied text in three concise points."}], "stream": false}')

Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
# Submit once. Retain the complete result, original identifiers and every response header.

Receive and save results

Ailoot Ultra · Chat Completions

JSON or supported SSE

Keep all completed results

Keep every complete returned response, file and content part.

Retain the complete response, all actual results, original identifiers, usage and response headers.

If the original response needs checking

Preserve the original response, headers and X-Client-Request-ID. An uncertain outcome does not authorize another creation.

Aliases

Model aliases

Ailoot Ultra tencent/hy4-preview

Method path aliases

Use the method paths shown above.

Related caller IDs

tencent/hy4-preview

FAQ · Tencent: Hy4 preview
What inputs and results are available?

POST /v1/chat/completions · tencent/hy4-preview: text → text

Which fields does the request use?

POST /v1/chat/completions · tencent/hy4-preview: model, messages, stream, max_tokens, max_completion_tokens, n, temperature, top_p, seed, stop, frequency_penalty, presence_penalty, user

What limits apply?

POST /v1/chat/completions · tencent/hy4-preview: ctx: 1048576; max_tokens.minimum: 1; max_completion_tokens.minimum: 1; n.minimum: 1

More details

Connect Ailoot to Claude Code, OpenCode, Hermes or your own app.

The company and its project portfolio

The company and its project portfolio: millions of customers; monthly sales in the billions.

Buy tokens at a discount.

Subscription discounts for regular use. Promo codes offer up to 50% off token purchases.

Subscription
Choose a discounted plan for your regular requests.
Promo code: up to 50% off
Enter your code at checkout. The price updates to reflect the current promotion.
Spending in your history
The model, tokens and amount are recorded for each request.

Choose a subscription · View model prices

Connect the API to a product you sell.

Use Ailoot in SaaS, apps and bots under its official service offer and licence agreement. Request a reseller licence for resale.

Commercial application
Add text, image, video and audio generation to paid features in your service.
Reseller licence
Send a description of your project and how you provide access. Request written terms for use and resale.
Documents on the website
The service offer, licence agreement and data processing policy are available before you connect.

Request a reseller licence · Service offer and licence agreement