kimi-k3 — API, Pricing & Context Window | Vivgrid
Run Moonshot AI's kimi-k3 on Vivgrid: a frontier coding model with a 1M-token context window, 128K max output, tool calling, and an OpenAI-compatible API.
kimi-k3 is Moonshot AI's frontier model for coding, reasoning, and agentic workflows. It expands the Kimi family to a 1M-token context window with up to 128K output tokens, allowing agents to reason over large repositories and complete substantial engineering tasks in a single run.
Vivgrid exposes kimi-k3 through the unified, OpenAI-compatible Chat Completions API (/chat/completions). You can use the same API key, client libraries, billing, and observability as the rest of the Vivgrid model catalog.
Specifications
| Provider | Moonshot AI |
| Model ID | kimi-k3 |
| Best for | Coding |
| Available on | Vibe coding |
| Context window | 1,000,000 tokens |
| Max output | 128,000 tokens |
| Modalities | Text, Image |
| Tool / function calling | Yes |
| Knowledge cutoff | 2026-06 |
| Acceleration | 🌐 Global (Centralized) |
Pricing
Pricing in USD per 1M tokens, matching the provider's rates.
| Input | Cached input | Output |
|---|---|---|
| $3.00 | $0.30 | $15.00 |
What one request costs
The rates above applied to a 20K-token prompt with a 2K-token reply — a typical single agent turn, small enough that every request is billed at the base rate.
| Request | Cost |
|---|---|
| Cold prompt, nothing cached | $0.0900 |
| Warm prompt, 90% of the input served from cache | $0.0414 |
Use kimi-k3 in your coding agent
kimi-k3 works with the same Vivgrid key and https://api.vivgrid.com/v1 endpoint as every other model in the catalog. Grab your API key from the Vivgrid Console, then drop one of the configurations below into your agent of choice.
OpenCode
OpenCode has Vivgrid built in, so you can use kimi-k3 without writing any config: open /models, search for vivgrid, paste your API key and pick the model. The OpenCode tutorial walks through it step by step.
Prefer to configure it by hand? Install OpenCode:
npm i -g opencode-aiDeclare kimi-k3 under the Vivgrid provider in your global OpenCode config, ~/.config/opencode/opencode.json. The @ai-sdk/openai-compatible provider talks to Vivgrid over Chat Completions (/v1/chat/completions):
{
"$schema": "https://opencode.ai/config.json",
"model": "vivgrid/kimi-k3",
"provider": {
"vivgrid": {
"npm": "@ai-sdk/openai-compatible",
"name": "Vivgrid",
"options": {
"baseURL": "https://api.vivgrid.com/v1",
"apiKey": "{env:VIVGRID_API_KEY}"
},
"models": {
"kimi-k3": {
"name": "kimi-k3",
"tool_call": true,
"attachment": true,
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 1000000, "output": 128000 }
}
}
}
}
}Export your key and launch OpenCode:
export VIVGRID_API_KEY="viv-xxxxxxxxxxxxx"
opencodeUse /models to switch between kimi-k3 and other Vivgrid models mid-session. See the full OpenCode tutorial.
Pi
Install Pi:
npm install -g --ignore-scripts @earendil-works/pi-coding-agentAdd kimi-k3 to the Vivgrid provider in ~/.pi/agent/models.json. Pi talks to Vivgrid over Chat Completions (/v1/chat/completions):
{
"providers": {
"vivgrid": {
"baseUrl": "https://api.vivgrid.com/v1",
"apiKey": "viv-xxxxxxxxxxxxx",
"api": "openai-completions",
"models": [
{
"id": "kimi-k3",
"input": ["text", "image"],
"contextWindow": 1000000,
"maxTokens": 128000
}
]
}
}
}Make it the model Pi starts with in ~/.pi/agent/settings.json:
{
"defaultProvider": "vivgrid",
"defaultModel": "kimi-k3"
}Then verify and start Pi:
pi --list-models vivgrid
piOr run a one-shot prompt without entering the TUI:
pi -p "explain the auth flow in this repo" --model vivgrid/kimi-k3See the full Pi tutorial.
API surfaces
The Vivgrid Console catalogs kimi-k3 on one surface, all behind the same API key. The endpoint shown is the one the Console previews for that surface.
| Surface | Primary endpoint | Use it for |
|---|---|---|
| Vibe coding | /chat/completions | Coding CLIs and IDE agents that drive the model themselves — point the tool at Vivgrid and keep your own loop. |
Quick start
Get an API key from the Vivgrid Console, then call kimi-k3 directly.
curl https://api.vivgrid.com/v1/chat/completions \
-H "Authorization: Bearer $VIVGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k3",
"messages": [
{ "role": "user", "content": "Say hello in English, Chinese and Spanish." }
],
"stream": true
}'Choosing within the Kimi family
Prices are USD per 1M tokens at the base rate. Rows marked this page are the model described here.
| Model | Context | Max output | Input | Output |
|---|---|---|---|---|
kimi-k3 — this page | 1,000,000 | 128,000 | $3.00 | $15.00 |
kimi-k2.8-preview | 1,000,000 | — | $1.00 | $4.15 |
Ideal use cases
- Long-context coding agents and repository-scale refactoring
- Complex software engineering, debugging, and code review
- Tool-calling agents that need dependable multi-step reasoning
- Teams seeking a high-capability alternative to frontier US models
Related models
- gpt-6-astra — OpenAI's frontier gpt-6 coding model
- minimax-m3 — a lower-cost coding alternative
- kimi-k2.8-preview — the efficient Kimi sibling, same 1M context at a third of the price
- claude-opus-5-5 — Anthropic's latest flagship coding model
glm-5.1
glm-5.1 on Vivgrid: Zhipu AI's capable coding model with a 200K context window, function calling, and competitive pricing.
kimi-k2.8-preview
kimi-k2.8-preview on Vivgrid: Moonshot AI's efficient coding model with a 1M-token context window, adjustable thinking effort, and tool calling — at a fraction of kimi-k3's price.