KI

Kimi K3.1 Pro

⭐ 4,800•Python•LLM Backbone

Moonshot AI's frontier-tier model launched October 23, 2026, with native agent tool-calling and OpenAI-compatible APIs.

Moonshot AIFrontier ModelTool CallingLong ContextOpenAI-CompatibleAgent Backbone

Overview

Kimi K3.1 Pro is Moonshot AI's frontier-tier model, launched October 23, 2026 as the most capable entry in the Kimi line. It targets enterprise agent workloads: long-context reasoning, native tool-calling in the OpenAI/Anthropic wire style, structured output enforcement, and an OpenAI-compatible API that drops into LangGraph, CrewAI, OpenAI Agents SDK, and PydanticAI without adapters. Launched in the same week as the US national-security access order against Anthropic's advanced tiers and expanded AI/semiconductor restriction proposals, K3.1 Pro became a live multi-vendor hedge option for enterprise agent stacks, pairing with Moonshot's Kimi Code CLI for terminal-native coding agents and with LiteLLM/Omniroute routing for vendor-risk hedging. A coding-optimized variant pairs with Kimi Code CLI for repository-scale agentic coding.

Features

  • ✓Frontier-tier reasoning — strongest Kimi generation for agent workloads
  • ✓Native tool-calling in the OpenAI/Anthropic wire style — no framework adapters needed
  • ✓Long-context window for full-corpus document and multi-file code work
  • ✓Structured output enforcement (JSON Schema conformance)
  • ✓OpenAI-compatible API surface — any OpenAI SDK works unchanged
  • ✓Coding-optimized variant pairing with Kimi Code CLI
  • ✓Multimodal document/image understanding
  • ✓Competitive frontier-tier token pricing

Installation

pip install openai # point base_url at https://api.moonshot.ai/v1, model 'kimi-k3.1-pro'; or route via litellm

Pros

  • +Frontier-tier capability with agent-native tool-calling
  • +OpenAI-compatible API minimizes integration cost
  • +Credible multi-vendor hedge for post-access-order procurement
  • +Coherent Moonshot stack with Kimi Code CLI for coding agents

Cons

  • −Jurisdiction and data-residency review required for regulated US/EU workloads
  • −Younger Western enterprise ecosystem than Anthropic/OpenAI/Google
  • −No self-hosted local weights tier (unlike Qwen3.9 Flash)

Alternatives

Documentation

Kimi K3.1 Pro

Overview

Kimi K3.1 Pro is Moonshot AI's frontier-tier model, launched October 23, 2026, as the most capable entry in the Kimi line. It supersedes the K2.5 generation and lands as Moonshot's bid for enterprise agent workloads: long-context reasoning, native tool-calling in the OpenAI/Anthropic wire style, and an API positioned for production agent orchestration alongside Moonshot's own Kimi Code CLI.

The launch timing is inseparable from its market position. K3.1 Pro shipped in the same week that a US national-security access order cut off Anthropic's most advanced model tiers and proposed regulation expanded AI and semiconductor restrictions — making a capable non-US-pinned model a live procurement option rather than a regional curiosity. For enterprises writing "local hedge" and multi-vendor clauses into their agent playbooks, K3.1 Pro enters the evaluation set alongside Claude Opus 4.7, GPT-5.6 Sol Enterprise, Gemini, and Qwen3.9 Flash.

Moonshot's 2026 stack is now coherent end-to-end: Kimi Code CLI (the Rust/TypeScript coding agent) as the client, K3.1 Pro as the frontier model, and OpenAI-compatible APIs for integration with every major agent framework.

Features

  • Frontier-tier reasoning — the strongest Kimi generation on reasoning benchmarks, positioned against Claude Opus 4.7 and GPT-5.6 Sol for agent workloads
  • Long-context window — full-corpus document work and multi-file code understanding in a single context
  • Native tool-calling — agent-ready function calling in the OpenAI/Anthropic wire style; LangGraph, CrewAI, OpenAI Agents SDK, and PydanticAI integrations work without adapters
  • Structured output enforcement — JSON Schema-conformant outputs for pipeline reliability
  • Coding-optimized variant — strong performance on agentic coding benchmarks, paired with Kimi Code CLI for terminal-native workflows
  • OpenAI-compatible API — drop-in for stacks built against the OpenAI SDK surface, including Open Responses-style endpoints
  • Multimodal understanding — document and image inputs for document-heavy enterprise workflows
  • Competitive pricing — aggressive token pricing versus US-hosted frontier tiers, a deliberate enterprise wedge

Installation

# OpenAI-compatible client (any OpenAI SDK works)
pip install openai

# Point at Moonshot's endpoint
export MOONSHOT_BASE_URL="https://api.moonshot.ai/v1"
export MOONSHOT_API_KEY="sk-..."

