# Kimi K3

> Open-weights model from Moonshot AI with a 1M context window and image and video input. Strong on web app building and scientific coding, but priced well above the registry median.

Use it with Pydantic AI as `gateway/bedrock:global.moonshotai.kimi-k3`.

## Spec sheet

- **Family:** Moonshot AI
- **Released:** 16 Jul 2026
- **Weights:** open
- **Context window:** 1,000,000 tokens
- **Largest response:** 1,048,576 tokens
- **Accepts:** text, image, video
- **Tool calling:** yes
- **Knowledge cutoff:** unknown
- **Intelligence index:** 67.1 (rank 33)
- **Price:** $3 input, $15 output, $6 blended per 1M tokens
- **Index points per $:** 11.2 (rank 94)
- **Speed:** 87.5 tokens/sec (rank 53)
- **Popularity:** rank 21 of 194 by usage
- **Pydantic AI Gateway:** built in

## Benchmarks

| Benchmark | Score | Rank among models tested | What it measures | Source |
| --- | --- | --- | --- | --- |
| Intelligence index | 67.1 | 34 | Our composite of the benchmarks below, 0-100 | Pydantic, from the sources credited below |
| GPQA Diamond | 93.1% | 25 | Graduate-level science questions, multiple choice | Epoch AI (CC BY 4.0) |
| OTIS Mock AIME | 97.2% | 35 | Competition mathematics problems with exact answers | Epoch AI (CC BY 4.0) |
| FrontierMath | 72.2% | 30 | Original research-level mathematics problems, tiers 1 to 3 | Epoch AI (CC BY 4.0) |
| ARC-AGI-2 | 60.4% | 36 | Abstract visual puzzles that test learning a new rule from a few examples | ARC Prize, via Epoch AI (CC BY 4.0) |
| SimpleQA Verified | 50.6% | 31 | Short factual questions answered from memory, without search | Epoch AI (CC BY 4.0) |
| SciCode | 59.5% | 12 | Scientific programming problems written by researchers | SciCode, via Epoch AI (CC BY 4.0) |
| WebDev Arena | 1674.3 | 9 | Rating from human votes on web apps the models built | LMArena, via Epoch AI (CC BY 4.0) |
| APEX-Agents | 47.8% | 38 | Long professional tasks (banking, consulting, law) passed on the first attempt | Mercor, via Epoch AI (CC BY 4.0) |
| LMArena text | 1474.8 | 23 | Rating from blind human votes between pairs of chat responses | LMArena (CC BY 4.0) |
| Epoch Capabilities Index | 158.6 | 26 | Epoch AI's own composite across about 40 benchmarks; shown for comparison, not part of our index | Epoch AI (CC BY 4.0) |

## Providers and prices

US dollars per million tokens.

| Provider | Gateway | Pydantic AI string | Input | Cached input | Output |
| --- | --- | --- | --- | --- | --- |
| Moonshot AI | BYOK | `moonshotai:kimi-k3` | $3 | $0.3 | $15 |
| AWS Bedrock | built in | `gateway/bedrock:global.moonshotai.kimi-k3` | $3 | $0.3 | $15 |
| Doubleword | built in | `gateway/doubleword:moonshotai/kimi-k3` | $3 | $0.3 | $15 |
| Baseten | BYOK | – | $3 | $0.3 | $15 |
| Fireworks | BYOK | `fireworks:kimi-k3` | $3 | $0.3 | $15 |
| Novita | BYOK | – | $3 | $0.3 | $15 |
| OpenRouter | BYOK | `openrouter:moonshotai/kimi-k3` | $3 | $0.3 | $15 |
| Perplexity | BYOK | – | $3 | $0.3 | $15 |
| Together AI | BYOK | `together:moonshotai/Kimi-K3` | $3 | $0.3 | $15 |

## Example code

### hello.py

Ask Kimi K3 a question with a Pydantic AI agent and print the answer. Run it with uv run hello.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os

from pydantic_ai import Agent

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'

agent = Agent('gateway/bedrock:global.moonshotai.kimi-k3', instructions='Be concise, reply with one sentence.')

