Skip to main content
Watch: I Built an AI App Without Leaving Databricks

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

  1. Step 1.

    Configure your API key and endpoint (Mac/Linux), using Kimi's OpenAI-compatible base URL.

    Terminal
    export OPENAI_API_BASE=https://api.moonshot.ai/v1
    export OPENAI_API_KEY=<key>
  2. Step 2.

    Windows equivalent (restart shell after setx commands).

    Terminal
    setx OPENAI_API_BASE https://api.moonshot.ai/v1
    setx OPENAI_API_KEY <key>
  3. Step 3.

    Change into your codebase and start aider, prefixing the model name with openai/.

    Terminal
    cd /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.

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.

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.