# Hy4 Preview vs Kimi K2.7 Code

As of October 27, 2026, Kimi K2.7 Code costs 14% more per input token than Hy4 Preview ($0.95 vs $0.834 per 1M) and has a 256K-token context window versus 1M.

- Page: https://models.litellm.ai/compare/hy4-preview-vs-kimi-k2.7-code
- Hy4 Preview: https://models.litellm.ai/models/hy4-preview
- Kimi K2.7 Code: https://models.litellm.ai/models/kimi-k2.7-code

## Side by side

| | Hy4 Preview | Kimi K2.7 Code |
|---|---|---|
| Input, per 1M tokens | $0.834 | $0.95 |
| Output, per 1M tokens | $2.501 | $4.00 |
| Cache read, per 1M tokens | $0.042 | $0.19 |
| Cache write, per 1M tokens | – | – |
| Context window | 1,024,000 tokens | 262,144 tokens |
| Max output | 64,000 tokens | 262,144 tokens |
| Image input | No | Yes |
| Tool calling | Yes | Yes |
| Structured output (JSON) | Yes | Yes |
| Prompt caching | Yes | Yes |
| Reasoning | Yes | Yes |
| Providers on LiteLLM | 2 | 17 |
| Price shown is from | Opencode GO | Moonshot AI |
| Added to LiteLLM | September 16, 2026 | June 2026 |

Headline prices in USD per 1M tokens, from LiteLLM's model price file.

## Cheapest provider for each

- Hy4 Preview: Opencode GO at $0.834 input per 1M tokens (`opencode_go/hy4-preview`)
- Kimi K2.7 Code: DeepInfra at $0.68 input per 1M tokens (`deepinfra/moonshotai/Kimi-K2.7-Code`)

## When to pick which

- Hy4 Preview: Costs 12% less per input token: $0.834 vs $0.95 per 1M.
- Hy4 Preview: Larger context window: 1,024,000 vs 262,144 tokens.
- Kimi K2.7 Code: Supports image input, which Hy4 Preview doesn't list.
- Kimi K2.7 Code: Returns up to 262,144 tokens per response, vs 64,000.

## FAQ

### Which is cheaper, Hy4 Preview or Kimi K2.7 Code?

Hy4 Preview is cheaper at 3 input tokens per output token: $1.251 per 1M tokens blended ($0.834 input, $2.501 output), versus $1.712 ($0.95 and $4.00) for Kimi K2.7 Code, as of October 27, 2026.

### Which has the larger context window, Hy4 Preview or Kimi K2.7 Code?

Hy4 Preview has the larger context window: 1,024,000 tokens, versus 262,144 for Kimi K2.7 Code.

### Can I switch from Hy4 Preview to Kimi K2.7 Code without changing my code?

Yes. Through LiteLLM both use the OpenAI format, so switching means changing the model name from "opencode_go/hy4-preview" to "moonshot/kimi-k2.7-code", or pointing a LiteLLM gateway model alias at the other model. You can also use one as a fallback for the other.
