Moonshot AI serves the Kimi models over an OpenAI-compatible endpoint at https://api.moonshot.ai/v1.
Get an API Key
- Sign in at platform.kimi.ai
- Create a key at console/api-keys
- Top up the account — third-party guides report billable calls fail until you do (not confirmed on Moonshot’s own pages)
Configure VibeCody
Option 1: Encrypted store (recommended)
vibecli set-key moonshot "..."
vibecli --provider moonshot
The key is stored encrypted in ~/.vibecli/profile_settings.db, not in any plaintext file. See Secure settings storage.
Option 2: Environment variable
export MOONSHOT_API_KEY="..."
vibecli --provider moonshot
Option 3: Config file (~/.vibecli/config.toml)
[moonshot]
enabled = true
model = "kimi-k3"
api_url = "https://api.moonshot.ai/v1" # optional, default shown
Prefer option 1 or 2 for the key itself. In VibeCoder, the key field is under Settings → Configuration → Keys, and Moonshot (Kimi) appears in the toolbar model dropdown once a key is set.
Model Selection
| Model | Notes |
|---|---|
kimi-k3 |
Recommended; 1M-token context. Default |
kimi-k2.7-code |
Coding-focused, 256K |
kimi-k2.7-code-highspeed |
Coding, faster output |
kimi-k2.6 |
General purpose, 256K |
Default: kimi-k3
Checked against Moonshot’s models page on 2026-10-15. Discontinued, so not offered: the kimi-k2 series (2026-05-25), kimi-k2.5 and moonshot-v1-* (2026-08-31), kimi-latest. Use a named model, not an alias.
The picker list is what VibeCody ships, not a live query.
Verify Connection
vibecli --provider moonshot -c "Write a Python async web scraper"
Troubleshooting
Moonshot API key not set (MOONSHOT_API_KEY)
No key reached the provider. Check vibecli list-keys shows moonshot, or that the variable is exported in the shell that launched VibeCody.
401
The key is wrong or the account has no balance. If your account is on the China platform (api.moonshot.cn), set api_url to that host — keys are not shared across the two.