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-previewOverview
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
| Field | Type | Requirement | Values & limits | Default |
|---|---|---|---|---|
Fieldmodel | Typestring | RequirementRequired | Values & limits tencent/hy4-preview | Default— |
Fieldmessages | Typearray | RequirementRequired | Values & limits | Default— |
Fieldstream | Typeboolean | RequirementOptional | Values & limits | Defaultfalse |
Fieldmax_tokens | Typeinteger | RequirementOptional | Values & limits Minimum: 1 | Default— |
Fieldmax_completion_tokens | Typeinteger | RequirementOptional | Values & limits Minimum: 1 | Default— |
Fieldn | Typeinteger | RequirementOptional | Values & limits Minimum: 1 | Default— |
Fieldtemperature | Typenumber | RequirementOptional | Values & limits | Default— |
Fieldtop_p | Typenumber | RequirementOptional | Values & limits | Default— |
Fieldseed | Typeinteger | RequirementOptional | Values & limits | Default— |
Fieldstop | Type | RequirementOptional | Values & limits | Default— |
Fieldfrequency_penalty | Typenumber | RequirementOptional | Values & limits | Default— |
Fieldpresence_penalty | Typenumber | RequirementOptional | Values & limits | Default— |
Fielduser | Typestring | RequirementOptional | Values & limits | Default— |
Method parameters and lifecycle
| Parameter | Contract |
|---|---|
Parametercontent_type | Contractapplication/json |
Parameterrequired | Contractmodel, messages |
Parameteroptional | Contractstream, max_tokens, max_completion_tokens, n, temperature, top_p, seed, stop, frequency_penalty, presence_penalty, user |
Parametermaterial_types | Contracttext |
Parameterconditions | Contract |
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
| Configuration | Rate schedule | Charge |
|---|---|---|
| ConfigurationBase token rates | Rate scheduleBase rate | Charge 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
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
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