Hy4 flash on Fireworks AI

Hunyuan · Tencent AI Lab

Serverless
Open Weights

Last refreshed 2026-11-26. Next refresh: weekly.

Why use Hy4 flash on Fireworks AI?

Fireworks AI offers Hy4 flash with pay-as-you-go pricing at $0.07/1M input tokens. Fireworks AI offers a generative AI platform as a service, focusing on rapid product iteration and cost-efficient AI deployment.

Compare Hy4 flash across 6 providers to find the best fit for your use case
Input / 1M
$0.070
Output / 1M
$0.281
Cache
read $0.003
Batch
Not sourced

Setup recipe

Python + curl
Install
pip install openai
Auth
export FIREWORKS_API_KEY=...
Call
import os
from openai import OpenAI
client = OpenAI(
    api_key=os.environ["FIREWORKS_API_KEY"],
Model ID
accounts/fireworks/models/hy4-flash

Request example

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["FIREWORKS_API_KEY"],
    base_url="https://api.fireworks.ai/inference/v1"
)
response = client.chat.completions.create(
    model="accounts/fireworks/models/hy4-flash",
    messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)

Gotchas

  • Use provider model ID "accounts/fireworks/models/hy4-flash", not the LLMReference slug "hy4-flash".
  • Fireworks model IDs use "accounts/fireworks/models/{model-name}" format, e.g. "accounts/fireworks/models/llama4-scout-instruct-basic" or "accounts/fireworks/models/deepseek-r1".
  • The examples expect FIREWORKS_API_KEY; rename it only if your application config maps the new variable.

Compare Hy4 flash Across Providers

ProviderInput (per 1M)Output (per 1M)
Tencent Cloud TI Platform$0.07$0.28
OpenRouter——
Vercel AI Gateway——
Novita AI$0.07$0.28
Nous Portal——
View all 6 providers →

Pricing

TypePrice (per 1M)
Input tokens$0.07
Output tokens$0.28

Capabilities

VisionMultimodalReasoningJSON / Tool useStructured OutputsPrompt Caching

About Hy4 flash

Hy4 flash is Tencent Hy’s multimodal mixture-of-experts model for everyday coding, agents and document understanding. It accepts text and images with a 1,048,576-token context. Its architecture combines sparse and sliding-window attention, LatentMoE and n-gram embeddings. Tencent publishes instruct, FP8 and pre-trained base weights under the custom Tencent Hy License, which includes additional commercial terms for large MaaS businesses.

Get Started