hy4 API
Call hy4 through a single OpenAI-compatible endpoint — one key, no separate vendor account, no multi-provider wiring.
Tencent HunyuanChatVisionReasoningCoding工具调用Long contextPricing
Input$0.46 / 1M tokens (¥3.00)
Output$1.38 / 1M tokens (¥9.00)
Output multiplier×3.00
Context window1M tokens
Prices are per 1M tokens in USD · ¥6.5 = $1 · Billed in CNY
Tencent Hunyuan
Hunyuan models are available as an additional general-purpose option.
When to use it
At $0.46 per 1M input tokens it sits in line with the catalogue median of $0.50 — a balanced choice. Best for coding agents and repository-scale edits. Every model here is reachable with the same API key, so trialling it against a stronger sibling costs one line of code.
Code
from openai import OpenAI
client = OpenAI(
base_url="https://starseaapi.com/v1",
api_key="sk-your-key"
)
r = client.chat.completions.create(
model="hy4",
messages=[{"role": "user", "content": "Explain prefix caching in one paragraph"}]
)
print(r.choices[0].message.content)