MoonshotAI

MoonshotAI: Kimi K2.7 Code

Chat
moonshotai/kimi-k2.7-code
CompareGet Started

Kimi K2.7 Code is Moonshot's dedicated strong-coding reasoning model from the official channel (api.moonshot.cn), with embedded thinking for complex programming tasks. Context and output: 262K tokens each. Available via OpenAI-compatible and Anthropic protocols through Ofox.

Context Window
262K
Max Output Tokens
262K
Released
2026-06-12
Capabilities
Function CallingReasoningPrompt CachingWeb Search
Available Providers
MoonshotAIMoonshotAzureAzure
Supported Protocols
OpenAIopenaiAnthropicanthropic

Providers

AzureAzure
Input Tokens
$0.95/M
Output Tokens
$4/M
Cache Read
$0.19/M
Web Search
$0.035/R
Protocols
OpenAIopenai/v1/chat/completions/v1/responses
Anthropicanthropic
MoonshotAIMoonshot
Input Tokens
$0.95/M
Output Tokens
$4/M
Cache Read
$0.19/M
Web Search
$0.0043/R
Protocols
OpenAIopenai/v1/chat/completions
Anthropicanthropic

Code Examples

from openai import OpenAI
client = OpenAI(
base_url="https://api.ofox.run/v1",
api_key="YOUR_OFOX_API_KEY",
)
response = client.chat.completions.create(
model="moonshotai/kimi-k2.7-code",
messages=[
{"role": "user", "content": "Hello!"}
],
)
print(response.choices[0].message.content)

Frequently Asked Questions

MoonshotAI: Kimi K2.7 Code on Ofox.ai costs $0.95/M per million input tokens and $4/M per million output tokens. Pay-as-you-go, no monthly fees.