Skip to main content

Kimi

Use this when your team already runs on Kimi and you want that vendor family to stay explicit in Loong config instead of disappearing behind a generic compatibility route.

At A Glance

FieldValue
Built-in kindkimi
Provider groupDirect Hosted Providers
Protocol familyopenai_chat_completions
Feature familyopenai_compatible
Auth schemebearer
Credential envsMOONSHOT_API_KEY
Aliaseskimi_compatible, moonshot, moonshot_compatible
Default base URLhttps://api.moonshot.cn
Request endpointhttps://api.moonshot.cn/v1/chat/completions
Models endpointhttps://api.moonshot.cn/v1/models

Minimal Config

active_provider = "kimi"

[providers.kimi]
kind = "kimi"
api_key = { env = "MOONSHOT_API_KEY" }
model = "auto"

Verify It

loong doctor
loong list-models
loong ask --message "Say hello and name the active provider."
If list-models is unreliable for this account or region, pin an explicit provider.model or add preferred_models instead of leaving recovery implicit.

Auth And Routing Contract

ContractValue
Auth optionalno
Model probe auth optionalno
Default API key envMOONSHOT_API_KEY
OAuth envnone
Primary request routehttps://api.moonshot.cn/v1/chat/completions
Primary model-catalog routehttps://api.moonshot.cn/v1/models

Region Endpoints

VariantBase URL
CNhttps://api.moonshot.cn
Globalhttps://api.moonshot.ai
Moonshot Kimi region endpoint: CN default (https://api.moonshot.cn); switch provider.base_url to https://api.moonshot.ai for Global accounts