Skip to content

AI model pricing

Hy4 Flash API

hy4-flash

80% off official

Context window
1,048,576
You save
80%

About Hy4 Flash API pricing

Hy4 Flash is available through the zrouter gateway behind one API key, alongside every other model in the catalog. Hy4 Flash API pricing is pay-as-you-go: $0.014 per 1M input tokens and $0.0562 per 1M output tokens — no subscription, no monthly minimum, and the same OpenAI-compatible endpoint your tools already use.

Against the official API — $0.07 input and $0.281 output per 1M tokens — zrouter runs about 80% cheaper, so sustained workloads cost a fraction of list price. Every request is metered per token and settled in real time, and live rates stay visible on the pricing page. The model provides a 1,048,576 token context window, so long documents, large codebases and extended agent sessions fit in a single request.

With chat completions, responses, messages, streaming support, Hy4 Flash slots into existing OpenAI-compatible and Anthropic-compatible tooling after a one-line base-URL change — a practical fit for chat products, coding agents and batch jobs that need frontier quality without official-API prices.

Price comparison

PAYG rates · per 1M tokens

input

80%
$0.07
Official price
$0.014
zrouter price

output

80%
$0.281
Official price
$0.0562
zrouter price

Cache read $0.0006$0.003Cache write $0.014

Capabilities

ChatResponsesMessagesStreaming

Hy4 Flash price per 1M tokens: zrouter vs official

Pay as you go, billed per token used. The official column is the list price of the model creator; the zrouter column is what you pay.

Token typeOfficialzrouterYou save
Input$0.07$0.01480%
Output$0.281$0.056280%

Prices are in USD per 1,000,000 tokens. When the provider serves part of your prompt from its cache, that part is billed at a discounted read rate; the usage page shows the exact split for every request.

Context and output limits

Hy4 Flash accepts up to 1,048,576 tokens of context in one request (prompt plus answer). Set max_tokens to cap the length of the answer, and stream the response to see the first tokens sooner.

Call Hy4 Flash with your zrouter key

One zr_ key works on every endpoint. Replace the key and keep the model name hy4-flash.

curl (OpenAI-compatible)

curl https://api.zrouter.dev/v1/chat/completions \
  -H "Authorization: Bearer $ZROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "hy4-flash", "messages": [{"role": "user", "content": "Hello"}]}'

Python (openai SDK)

from openai import OpenAI

client = OpenAI(base_url="https://api.zrouter.dev/v1", api_key="zr_...")
reply = client.chat.completions.create(
    model="hy4-flash",
    messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)

Anthropic SDK / Claude Code

export ANTHROPIC_BASE_URL="https://api.zrouter.dev"
export ANTHROPIC_AUTH_TOKEN="zr_..."
export ANTHROPIC_MODEL="hy4-flash"
claude

Get started with Hy4 Flash in three steps

  1. Sign in with Google and create an API key. The key starts with zr_ and is shown once, so store it somewhere safe.
  2. Top up a pay-as-you-go balance with QRIS, USDT or USDC, or buy a Token Plan for this model. No credit card is required.
  3. Send your first request to hy4-flash with the curl or Python example above. Usage and cost show up in your dashboard right away.

How billing works for Hy4 Flash

Every request is billed by the tokens it actually used, as reported by the model provider: input tokens and output tokens are priced separately, which is why the table above has one row for each.

If you hold a Token Plan for this model, it is spent first. When it runs out, the request falls back to your pay-as-you-go balance. If neither has funds, the gateway answers 402 instead of running the request.

The usage page lists each request with its token counts and cost, and you can export it as CSV or JSON. Your balance does not expire and is not reset on a schedule.

Why call Hy4 Flash through zrouter

Hy4 Flash API: frequently asked questions

How much does the Hy4 Flash API cost on zrouter?
Pay-as-you-go is $0.014 per 1M input tokens and $0.0562 per 1M output tokens, 80% below the official price. You only pay for tokens you use, and the balance does not expire.
How do I call Hy4 Flash with the OpenAI SDK?
Create a zrouter key, set the base URL to https://api.zrouter.dev/v1 and use the model name hy4-flash. The request and response shapes are the same as the OpenAI Chat Completions API.
Can I use Hy4 Flash with Claude Code or the Anthropic SDK?
Yes. The gateway also speaks the Anthropic messages protocol. Point ANTHROPIC_BASE_URL at https://api.zrouter.dev, use your zr_ key as the auth token and set the model to hy4-flash.
Is there a Token Plan for Hy4 Flash?
Hy4 Flash is billed pay-as-you-go. Top up a balance and pay only for the tokens you use.
How do I pay without a credit card?
Top up with QRIS, USDT or USDC. No credit card is needed, and one balance works for every model.

Other models you can call with the same key:

Documentation