Reference
D

Kimi K2.7 Code

Kimi K2.7 Code, a language model from DeepInfra.
modelOverride: { model: "kimi-k2-7-code" }
Moonshot·served viaDeepInfra·Released 2026
Pricing
Input
$0.74 / 1M
Output
$3.50 / 1M
Specifications
Context window
262,164 tokens
Max output
10,000,000 tokens
Released
2026
Model string
moonshotai/Kimi-K2.7-Code
Capabilities
CodingAgentic
Parameters
Model options, passed in modelOverride.config.
ParameterTypeDefaultRange / options
top_p
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
Number10.01–1, step 0.01
min_p
Float that represents the minimum probability for a token to be considered, relative to the probability of the most likely token. Set to 0 to disable this.
Number00–1, step 0.01
top_k
Sample from the best k (number of) tokens. 0 means off.
Number00–999, step 1
presence_penalty
Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
Number0-2–2, step 0.1
frequency_penalty
Positive values penalize new tokens based on how many times they appear in the text so far, increasing the model's likelihood to talk about new topics.
Number0-2–2, step 0.1
repetition_penalty
Alternative penalty for repetition, but multiplicative instead of additive (> 1 penalize, < 1 encourage).
Number10.01–5, step 0.01
stop
A sequence where the API will stop generating further tokens.
Text
Use this model
await mindstudio.generateText({
  message: "...",
  modelOverride: {
    model: "kimi-k2-7-code",
    config: {
      top_p: 1,
      min_p: 0,
    },
  },
});