We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
MoonshotAI: Kimi K2.7 Code
moonshotai/kimi-k2.7-codeTry MoonshotAI: Kimi K2.7 Code now
Runs on your balance at the prices above. New accounts start with free usage.
One API. Every model.
Session cost $0.00
Settings
Advanced parameters
MoonshotAI: Kimi K2.7 Code at a glance
- Input price is 49% higher than the median of 434 Text models.
- Context window of 262,144 tokens, enough for long documents and multi-turn conversations.
- Supports tool (function) calling for agents and integrations.
- Supports structured JSON output with a schema.
- Supports reasoning effort control.
- Accepts images as input (vision).
- A typical request (1,000 input / 500 output tokens) costs about $0.00821.
About MoonshotAI: Kimi K2.7 Code
Kimi K2.7 Code is a coding-focused model from Moonshot AI, part of the Kimi K2 family. Moonshot AI built it to complete end-to-end programming tasks reliably over long contexts, and it uses a native multimodal mixture-of-experts architecture. It sits in the text category on api14, and the provider describes it explicitly as a coding model rather than a general-purpose chat model.
The model accepts text and image input, and it produces text output, so you can send screenshots, diagrams or other visual material alongside your written prompt. It supports a context window of 262,144 tokens and a maximum output of 235,929 tokens. That combination of a large context and a large output ceiling means you can feed in substantial codebases or long documents and still receive a lengthy, complete response rather than a truncated one. Because it is a reasoning-capable model, it can also expose its reasoning through the relevant parameters.
The practical uses follow from those capabilities. The long context suits tasks that involve an entire repository or several large files at once, such as refactoring across modules, tracing a bug through many layers, or reviewing a codebase for inconsistencies. Image input helps when the relevant information is in a screenshot of an error, a UI mockup, a whiteboard sketch or a diagram of system architecture. The generous output limit is useful for generating full files, multi-file changes or detailed explanations that would otherwise be cut short. Reasoning support fits problems that benefit from step-by-step analysis before the final answer.
You call it through api14's OpenAI-compatible API using the model id "moonshotai/kimi-k2.7-code". Because the interface matches OpenAI's, you can use existing OpenAI SDKs and point them at api14. The model supports a wide set of request parameters: temperature, top_p, top_k, min_p, frequency_penalty, presence_penalty, repetition_penalty, max_tokens, stop, seed, logit_bias, logprobs, top_logprobs, response_format, structured_outputs, reasoning, include_reasoning, tools, tool_choice and parallel_tool_calls. Tool calling and structured outputs are available, which makes it straightforward to wire the model into agent loops or pipelines that expect machine-readable results.
The facts do not list specific limitations, so the main consideration is fit. It is positioned as a coding model, so for tasks that are not code-related, another model in the catalogue may be a better match. Its image input supports visual context, but output is text only, so it will not produce images. If your task depends on audio or video input, or on non-text output, look elsewhere.
How to call the MoonshotAI: Kimi K2.7 Code API
- Create an API key in your dashboard.
- Install the official openai SDK for your language.
- Set baseURL to https://api14.com/api/v1 and model to "moonshotai/kimi-k2.7-code".
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.chat.completions.create({
"model": "moonshotai/kimi-k2.7-code",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
});
console.log(result.choices[0].message.content);
Supported parameters
frequency_penaltyinclude_reasoninglogit_biaslogprobsmax_tokensmin_pparallel_tool_callspresence_penaltyreasoningrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_ktop_logprobstop_pSpecifications
- Context length
- 262,144
- Max output
- 235,929
- Input
- text, image
- Output
- text
Requests on api14 · last 7 days
MoonshotAI: Kimi K2.7 Code: frequently asked questions
- How much does the MoonshotAI: Kimi K2.7 Code API cost?
- MoonshotAI: Kimi K2.7 Code costs Input $2.35 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
- What is the context window of MoonshotAI: Kimi K2.7 Code?
- MoonshotAI: Kimi K2.7 Code reads up to 262,144 tokens per request: prompt, history and documents together. It writes up to 235,929 output tokens per response.
- What can MoonshotAI: Kimi K2.7 Code do?
- MoonshotAI: Kimi K2.7 Code accepts text, image and returns text. It supports tool calling, structured JSON output, reasoning effort control.
- How do I call MoonshotAI: Kimi K2.7 Code from my code?
- Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "moonshotai/kimi-k2.7-code". No other code changes. Copy a ready example from the code panel on this page.
- What are alternatives to MoonshotAI: Kimi K2.7 Code?
- Comparable Text models at a similar price: Pareto 26.10, Pareto Latest, Relace: Relace Search. Each runs through the same API key, so switching is one string.
MoonshotAI: Kimi K2.7 Code community
New topicThis community has no topics yet. Open the first one about MoonshotAI: Kimi K2.7 Code.