콘텐츠로 이동

Moonshot AI (Kimi) 연동하기: Kimi K2.5 모델 시작 가이드

OpenAI API만 쓰다 보면 가끔 다른 모델은 어떨지 궁금할 때가 있죠. 특히 긴 문맥을 처리하거나 코딩할 때 Kimi의 성능이 꽤 괜찮다는 소문을 들었습니다. 하지만 API 설정이 복잡하면 시작하기도 전에 지치기 마련이에요.

오늘은 Moonshot의 Kimi 모델을 아주 쉽고 빠르게 연결하는 방법을 공유할게요. 복잡한 과정 없이 바로 실무에 적용해 보세요.

  • Moonshot API Key 또는 Kimi Coding API Key
  • OpenClaw 설치 완료
  • Node.js 환경
  • 인터넷 연결

가장 빠른 방법은 CLI를 사용하는 거예요. 5분도 걸리지 않습니다.

Moonshot API를 사용하려면 다음 명령어를 입력하세요:

Terminal window
openclaw onboard --auth-choice moonshot-api-key

코딩 전용 모델인 Kimi Coding을 쓰고 싶다면 이 명령어를 사용하세요:

Terminal window
openclaw onboard --auth-choice kimi-code-api-key

주의할 점: Moonshot과 Kimi Coding은 서로 다른 Provider입니다. API Key나 엔드포인트가 호환되지 않으니 꼭 구분해서 설정해야 합니다. Moonshot은 moonshot/... 형식을, Kimi Coding은 kimi-coding/... 형식을 사용합니다.

설정 파일에 직접 추가하고 싶다면 아래 JSON 코드를 복사해서 붙여넣으세요.

{
env: { MOONSHOT_API_KEY: "sk-..." },
agents: {
defaults: {
model: { primary: "moonshot/kimi-k2.5" },
models: {
"moonshot/kimi-k2.5": { alias: "Kimi K2.5" },
"moonshot/kimi-k2-0905-preview": { alias: "Kimi K2" },
"moonshot/kimi-k2-turbo-preview": { alias: "Kimi K2 Turbo" },
"moonshot/kimi-k2-thinking": { alias: "Kimi K2 Thinking" },
"moonshot/kimi-k2-thinking-turbo": { alias: "Kimi K2 Thinking Turbo" },
},
},
},
models: {
mode: "merge",
providers: {
moonshot: {
baseUrl: "https://api.moonshot.ai/v1",
apiKey: "${MOONSHOT_API_KEY}",
api: "openai-completions",
models: [
{
id: "kimi-k2.5",
name: "Kimi K2.5",
reasoning: false,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 256000,
maxTokens: 8192,
},
{
id: "kimi-k2-0905-preview",
name: "Kimi K2 0905 Preview",
reasoning: false,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 256000,
maxTokens: 8192,
},
{
id: "kimi-k2-turbo-preview",
name: "Kimi K2 Turbo",
reasoning: false,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 256000,
maxTokens: 8192,
},
{
id: "kimi-k2-thinking",
name: "Kimi K2 Thinking",
reasoning: true,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 256000,
maxTokens: 8192,
},
{
id: "kimi-k2-thinking-turbo",
name: "Kimi K2 Thinking Turbo",
reasoning: true,
input: ["text"],
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
contextWindow: 256000,
maxTokens: 8192,
},
],
},
},
},
}

코딩 모델은 설정이 더 간단합니다.

{
env: { KIMI_API_KEY: "sk-..." },
agents: {
defaults: {
model: { primary: "kimi-coding/k2p5" },
models: {
"kimi-coding/k2p5": { alias: "Kimi K2.5" },
},
},
},
}
  • 중국 내 서버를 사용하시나요? 기본 엔드포인트는 https://api.moonshot.ai/v1이지만, 중국 내에서 접속한다면 https://api.moonshot.cn/v1을 사용하세요. 응답 속도가 훨씬 빨라집니다.
  • 모델 ID가 인식되지 않나요? Moonshot 모델은 ID 앞에 moonshot/을 꼭 붙여야 합니다. Kimi Coding은 kimi-coding/을 사용하니 오타가 없는지 확인해 보세요.
  • Context Window 크기를 조절하고 싶나요? Moonshot이 모델의 Context 제한을 변경하면 설정 파일의 contextWindow 값을 그에 맞춰 수정하면 됩니다.
  • API Key가 작동하지 않나요? Moonshot API Key와 Kimi Coding API Key는 서로 다릅니다. 발급받은 서비스가 무엇인지 다시 한번 확인해 보세요.

설정하다가 막히는 부분이 있다면 AI Setup Assistant에게 물어보세요.

OpenClaw

OpenClaw Expert

아직 막혀 있나요?

이 문서에서 답을 못 찾았다면 OpenClaw Expert에게 바로 물어보세요.