result = agent.run_sync('Where does "hello world" come from?')
print(result.output)
```

### structured_output.py

Get validated, typed output from Kimi K3 by giving the agent a Pydantic model. Run it with uv run structured_output.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os

from pydantic import BaseModel
from pydantic_ai import Agent

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'


class CityLocation(BaseModel):
    city: str
    country: str


agent = Agent('gateway/bedrock:global.moonshotai.kimi-k3', output_type=CityLocation)

result = agent.run_sync('Where were the olympics held in 2012?')
print(result.output)
#> city='London' country='United Kingdom'
```

### tools.py

Give Kimi K3 two tools to call, one of which reads the agent's dependencies. Run it with uv run tools.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import os
import random

from pydantic_ai import Agent, RunContext

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'

agent = Agent(
    'gateway/bedrock:global.moonshotai.kimi-k3',
    deps_type=str,
    instructions="You're a dice game, roll the die and see if it matches the user's guess.",
)


@agent.tool_plain
def roll_dice() -> str:
    """Roll a six-sided die and return the result."""
    return str(random.randint(1, 6))


@agent.tool
def get_player_name(ctx: RunContext[str]) -> str:
    """Get the player's name."""
    return ctx.deps


result = agent.run_sync('My guess is 4', deps='Anne')
print(result.output)
```

### streaming.py

Stream Kimi K3's reply to the terminal as it is generated. Run it with uv run streaming.py.

```python
# /// script
# dependencies = ["pydantic-ai"]
# ///
import asyncio
import os

from pydantic_ai import Agent

os.environ['PYDANTIC_AI_GATEWAY_API_KEY'] = '...'

agent = Agent('gateway/bedrock:global.moonshotai.kimi-k3')


async def main():
    async with agent.run_stream('Explain prompt caching in three bullet points.') as response:
        async for text in response.stream_text(delta=True):
            print(text, end='', flush=True)


asyncio.run(main())
```

### pax.sh

Chat with Kimi K3 in your terminal using pax, the TUI for pydantic-ai-harness. Coming soon.

```sh
export PYDANTIC_AI_GATEWAY_API_KEY='...'

uvx pax --model 'gateway/bedrock:global.moonshotai.kimi-k3'
```

### ai_sdk.ts

Call Kimi K3 from TypeScript with the Vercel AI SDK, through Pydantic AI Gateway.

```ts
// npm install ai @ai-sdk/amazon-bedrock
import { createAmazonBedrock } from '@ai-sdk/amazon-bedrock'
import { generateText } from 'ai'

process.env.PYDANTIC_AI_GATEWAY_API_KEY = '...'

const bedrock = createAmazonBedrock({
  baseURL: 'https://gateway.pydantic.dev/proxy/bedrock',
  apiKey: process.env.PYDANTIC_AI_GATEWAY_API_KEY,
})

const { text } = await generateText({
  model: bedrock('global.moonshotai.kimi-k3'),
  system: 'Be concise, reply with one sentence.',
  prompt: 'Where does "hello world" come from?',
})
console.log(text)
```

## About Kimi K3

Kimi K3 is an open-weights model from Moonshot AI, released July 2026. It accepts text, image and video, has a 1M-token context window, and supports tool calling, structured output and a reasoning mode. Its strongest results are web app building, 9th of 85 on WebDev Arena, and scientific programming, 12th of 96 on SciCode. Its overall intelligence index of 67.1 ranks 34th of 114, above the median of 59.5.

The main drawbacks are price and agentic work. Its blended cost of $6 per million tokens is about six times the registry median and ranks 163rd of 194. It scores 47.8% on APEX-Agents, 38th of 60 and below the median, and sits just under the median on ARC-AGI-2. Nine providers host it, so the choice of host affects cost.

**Strengths**

- WebDev Arena rating 1674.3, 9th of 85
- SciCode score 59.5%, 12th of 96
- Open weights, 1M context window and 1M maximum output tokens
- Accepts text, image and video, with tool calling and structured output

**Weaknesses**

- Blended price $6 per million tokens, 163rd of 194 on price
- APEX-Agents score 47.8%, 38th of 60 and below the median
- ARC-AGI-2 score 60.4%, 36th of 68 and just below the median

**Best for:** Web development and scientific coding agents that need long context or image and video input.

Prices come from [genai-prices](https://github.com/pydantic/genai-prices), in US dollars per million tokens. Benchmark scores come from Epoch AI and LMArena (CC BY 4.0); the index and its sources are described at https://models.pydantic.dev/methodology.md. Data built 2026-11-25. Compare with other models: https://models.pydantic.dev/models.md