# Or via LiteLLM for multi-provider routing
pip install litellm
// TypeScript — same pattern with the OpenAI SDK
import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://api.moonshot.ai/v1',
  apiKey: process.env.MOONSHOT_API_KEY,
})

const res = await client.chat.completions.create({
  model: 'kimi-k3.1-pro',
  messages: [{ role: 'user', content: 'Summarize this 400-page filing' }],
})

Quick Start

from openai import OpenAI

client = OpenAI(
    base_url="https://api.moonshot.ai/v1",
    api_key="sk-...",
)

tools = [{
    "type": "function",
    "function": {
        "name": "query_filings",
        "description": "Search regulatory filings by company and year",
        "parameters": {
            "type": "object",
            "properties": {
                "company": {"type": "string"},
                "year": {"type": "integer"},
            },
            "required": ["company"],
        },
    },
}]

response = client.chat.completions.create(
    model="kimi-k3.1-pro",
    messages=[{"role": "user", "content": "Pull the 2025 filings for Acme Corp and flag risk factors"}],
    tools=tools,
)

print(response.choices[0].message.tool_calls)

Core Concepts

The Agent-First Model Contract

K3.1 Pro treats tool-calling as a first-class contract rather than a fine-tuned behavior: tool definitions, parallel calls, and structured results follow the wire format the agent-framework ecosystem standardized on in 2026. For teams, this means the model slots into existing LangGraph graphs, CrewAI crews, or OpenAI Agents SDK projects by changing a model string — the same portability property Qwen3.9 Flash shipped for local deployments, now in a hosted frontier tier.

The Multi-Vendor Stack

K3.1 Pro's enterprise relevance in late 2026 comes from where it sits in a hedged stack. The pattern procurement teams converged on after the access-order week:

LayerOption A (US-hosted)Option B (hedge)
Frontier modelClaude Opus 4.7 / GPT-5.6 SolKimi K3.1 Pro
Local model—Qwen3.9 Flash (Apache 2.0)
Coding agentClaude Code / CodexKimi Code CLI
RoutingLiteLLM / Omniroutesame

Because K3.1 Pro speaks the OpenAI-compatible surface, a LiteLLM or Omniroute router in front of the stack makes the swap a config change.

Coding Pairing with Kimi Code CLI

K3.1 Pro is the recommended model backend for Kimi Code CLI, Moonshot's open-source coding agent. The pairing targets the agentic-coding workflow end to end: repository-scale context, multi-step edit plans, sandboxed execution, and terminal-native operation.

Advanced Features

Long-Context Document Work

The context window supports full-corpus analysis — annual reports, regulatory filings, entire codebases — in one pass, with retrieval quality that holds across the window rather than degrading in the middle sections.

Structured Pipelines

response = client.chat.completions.create(
    model="kimi-k3.1-pro",
    messages=[{"role": "user", "content": transcript}],
    response_format={"type": "json_object"},
    # JSON Schema-conformant output for downstream pipelines
)

Framework Integration

  • LangGraph — model node swap; tool-calling works as-is
  • CrewAI — llm="moonshot/kimi-k3.1-pro" via LiteLLM
  • OpenAI Agents SDK — set base_url to Moonshot's endpoint
  • PydanticAI — OpenAI-compatible provider config

Examples

  • Regulatory analysis agent — full-corpus filings review with tool-based citation retrieval
  • Coding agent backend — Kimi Code CLI with K3.1 Pro for repository-scale refactors
  • Document intelligence pipeline — long-context extraction into typed JSON for downstream systems

Pros

  • ✅ Frontier-tier capability with native agent wire-format support — drops into every major framework
  • ✅ OpenAI-compatible API minimizes integration cost
  • ✅ Aggressive pricing versus US-hosted frontier tiers
  • ✅ Coherent Moonshot stack (K3.1 Pro + Kimi Code CLI) for coding agents
  • ✅ Strong multi-vendor hedge in post-access-order procurement

Cons

  • ❌ Data-residency and jurisdiction review required for regulated US/EU workloads — the same geopolitical factors that make it a hedge also complicate some deployments
  • ❌ Younger Western enterprise ecosystem (SOC 2 posture, support channels, consultancies) than Anthropic/OpenAI/Google
  • ❌ Local weights are not available — unlike Qwen3.9 Flash there is no self-hosted tier yet
  • ❌ Long-context pricing compounds on multi-step agent loops that resend large contexts

When to Use

  • You need a frontier-tier model with agent-native tool-calling at competitive pricing
  • Your procurement requires a credible non-US-pinned production option
  • You're building coding agents and want the Kimi Code CLI + K3.1 Pro pairing
  • You want a drop-in second provider behind a LiteLLM/Omniroute router for vendor-risk hedging

Resources