---
title: 在 AiPMChat 中使用 Moonshot（月之暗面） AI API Key
description: 学习如何在 AiPMChat 中配置和使用 Moonshot AI，包括获取 API 密钥和选择适合的 AI 模型进行对话。
tags:
  - Moonshot AI
  - Web UI
  - API Key
---

# 在 AiPMChat 中使用 Moonshot AI

<Image
  alt={'在 AiPMChat 中使用 Moonshot AI'}
  cover
  src={'https://github.com/aipmhub/aipm-chat/assets/17870709/21b94782-875b-4dee-a572-3c5843f3e1e3'}
/>

Moonshot AI API 现在可供所有人使用, 本文档将指导你如何在 AiPMChat 中使用 [Moonshot AI](https://www.moonshot.cn/):

<Steps>

### 步骤一：获取 Moonshot AI API 密钥

- 申请您的 [API 密钥](https://platform.moonshot.cn/console/api-keys)

<Image
  alt={'申请 API Key'}
  inStep
  src={'https://github.com/aipmhub/aipm-chat/assets/17870709/4e56e080-9b8c-42e1-87e1-11123dbb9067'}
/>

### 步骤二：在 AiPMChat 中配置 Moonshot AI

- 访问 AiPMChat 的`设置`界面
- 在`语言模型`下找到`Moonshot AI`的设置项

<Image
  alt={'填入 API 密钥'}
  inStep
  src={'https://github.com/aipmhub/aipm-chat/assets/17870709/e1b5f84f-015e-437c-98cc-a3431fa3b077'}
/>

<Callout type={'warning'}>
  如果您使用的是 mistral.ai，则您的帐户必须具有有效的订阅才能使 API 密钥正常工作。新创建的 API
  密钥需要 2-3 分钟才能开始工作。如果单击“测试”按钮但失败，请在 2-3 分钟后重试。
</Callout>

- 填入获得的 API 密钥
- 为你的 AI 助手选择一个 Moonshot AI 的模型即可开始对话

<Image
  alt={'选择 Moonshot AI 模型并开始对话'}
  inStep
  src={'https://github.com/aipmhub/aipm-chat/assets/17870709/eb7273f8-f0ed-4b9b-884e-96d29c406cb7'}
/>

<Callout type={'warning'}>
  在使用过程中你可能需要向 API 服务提供商付费，请参考 Moonshot AI 的相关费用政策。
</Callout>

</Steps>

至此你已经可以在 AiPMChat 中使用 Moonshot AI 提供的模型进行对话了。
