Skip to content

Evals: find out which model does your team's work best

Join the waitlist

Hy4 Flash

Model id

tencent/hy4-flash
Context window
1.05M
tokens
Input price
$0.07
per 1M tokens
Output price
$0.281
per 1M tokens
Max output
Provider
no narrower limit

Pricing

Provider list priceUSD / 1M tokens

Input$0.07 / M tokens
Output$0.281 / M tokens
Cache read$0.003 / M tokens
Context window1.05M tokens
RoutingFree

Provider list price. BYOK bills your provider; managed credits draw down at these rates. No markup or request fee. Every request is metered per engineer and joined to shipped work.

Registry 2026-11-25.1 · effective 9/17/2026 · Private rate card. Source withheld.

Providers

Hy4 Flash runs on 2 providers. Automatic uses the cheapest one that is working, or you can choose. The list price applies unless a provider shows its own price.

Provider for this request

No provider needed. TokenSpend picks the cheapest working one.

Automatic
curl https://api.tokenspend.dev/v1/chat/completions \
  -H "Authorization: Bearer $TOKENSPEND_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"tencent/hy4-flash","messages":[{"role":"user","content":"hello"}]}'

Capabilities

Registry contract

Protocols
3
Chat · Responses · Messages · streaming
Tools
None
Not supported
JSON Schema
None
Not supported
Vision
Yes
Chat · Responses · Messages
Reasoning
None
No public control
Output limit
Provider
No narrower TokenSpend limit

canonical tencent/hy4-flash · revision tencent/hy4-flash · aliases hy4-flash

Run it

First request

Python · TokenSpend SDK
from tokenspend import TokenSpend

client = TokenSpend()
resp = client.chat.completions.create(
    model="tencent/hy4-flash",
    messages=[{"role": "user", "content": "hello"}],
)
TypeScript · TokenSpend SDK
import { TokenSpend } from "@tokenspend/sdk";

const client = new TokenSpend();
const resp = await client.chat.completions.create({
  model: "tencent/hy4-flash",
  messages: [{ role: "user", content: "hello" }]
});
curl
curl https://api.tokenspend.dev/v1/chat/completions \
  -H "content-type: application/json" \
  -H "Authorization: Bearer $TOKENSPEND_API_KEY" \
  -d '{"model":"tencent/hy4-flash","messages":[{"role":"user","content":"hello"}]}'
Claude Code integration
export ANTHROPIC_BASE_URL=https://api.tokenspend.dev
export ANTHROPIC_API_KEY=$TOKENSPEND_API_KEY
export ANTHROPIC_MODEL=tencent/hy4-flash

One request shape reaches every model. Claude Code connects as an integration with two environment variables. TokenSpend never stores prompts or responses.

Questions

Which provider will run my Hy4 Flash requests?

DeepInfra and Novita can all run it. By default TokenSpend sends each request to the cheapest one that is working and moves to the next if that one errors, so you do not have to pick. To pin a provider, send it in the request as the provider option; the code on this page shows how. Where a provider charges a rate of its own, you are billed that rate and it is shown above.

What happens if a provider goes down mid-request?

A failed attempt, such as a timeout, a rate limit or a server error, is retried once on the next provider before any output reaches you. A stream that has already started is not restarted on another provider. If you pinned one provider, requests stay on it and fail with a clear error instead of moving.

What does Hy4 Flash cost?

$0.07 per 1M input tokens and $0.281 per 1M output tokens. TokenSpend adds no markup and no per-request fee. If you pay with managed credits, buying them carries a 5% fee.

What can I do with Hy4 Flash through TokenSpend?

Chat and streaming, plus image input (Chat, Messages). It does not support tool calling and JSON schema output here. Tool calling and JSON schema are enabled per provider, only after that provider passes our tests, so a provider chosen by hand may lack them.

How long can my prompt be?

1.05M tokens of context, prompt and reply together.

Does prompt caching make Hy4 Flash cheaper?

Yes, when the provider caches a repeated prompt prefix. Cached input is billed at $0.003 per 1M tokens instead of $0.07.

How current is this pricing?

It follows rate card 2026-11-25.1, effective 9/17/2026. Source: Private rate card.