Kimi K2.7 Code API: pricing, base URL and quick setup
Use Kimi K2.7 Code on A2Agent with model ID kimi-k2.7-code. The catalog lists a 256K context window. Check token rates below and verify the features your app needs.
Specifications and pricing
| Model ID | kimi-k2.7-code |
|---|---|
| Platform | Moonshot |
| Context window | 256K |
| Tagged for | chat, coding |
| Discount | -30% |
| Input / 1M tokens | |
| Output / 1M tokens |
USD per 1M tokens. Final billing depends on your API key group and metered usage.
What Kimi K2.7 Code costs on A2Agent
The official price is $0.950 input and $4.00 output per 1M tokens. On A2Agent it is $0.665 and $2.80. A month of 10M input and 2M output tokens costs $17.50 at the official price and $12.25 on A2Agent.
Quick setup
curl https://a2agent.me/v1/chat/completions \
-H "content-type: application/json" \
-H "authorization: Bearer sk-your-a2agent-key" \
-d '{
"model": "kimi-k2.7-code",
"messages": [{"role": "user", "content": "Reply with OK"}]
}'Using it from a coding client
Set it as the edit model in Cline, Roo Code or Kilo Code and keep something cheaper for the read-only steps. Most clients allow a model per role, and that split is where the savings live.
How it compares within its family
These comparisons use catalog context limits, tags and reference rates, not independent quality benchmarks. Rates can change. Check current pricing above and test your workload; a higher price or a larger context window does not establish better results.
K2.7 Code is the coding-tagged member of the Moonshot family. It lists at $0.95 per million input tokens and $4.00 output, identical to K2.6, and keeps the same 256K window. The tag is the main difference listed in the catalog. Against K2.5 it costs about half again as much on input for the same window; against K3 it is roughly a third of the price with a quarter of the context. For a coding agent, count the tokens in source files, tool results, and conversation history. Large repositories can exceed either window, so check the request size before sending. Use the exact model ID: kimi-k2.7-code and kimi-k2.6 are different models at the same price.
Other models on this platform
Questions
What makes it a coding model?
It is the Moonshot model carrying the coding tag in this catalog. K2.5 and K2.6 are tagged for chat and vision, K3 for chat and vision as well.
What is the context window?
256K tokens, the same as K2.5 and K2.6.
Does it cost more than K2.6?
No. Both list at $0.95 per million input and $4.00 output.
Will it handle a whole repository?
That depends on the token count. Include conversation history, tool results, and room for output when checking whether the request fits within 256K.
Billed per token. Top up from $5, no top-up fee.
