MoonshotAI: Kimi K2.7 Code
Chatmoonshotai/kimi-k2.7-codeKimi 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
MoonshotAzure
Supported Protocols
openaianthropic
Providers
Azure
Input Tokens
$0.95/M
Output Tokens
$4/M
Cache Read
$0.19/M
Web Search
$0.035/R
Protocols
openai
/v1/chat/completions/v1/responsesanthropic
Moonshot
Input Tokens
$0.95/M
Output Tokens
$4/M
Cache Read
$0.19/M
Web Search
$0.0043/R
Protocols
openai
/v1/chat/completionsanthropic
Code Examples
from openai import OpenAIclient = 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)
Related Models
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.
MoonshotAI: Kimi K2.7 Code supports a context window of 262K tokens with max output of 262K tokens, allowing you to process large documents and maintain long conversations.
Simply set your base URL to https://api.ofox.run/v1 and use your Ofox API key. The API is OpenAI-compatible — just change the base URL and API key in your existing code.
MoonshotAI: Kimi K2.7 Code supports the following capabilities: Function Calling, Reasoning, Prompt Caching, Web Search. Access all features through the Ofox.ai unified API.