Setup guide - Documented by Aider
Use Kimi in Aider
Aider documents connecting to any OpenAI-compatible endpoint via OPENAI_API_BASE and OPENAI_API_KEY with an openai/ model prefix. Pointed at Kimi's documented OpenAI-compatible base URL, this runs kimi-k3.
Last verified 3 steps4 official sources
Steps
- Step 1.
Configure your API key and endpoint (Mac/Linux), using Kimi's OpenAI-compatible base URL.
Terminalexport OPENAI_API_BASE=https://api.moonshot.ai/v1 export OPENAI_API_KEY=<key> - Step 2.
Windows equivalent (restart shell after setx commands).
Terminalsetx OPENAI_API_BASE https://api.moonshot.ai/v1 setx OPENAI_API_KEY <key> - Step 3.
Change into your codebase and start aider, prefixing the model name with openai/.
Terminalcd /to/your/project aider --model openai/kimi-k3
Caveats
- This combines Aider's documented OpenAI-compatible mechanism with Moonshot's documented base URL and model ids. No Aider page covers Kimi specifically.
- Aider will show model warnings for models it is not familiar with (see aider.chat/docs/llms/warnings.html).
- Aider's Other LLMs page lists MOONSHOT_API_KEY among LiteLLM provider keys, but no Aider page documents a native moonshot/ model id, so the openai/ route is used here.
- Setting OPENAI_API_BASE and OPENAI_API_KEY globally redirects any other OpenAI usage in the same shell.
More setup guides
Same tool, other providers
Related reading
- Kimi K3 Is GA in GitHub Copilot: Pricing, Rollout, and What It Means for Model ChoiceKimi K3 is GA in GitHub Copilot at $3/$15 per million tokens, off by default for Business and Enterprise. Rollout details and what it means for model choice.
- Cloudflare Runs Kimi and GLM at Scale: FP8 KV Caches, INT4 Weights, and a Cache Safety NetCloudflare runs Kimi K2.6 and GLM 5.2 on Workers AI with FP8 KV caches, INT4 weights and a KV cache integrity check. What each technique buys on GPU fleets.
- AMD MI355X vs NVIDIA B200 vs B300 for Open-Weight ServingAMD MI355X vs NVIDIA B200 vs B300 for serving Kimi K3's about 1.5TB of open weights: verified specs, the Wafer benchmark, and cost per token for each.
- Kimi Linear: An Attention Architecture That Outperforms Full AttentionKimi Linear explained: Moonshot's KDA hybrid linear attention beat full attention with 75% less KV cache and up to 6x faster decoding at 1M context.
- Kimi K3 Weights Land on HuggingFace: 2.8T Open Frontier Model You Can Actually DownloadKimi K3 open weights are on HuggingFace: 2.8T parameters, 1M context, native MXFP4 and a ~1.63TB download. The specs, license terms and HN reaction.
- Kimi K3 in 10 Minutes: Moonshot AI's 2.8T Open Model, API Setup, Pricing, and BenchmarksKimi K3 from Moonshot AI is a 2.8T open model with a 1M-token context and an OpenAI-compatible API. How to call it, what it costs, and how it benchmarks.
FAQ
How do I use Kimi in Aider?
Aider documents connecting to any OpenAI-compatible endpoint via OPENAI_API_BASE and OPENAI_API_KEY with an openai/ model prefix. Pointed at Kimi's documented OpenAI-compatible base URL, this runs kimi-k3.
Which Kimi model ids work in Aider?
The official docs read for this guide list openai/kimi-k3, openai/kimi-k2.7-code and openai/kimi-k2.6. Requests go to https://api.moonshot.ai/v1.
Is this an official Kimi and Aider setup?
Aider documents this setup in its own docs. It was last checked against 4 official pages on October 17, 2026.
Sources
Last verified against 4 official pages.
- aider.chathttps://aider.chat/docs/llms/openai-compat.html
- aider.chathttps://aider.chat/docs/llms/other.html
- platform.kimi.aihttps://platform.kimi.ai/docs/api/overview.md
- platform.kimi.aihttps://platform.kimi.ai/docs/models.md
Newsletter
New models, set up the day they ship
One email per week. New model releases, the coding tools that support them and how to wire them up.