Kimi K2 Thinking API

Kimi K2 Thinking on AIMLAPI.

Modalities
Image, TextText
In / Out price
$0.6348/$2.65per 1M
Context window
256K tokens
Released
Nov 6, 2025

Kimi K2 Thinking overview

The pelican test: one prompt, every text model, unedited SVG output from Nov 3, 2026.

SVG of a pelican riding a bicycle, written by Kimi K2 Thinking through AI/ML API

Kimi K2 Thinking specs

Model ID
moonshotai/kimi-k2-thinking
Developer
Moonshot AI
Context window
262,144 tokens
Max output
98,304 tokens
Input
Image, Text
Output
Text
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

Coding and code review
Generate, debug, and review code across languages, reading whole files or repos in a single prompt.

Agentic and multi-step workflows
Reliable tool-calling and instruction-following suit agent loops that plan, call tools, and iterate.

Complex reasoning
Extended reasoning improves reliability on multi-step math, logic, and technical analysis.

Long-document analysis
Summarize and extract from contracts, papers, and reports without aggressive chunking.

Use cases

Autonomous research workflows are a documented use case for Kimi K2 Thinking, including long-horizon research tasks and web browsing with information synthesis.

Complex coding projects are another documented use case, including coding workflows that can span hundreds of steps and autonomous execution.

Mathematical problem-solving is documented as a use case, with emphasis on extended reasoning for complex math tasks.

Tool-orchestrated task execution is also documented, where the model dynamically invokes tools to carry out multi-step actions.

Capabilities

  • Function calling
  • Reasoning
  • Streaming
  • Structured outputs
  • Web search

Kimi K2 Thinking benchmarks by Artificial Analysis

See how Kimi K2 Thinking compares in generation speed and latency. Data retrieved Nov 3, 2026.

Speed

Output tokens / second

Benchmark results

Compare 10 models available on AI/ML API across 5 independent benchmarks.

Humanity's Last Exam

Expert-written questions across academic subjects.

Kimi K2 Thinking API pricing

Kimi K2 Thinking pricing in US dollars
UsagePriceUnit
Input$0.63481M tokens
Output$2.651M tokens
Cached input$0.15871M tokens

Prices from the AI/ML API price list, checked on Nov 4, 2026.

Kimi K2 Thinking vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
Kimi K2 Thinking$0.6348$2.65
Kimi K2.7 Code HighSpeed$1.9$8
Kimi K3.1 Pro$2$10
Kimi K3$3$15
Kimi K3.1 Pro Highspeed$4$20

How to use the Kimi K2 Thinking API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "moonshotai/kimi-k2-thinking",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Related articles

All posts

Kimi K2 Thinking FAQ

What is the context window of Kimi K2 Thinking?

Kimi K2 Thinking has a 262,144 tokens context window and can return up to 100,352 tokens.

What inputs and outputs does Kimi K2 Thinking support?

Kimi K2 Thinking takes image, text as input and returns text.

What is the model ID for Kimi K2 Thinking?

Use moonshotai/kimi-k2-thinking as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.

How much does Kimi K2 Thinking cost?

Kimi K2 Thinking costs $0.6348 input and $2.65 output per 1M tokens on AI/ML API, billed as you go with no subscription.

Does Kimi K2 Thinking support streaming?

Yes, Kimi K2 Thinking can stream responses as they are generated.

Can Kimi K2 Thinking read images?

Yes, Kimi K2 Thinking accepts image input alongside text.

Who created Kimi K2 Thinking?

Kimi K2 Thinking was built by Moonshot AI.

Start building with Kimi K2 Thinking

Kimi K2 Thinking API

moonshotai/kimi-k2-thinking

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "moonshotai/kimi-k2-thinking",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'